mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-24 10:19:01 +00:00
choose primary mode on unix
This commit is contained in:
parent
591622de40
commit
4930951f77
1 changed files with 8 additions and 0 deletions
|
|
@ -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:]...)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue