Hotkeys for Linux

It took me awhile to figure out how to get useful hotkeys on Linux without depending on the particular window manager I’m using, so I’ll just drop a note here. I currently use Xubuntu, which defaults to XFCE, but I may run Gnome or KDE from time to time, so I’d prefer not to relearn a new hotkey management system.

I discovered two complementary applications: wmctrl and xbindkeys.

xbindkeys is more traditional; it runs in the background and maintains a mapping of key combinations to programs. Hit the key combination and the program runs. I use it to run my most common applications: typically my browser du jour and a console.

wmctrl modifies the characterstics of existing windows, e.g. minimize, resize. I use xbindkeys to map key combinations to invocations of wmctrl to achieve a couple effects: keystroke to toggle the current window between maximized and not, and a key combination to set the size of the current window to a fixed value. This saves me time during the unavoidable resizing of my browser window for various sites that fit better for different sizes.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.