Monday, May 3, 2010

Rhythmbox Notification - Currently Playing Song

I have been using Ubuntu for several years now, and love it. I have come across countless tidbits of useful information online that have saved hours of my life. I intend to use this blog as platform to document little tips and tricks that I have found useful. Today I will start with one of the simplest customisations for Ubuntu, suitable for the most novice of users.

Rhythmbox Notification on Key Press in Ubuntu 10.04 Lucid Lynx



I constantly listen to music while I am at my computer. And I'm lazy. So now, when a song is playing, and I want to know the name, artist, and album, I can click a single button on my keyboard, and I get the notification displayed above for several seconds.

Instructions

1. Select System -> Preferences -> Keyboard Shortcuts


2. Click Add.

3. Give the shortcut a name (e.g. 'Show Current Song').

4. In the Command field, type 'rhythmbox-client --notify' (without the quotation marks).

5. Click Apply.

6. Click the newly created shortcut shortcut (currently 'Disabled'),and click the keyboard combination you want to trigger the notification. I have used the Pause/Break key, simply because it is near my media controls and my keyboard, and I have no other use for it. The final result should appear somewhat like the image below. Play a song in Rhythmbox, and try out your new keyboard shortcut!


[Note: If Rhythmbox is not open when the action is triggered, it will open the media player, and not play a song.]

Hopefully this will give you a simple introduction to the keyboard shortcuts in Ubuntu. Any terminal command can be bound to a key combination. For more Rhythmbox commands, type 'rhythmbox-client --help' in a terminal. For example, you could bind ctrl+shift+5 to 'rhythmbox-client --set-rating 5' to set the current song rating to 5 stars.