Skip to content

Instantly share code, notes, and snippets.

@HosseyNJF
Created February 7, 2021 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HosseyNJF/4ad600922e295b6f30a2c6ed81657679 to your computer and use it in GitHub Desktop.
Save HosseyNJF/4ad600922e295b6f30a2c6ed81657679 to your computer and use it in GitHub Desktop.
Ever wanted to switch workspaces with the buttons on the side of your mouse in Gnome? Here you are!
"wmctrl -s $(( $(xdotool get_desktop) - 1 ))"
b:9
"wmctrl -s $(( $(xdotool get_desktop) + 1 ))"
b:8
"wmctrl -r :ACTIVE: -t $(( $(xdotool get_desktop) - 1 )) && wmctrl -s $(( $(xdotool get_desktop) - 1 ))"
shift + b:9
"wmctrl -r :ACTIVE: -t $(( $(xdotool get_desktop) + 1 )) && wmctrl -s $(( $(xdotool get_desktop) + 1 ))"
shift + b:8

Copy the code below to this path: ~/.xbindkeysrc and run this command:

killall xbindkeys && xbindkeys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment