scratchpad

Mouse binding in debian

I've recently started migrating from OS X to Debian testing branch with gnome3 for development work. The zoom and show-all-windows buttons on my Logitech Performance MX mouse aren't bound to anything by default, and Logitech doesn't provide drivers, so I had to figure out how to do it myself. Packages used:

sudo apt-get install xbindkeys wmctrl xautomation terminator

xbindkeys was used to bind these commands, and blocks of code go in ~/.xbindkeysrc. Sidenote for xbindkeys: the daemon that runs doesn't refresh the source file by itself, so killall xbindkeys; xbindkeys when you make changes.

Switch to or open new terminal

This binds the zoom button (b:13) to open the terminal, and requires the wmctrl package:

#logitech performance mx "zoom" -> terminal
#this switches to the first terminator instance, or spawns a new one
"/usr/local/bin/terminator"
b:13

/usr/loca/bin/terminator will switch to a running instance of terminator, my new terminal emulator of choice, or launch a new instance if it can't find it:

Show all windows

This one was bound to the show all windows button (b:10), and requires xte, found in the xautomation package. It's a tad cludgey, actually emulating the super key, which in gnome3 brings up an exposé-esque view of all open windows like in OS X. Because of how xte doesn't unbind the normal click of the key, and gnome3 won't bring up the activities view while clicking, it must be bound to the release of the button rather than just the button.