Ever in Flux My mind...flash-filtered for smooth consumption

14Oct/09Off

Now Playing Notification using ncmpcpp, libnotify and Gnome

I missed the functionality of a Mac OS X application and through the a mix of LinuxJournal's tip for using at with libnotify, some tinkering and assignment to <Mod4+F5>, ncmpcpp and this code:

notify-send -i audio-x-generic "Now Playing" "$(ncmpcpp --now-playing '?? %t    ??^M^M?? %a ??^M^M ?? %b ??')"

EDIT: Crikey!  The above code was pasted from vim in a terminal, so the ^M's are actually the following keystrokes: <ctrl-v><ctrl-m>.  It's to get the linebreak needed to separate the track, artist and album so nicely.

I get the following via libnotify when I press the "Windows" key and F5:

Soon, I'm going to learn how to modify libnotify themes and make a better one, but for now this will suit me just fine.

Posted by Bean

Tagged as: Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.

Bear