mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-28 04:46:42 -04:00
Update wiki for new changes; fix compilation for some platforms
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
}
|
||||
if clearClipboardAutomatically {
|
||||
LaunchClipClearProcess(copySubject)
|
||||
LaunchClearProcess(copySubject)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
}
|
||||
if clearClipboardAutomatically {
|
||||
LaunchClipClearProcess(copySubject)
|
||||
LaunchClearProcess(copySubject)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
}
|
||||
if clearClipboardAutomatically {
|
||||
LaunchClipClearProcess(copySubject)
|
||||
LaunchClearProcess(copySubject)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ func CopyString(clearClipboardAutomatically bool, copySubject string) error {
|
||||
return errors.New("unable to copy to clipboard: " + err.Error())
|
||||
}
|
||||
if clearClipboardAutomatically {
|
||||
LaunchClipClearProcess(copySubject)
|
||||
LaunchClearProcess(copySubject)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
"github.com/rwinkhart/libmutton/global"
|
||||
)
|
||||
|
||||
// LaunchClipClearProcess launches the timed clipboard clearing process.
|
||||
// LaunchClearProcess launches the timed clipboard clearing process.
|
||||
// For non-interactive CLI implementations, an entirely separate process is created for this purpose.
|
||||
func LaunchClipClearProcess(copySubject string) {
|
||||
func LaunchClearProcess(copySubject string) {
|
||||
cmd := exec.Command(os.Args[0], "clipclear")
|
||||
cmd.SysProcAttr = global.GetSysProcAttr()
|
||||
_ = back.WriteToStdin(cmd, copySubject)
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
package clip
|
||||
|
||||
// LaunchClipClearProcess launches the timed clipboard clearing process.
|
||||
// LaunchClearProcess launches the timed clipboard clearing process.
|
||||
// For interactive GUI/TUI implementations, the clipboard clearing process is launched as a goroutine.
|
||||
// copySubject can be omitted to clear the clipboard immediately and unconditionally.
|
||||
func LaunchClipClearProcess(copySubject string) {
|
||||
go ClipClearProcess(copySubject)
|
||||
func LaunchClearProcess(copySubject string) {
|
||||
go ClearProcess(copySubject)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user