diff --git a/core/2globalsUNIX.go b/core/2globalsUNIX.go index 0e8c1e9..a7fcaeb 100644 --- a/core/2globalsUNIX.go +++ b/core/2globalsUNIX.go @@ -2,9 +2,11 @@ package core -var EntryRoot = Home + "/.local/share/libmutton" // Path to libmutton entry directory -var ConfigDir = Home + "/.config/libmutton" // Path to libmutton configuration directory -var ConfigPath = ConfigDir + "/libmutton.ini" // Path to libmutton configuration file +var ( + EntryRoot = Home + "/.local/share/libmutton" // Path to libmutton entry directory + ConfigDir = Home + "/.config/libmutton" // Path to libmutton configuration directory + ConfigPath = ConfigDir + "/libmutton.ini" // Path to libmutton configuration file +) const ( PathSeparator = "/" // Platform-specific path separator diff --git a/core/2globalsWIN.go b/core/2globalsWIN.go index 0454e61..dfc2c49 100644 --- a/core/2globalsWIN.go +++ b/core/2globalsWIN.go @@ -7,9 +7,11 @@ import ( "syscall" ) -var EntryRoot = Home + "\\AppData\\Local\\libmutton\\entries" // Path to libmutton entry directory -var ConfigDir = Home + "\\AppData\\Local\\libmutton\\config" // Path to libmutton configuration directory -var ConfigPath = ConfigDir + "\\libmutton.ini" // Path to libmutton configuration file +var ( + EntryRoot = Home + "\\AppData\\Local\\libmutton\\entries" // Path to libmutton entry directory + ConfigDir = Home + "\\AppData\\Local\\libmutton\\config" // Path to libmutton configuration directory + ConfigPath = ConfigDir + "\\libmutton.ini" // Path to libmutton configuration file +) const ( PathSeparator = "\\" // Platform-specific path separator diff --git a/core/configParser.go b/core/configParser.go index 5c0ddf9..a8dc50e 100644 --- a/core/configParser.go +++ b/core/configParser.go @@ -70,7 +70,7 @@ func GenDeviceIDList(errorOnFail bool) *[]fs.DirEntry { // WriteConfig writes the provided key-value pairs under the specified section headers in the libmutton.ini file. // Requires: valuesToWrite (a slice of length 3 arrays each containing a section, a key name, and a value), -// prune (a slice similar to valuesToWrite to allow removing the specified keys from an existing config) +// prune (a slice similar to valuesToWrite to allow removing the specified keys from an existing config), // append (set to true to append to the existing libmutton.ini file, false to overwrite it). func WriteConfig(valuesToWrite [][3]string, keysToPrune [][2]string, append bool) { var cfg *ini.File diff --git a/core/copyDROID.go b/core/copyDROID.go new file mode 100644 index 0000000..316bcbc --- /dev/null +++ b/core/copyDROID.go @@ -0,0 +1,18 @@ +//go:build android && !termux + +package core + +import ( + "os/exec" +) + +// copyString copies a string to the clipboard. +func copyString(continuous bool, copySubject string) { + // temporary dummy function to allow Android compilation +} + +// getClipCommands returns the commands for pasting and clearing the clipboard contents. +func getClipCommands() (*exec.Cmd, *exec.Cmd) { + // temporary dummy function to allow Android compilation + return nil, nil +}