Improve versatility of getClipCommands()

This commit is contained in:
2025-12-26 19:57:43 -05:00
parent 53d82984d9
commit fdce036be6
2 changed files with 32 additions and 13 deletions
+4 -1
View File
@@ -13,7 +13,10 @@ import (
// ClearProcess clears the clipboard after 30 seconds if the clipboard contents have not changed.
// assignedContents can be omitted to clear the clipboard immediately and unconditionally.
func ClearProcess(assignedContents string) error {
cmdPaste, cmdClear := getClipCommands()
cmdPaste, cmdClear, err := getClipCommands()
if err != nil {
return errors.New("unable to determine clipboard platform: " + err.Error())
}
clearClipboard := func() error {
err := cmdClear.Run()