mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
choose primary mode on unix
This commit is contained in:
parent
591622de40
commit
4930951f77
@ -12,6 +12,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Primary bool
|
||||||
|
|
||||||
xsel = "xsel"
|
xsel = "xsel"
|
||||||
xclip = "xclip"
|
xclip = "xclip"
|
||||||
)
|
)
|
||||||
@ -48,10 +50,16 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getPasteCommand() *exec.Cmd {
|
func getPasteCommand() *exec.Cmd {
|
||||||
|
if Primary {
|
||||||
|
pasteCmdArgs = pasteCmdArgs[:1]
|
||||||
|
}
|
||||||
return exec.Command(pasteCmdArgs[0], pasteCmdArgs[1:]...)
|
return exec.Command(pasteCmdArgs[0], pasteCmdArgs[1:]...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCopyCommand() *exec.Cmd {
|
func getCopyCommand() *exec.Cmd {
|
||||||
|
if Primary {
|
||||||
|
copyCmdArgs = copyCmdArgs[:1]
|
||||||
|
}
|
||||||
return exec.Command(copyCmdArgs[0], copyCmdArgs[1:]...)
|
return exec.Command(copyCmdArgs[0], copyCmdArgs[1:]...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user