Xbindkeys: Stopping, Editing & Restarting With wbar

by Daniel Meiß-Wilhelm (Leiche)

When you read the articles Get Slick With xbindkeys, and Wbar: A Mac OS-X Like Quick Launch Bar, you can get some tips about how you can use these two excellent programs in harmony.

I use xbindkeys now for all my shortcuts keys. I like to click only two keys to open Clementine, set my sleep timer to shutdown my notebook, or start Screenie to take a screen shot of my desktop.

One thing is, if you add a new shortcut, you must kill xbindkeys, and after you add your shortcut, restart xbindkeys in order to use the new shortcut.

Here comes wbar, which will help us to do this.

The new wbar version 2.1.1 comes included with the wbar config, and the icon looks like this:

Clicking on it, you get a new window:

To add a new icon starter, click on .

A new window, like that below, appears:

Type in the Title field the name of your new icon starter, such as the sample Tastenkürzel.

The command could be something like this:

killall xbindkeys | medit $HOME/.xbindkeysrc &&  xbindkeys

What does this command do?

killall xbindkeys stops xbindkeys. Now your shortcuts will be gone.

medit $HOME/.xbindkeysrc opens the hidden config file xbindkeysrc in your home directory.

As well as medit, you can use kwrite, gedit or whatever your editor of choice is.

&& xbindkeys will start xbindkeys, after we have stored and closed our editor.

Last, we need an icon. Without an icon, wbar will not display our new starter.

I use /usr/share/icons/gnome/48x48/apps/gnome-settings-keybindings.png

Save it, and click on reload to display the new icon starter.

If you click on this icon, xbindkeys will stop, and your specified editor will open the xbindkeysrc config file.

If you create a new shortcut, and close your editor, xbindkeys will work fine again, with a new key binding.

The only problem is that the command on the main window of wbar will display the wrong command. I don’t know why this happens, but it works.

Enjoy the new wbar.