Skip to content

Commit

Permalink
add ignore-mouse hack
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenkov committed Apr 8, 2024
1 parent f625c1f commit 31ce440
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion workswitch/workswitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ func (s State) Save() error {
func (s State) Activate() {
setInputLanguage(s.InputLanguage)
setTouchpadOff(s.TouchpadOff)
setMouseLocation(s.MouseLocationX, s.MouseLocationY)

data, err := os.ReadFile(os.ExpandEnv("$HOME/.config/workswitch/ignore-mouse"))
if err != nil {
log.Fatal(err)
}
if strings.Trim(string(data), "\n") != "1" {
setMouseLocation(s.MouseLocationX, s.MouseLocationY)
}
}

func findJson(workspace int) string {
Expand Down

0 comments on commit 31ce440

Please sign in to comment.