diff options
author | dakkar <dakkar@thenautilus.net> | 2009-08-13 21:37:24 +0200 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2009-08-13 21:37:24 +0200 |
commit | 3e90bbfaec0953f2ef74fa2827ac41678ee11dee (patch) | |
tree | 250eeabe93487d458172f3c61a08d646c021e2fc /FvwmNotify.pm | |
download | fvwm-crystal-3e90bbfaec0953f2ef74fa2827ac41678ee11dee.tar.gz fvwm-crystal-3e90bbfaec0953f2ef74fa2827ac41678ee11dee.tar.bz2 fvwm-crystal-3e90bbfaec0953f2ef74fa2827ac41678ee11dee.zip |
importing Crystal config into git
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; |