#!/usr/bin/perl
# vi: ts=4 sw=4
use Net::DBus;
use strict;
use warnings;
our $VERSION = 0.01;
# Use session bus
my $sessionBus = Net::DBus->session;
# Use notifications object
my $notificationsService = $sessionBus->get_service('org.freedesktop.Notifications');
my $notificationsObject = $notificationsService->get_object('/org/freedesktop/Notifications', 'org.freedesktop.Notifications');
my $notificationId;
# Sample empty notification
$notificationId = $notificationsObject->Notify(shift, 0, '', 'Sample summary', 'Sample body', [], {}, -1);
# Sample notification with actions and hints
$notificationId = $notificationsObject->Notify(shift, 0, '', 'Sample summary', 'Sample body', [sample => 'Sample action'], {x => 100, y => 100}, -1);