Linux – Map workspace switch to mouse buttons in cinnamon

cinnamonlinux-mintworkspaces

I want to set up cinnamon to switch workspaces right and left when I press my mouse scroll wheel clicker right or left, but I don't see an option in the cinnamon settings. Is there any way to accomplish this?

Best Answer

[I think this is most appropriate to list as a separate answer, 2.5 years later]

It is possible to do this with the assistance of xbindkeys.

Install (#apt-get install xbindkeys), and then add this to the bottom of ~/.xbindkeysrc:

# Previous desktop
"dbus-send --session --type=method_call --dest=org.Cinnamon /org/Cinnamon org.Cinnamon.switchWorkspaceLeft"
  b:6

# Next desktop
"dbus-send --session --type=method_call --dest=org.Cinnamon /org/Cinnamon org.Cinnamon.switchWorkspaceRight"
  b:7

(b:6 and b:7 are respectively the left and right rocker buttons on my mousewheel -- ymmv; use xev to work out the correct indices).

xbindkeys should reload its own configuration automatically, but you may need to force it with killall -HUP xbindkeys. You may also need to log out and in again after installing it for the first time.

Related Question