Export LaunchClipClearProcess; use more reliable method to manipulate os.Args for GUI clients

This commit is contained in:
2024-12-21 16:05:04 -05:00
parent 3b57d59ddc
commit f9aa2fc374
5 changed files with 13 additions and 11 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ import (
"strconv"
)
// launchClipClearProcess launches the automated clipboard clearing process.
// LaunchClipClearProcess launches the timed clipboard clearing process.
// For non-interactive CLI implementations, an entirely separate process is created for this purpose.
func launchClipClearProcess(copySubject string, isWayland bool) {
func LaunchClipClearProcess(copySubject string, isWayland bool) {
executableName := os.Args[0]
cmd := exec.Command(executableName, "clipclear", strconv.FormatBool(isWayland))
writeToStdin(cmd, copySubject)