File: notification.pl

package info (click to toggle)
libnet-dbus-perl 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 720 kB
  • sloc: perl: 4,919; sh: 34; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 516 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use Net::DBus qw(:typing);


my $bus = Net::DBus->session;

my $svc = $bus->get_service("org.freedesktop.Notifications");
my $obj = $svc->get_object("/org/freedesktop/Notifications");

$obj->Notify("notification.pl",
	     0,
	     '',
	     "Demo notification",
	     "Demonstrating using of desktop\n" .
	     "notifications from Net::DBus\n",
	     ["done", "Done"],
	     {"desktop-entry" => "virt-manager", x => dbus_variant(dbus_int32(200)), y => dbus_variant(dbus_int32(200))},
	     2_000);