choose primary mode on unix

This commit is contained in:
vcaesar 2018-01-29 20:21:05 +08:00
parent 591622de40
commit 4930951f77

View File

@ -12,6 +12,8 @@ import (
)
const (
Primary bool
xsel = "xsel"
xclip = "xclip"
)
@ -48,10 +50,16 @@ func init() {
}
func getPasteCommand() *exec.Cmd {
if Primary {
pasteCmdArgs = pasteCmdArgs[:1]
}
return exec.Command(pasteCmdArgs[0], pasteCmdArgs[1:]...)
}
func getCopyCommand() *exec.Cmd {
if Primary {
copyCmdArgs = copyCmdArgs[:1]
}
return exec.Command(copyCmdArgs[0], copyCmdArgs[1:]...)
}