diff options
Diffstat (limited to 'FvwmNotify.pm')
-rw-r--r-- | FvwmNotify.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/FvwmNotify.pm b/FvwmNotify.pm new file mode 100644 index 0000000..5092540 --- /dev/null +++ b/FvwmNotify.pm @@ -0,0 +1,20 @@ +package FvwmNotify; +use strict; +use warnings; +use Net::DBus; + +my $bus=Net::DBus->session(); +my $notify=$bus->get_service('org.freedesktop.Notifications') + ->get_object('/org/freedesktop/Notifications', + 'org.freedesktop.Notifications'); + +sub notify { + my ($app,$summary,$text,$delay,$iconfile)=@_; + $notify->Notify($app,0, + (defined $iconfile ? "file://$iconfile" : ''), + $summary, + $text, + [],{},$delay); +} + +1; |