Wednesday, June 2, 2010

Gnome and Aqualung keyboard shortcuts

Aqualung doesn't integrate into Gnome directly as far as keyboard shortcuts go.  What I want is to be able to press a key sequence and toggle pause and play.  It turns out to be pretty easy:

First, start Aqualung and make sure the pause and play buttons are combined.  There is a check box under Settings/General to combine them.

Then adjust Gnome:
1. Open gconf-editor
2. Drill down to apps/metacity/keybinding_commands
3. Double click on an empty command and enter:
aqualung -N0 --play
That is a zero.
4. Remember your command number, then go to apps/metacity/global_keybindings
5. Find the run_command that has the same number as your command number, then double click on it.
6. Type in the key sequence that you want for pause/play.  I used 

That's it.  

Update 26 May 2011: I've switched to using KDE rather than Gnome. Here's how to set up the same keyboard shortcut in KDE:

  1. Open the System Settings. On my installation, I click the "K", then Settings, then System Settings.
  2. Choose "Shortcuts and Gestures" from the Common Appearance and Behavior section.
  3. Select Custom Shortcuts.
  4. Click the Edit button (towards the bottom), then New, Global Shortcut, Command/URL.
  5. Enter a name for the new action, I used "Aqualung Pause/Play".
  6. On the Trigger tab, enter Ctrl+Alt+P by pressing those 3 buttons.
  7. On the Action tab, enter aqualung -N0 --play for the command.
  8. Click the Apply button at the bottom.
That's it.

Update 28 June 2011: I've dumped KDE and am now using Xubuntu. Here's how to set up the same keyboard shortcut for XFCE:

  1. Open the Settings Manager. On my installation, I click the gear in the panel, then Settings, then Settings Manager.
  2. Choose "Keyboard".
  3. Select the "Applications Shortcuts" tab.
  4. Click the "Add" button.
  5. Enter aqualung -N0 --play for the command, click the "OK" button.
  6. Press Ctrl+Alt+p.
That's it. 

Update 15 Dec 2011: I'm still using Xubuntu, but somewhere along the way something changed. For step 5 above, use this for the command:

aqualung -N0 --pause

No comments: