From 3e90bbfaec0953f2ef74fa2827ac41678ee11dee Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 13 Aug 2009 21:37:24 +0200 Subject: importing Crystal config into git --- FvwmNotify.pm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 FvwmNotify.pm (limited to 'FvwmNotify.pm') 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; -- cgit v1.2.3