Make launchProgram only respond to left-button mouse clicks
Signed-off-by: AKP <tom@tdpain.net>
This commit is contained in:
parent
ff63987689
commit
b65a148b60
1 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,10 @@ func (g *LaunchProgram) GetNameAndInstance() (string, string) {
|
|||
}
|
||||
|
||||
func (g *LaunchProgram) OnClick(event *i3bar.ClickEvent) bool {
|
||||
if event.Button != i3bar.LeftMouseButton {
|
||||
return false
|
||||
}
|
||||
|
||||
process, err := os.StartProcess(g.Executable, []string{g.Executable}, &os.ProcAttr{Files: []*os.File{os.Stdin, os.Stdout, os.Stderr}})
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("location", "launchProgram_onClick").Msg("Could not start process")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue