mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-31 06:13:55 +00:00
choose primary mode on unix
This commit is contained in:
parent
591622de40
commit
4930951f77
@ -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 New Issue
Block a user