Drop Termux support

This commit is contained in:
2026-02-14 17:11:26 -05:00
parent b6ebd22463
commit 6d3e3cdb5b
9 changed files with 7 additions and 41 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build (!android && !ios) || termux
//go:build !android && !ios
package clip
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build (!android && !ios) || termux
//go:build !android && !ios
package clip
-30
View File
@@ -1,30 +0,0 @@
//go:build android && termux
package clip
import (
"errors"
"os/exec"
"github.com/rwinkhart/go-boilerplate/back"
)
// CopyBytes copies a byte slice to the clipboard.
func CopyBytes(clearClipboardAutomatically bool, copySubject []byte) error {
cmd := exec.Command("termux-clipboard-set")
_ = back.WriteToStdinAndZeroizeInput(cmd, copySubject)
if err := cmd.Run(); err != nil {
return errors.New("unable to copy to clipboard: " + err.Error())
}
if clearClipboardAutomatically {
LaunchClearProcess(copySubject)
}
return nil
}
// getClipCommands returns the commands for pasting and clearing the clipboard contents.
func getClipCommands() (*exec.Cmd, *exec.Cmd, error) {
cmdClear := exec.Command("termux-clipboard-set")
_ = back.WriteToStdinAndZeroizeInput(cmdClear, nil)
return exec.Command("termux-clipboard-get"), cmdClear, nil
}
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build !windows && !darwin && !android && !ios && !termux && !wsl
//go:build !windows && !darwin && !android && !ios && !wsl
package clip
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build !ios && (!android || termux) && !interactive
//go:build !ios && !android && !interactive
package clip
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build !ios && (!android || termux) && interactive
//go:build !ios && !android && interactive
package clip
+1 -1
View File
@@ -1,4 +1,4 @@
//go:build (!android && !ios) || termux
//go:build !android && !ios
package clip