mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -04:00
Export LaunchClipClearProcess; use more reliable method to manipulate os.Args for GUI clients
This commit is contained in:
@@ -7,9 +7,10 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// launchClipClearProcess launches the automated clipboard clearing process.
|
||||
// LaunchClipClearProcess launches the timed clipboard clearing process.
|
||||
// For interactive GUI/TUI implementations, the clipboard clearing process is launched as a goroutine.
|
||||
func launchClipClearProcess(copySubject string, isWayland bool) {
|
||||
os.Args[2] = strconv.FormatBool(isWayland)
|
||||
// copySubject can be omitted to clear the clipboard immediately and unconditionally.
|
||||
func LaunchClipClearProcess(copySubject string, isWayland bool) {
|
||||
os.Args = []string{os.Args[0], "", strconv.FormatBool(isWayland)}
|
||||
go clipClearProcess(copySubject)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user