Skip to content

jcmuller/pianobar-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pianobar-notify

This utility is called from pianobar. When the status changes, a notification using the Desktop notification system is displayed. It has only been tested in Linux, using the Desktop notification system implemented by the Galago project.

My pianobar config file (~/.config/pianobar/config) includes

event_command = pianobar-notify

To install this app, for the time being, copy or soft-link src/pianobar-notify to ~/bin or a directory in your path.

Required modules:

Run the requirement check script (which requires Test::More) by running:

perl src/check-requirements.pl

I had to add a missing feature to Desktop::Notify::Notification. The patch is:

--- a/blib/lib/Desktop/Notify/Notification.pm   2009-12-24 20:09:23.000000000 -0500
+++ b/blib/lib/Desktop/Notify/Notification.pm   2010-11-17 17:51:45.000000000 -0500
@@ -5,7 +5,7 @@
 
 use base qw/Class::Accessor/;
 
-Desktop::Notify::Notification->mk_accessors(qw/summary body timeout/);
+Desktop::Notify::Notification->mk_accessors(qw/summary body timeout app_icon/);
 
 =head1 NAME
 
@@ -78,7 +78,7 @@
         $self->{id} = $self->{server}->{notify}
                 ->Notify($self->{server}->{app_name},
                                  $self->{id} || 0,
-                 '',
+                 $self->{app_icon} || '',
                                  $self->{summary},
                                  $self->{body},
                                  [],

which basically adds an accessor for app_icon and sends app_icon to the server.

I have a call to _show_in_awesome from the _display method. If you are not using Awesome, or don't have musiccover defined in your rc.lua ($HOME/.config/awesome/rc.lua), comment out the line in _display that calls it (currently 144, but it will change).

The commented out section should look like:

# $self->_show_in_awesome(...);

About

Render desktop notifications with pianobar information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages