aboutsummaryrefslogtreecommitdiff
path: root/FvwmNotify.pm
blob: 50925407f5762fa36f2e2d92f6b1bb49c5dce8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;