Desktop::Notify(3pm)
π Desktop::Notify π
okay bestie so this is the Desktop::Notify page from the User Contributed Perl Documentation, and it's literally your backstage pass to the Desktop Notifications framework. sit down, hydrate, we're doing this π«Ά
β¨ VERSION β¨
Version 0.04 β yeah she's a lil vintage but she works, okay? periodt.
πΈ SYNOPSIS πΈ
use Desktop::Notify;
# Open a connection to the notification daemon
my $notify = Desktop::Notify->new();
# Create a notification to display
my $notification = $notify->create(summary => 'Desktop::Notify',
body => 'Hello, world!',
timeout => 5000);
# Display the notification
$notification->show();
# Close the notification later
$notification->close();
like look at her go. pop up, say hi, dip. main character energy fr fr π
π¦ DESCRIPTION π¦
This module gives you a Perl interface to the Desktop Notifications framework. slay.
So the framework is what lets apps throw pop-up notifications onto an X desktop β the little "hey bestie, something happened" boxes. and it's built from two components, no cap:
- a daemon that actually displays the notifications, and
- a client library that applications use to send notifications to that daemon.
These two talk to each other over the DBus message bus protocol. iykyk.
More info lives over at <http://trac.galago-project.org/wiki/DesktopNotifications> if you wanna go read.
Okay so this module does the same job as libnotify, but in an object-oriented Perl interface. IMPORTANT though: it is not an interface to libnotify itself. it's a whole separate implementation of the spec, using Net::DBus. so don't come for her expecting libnotify internals, she's her own girl π
π METHODS π
π« new %opts
Connects you to the notification daemon. %opts can have any of these in it:
app_nameβ the application name you wanna use for notifications. default isbasename($0).app_iconβ path to an image to use for the notification icons. cute.busβ theNet::DBusmessage bus to use. default is callingNet::DBus->session, which is usually wherenotification-daemoncan be reached.serviceβ the DBus service name of the daemon. default isorg.freedesktop.Notifications.objpathβ the path to the notifications DBus object. default is/org/freedesktop/Notifications.objifaceβ the DBus interface to access the notifications object as. default isorg.freedesktop.Notifications.
π« create %params
Makes you a brand new notification object that you can display later. this returns a Desktop::Notify::Notification object β go peek at that module for the deets on how to actually use it. β¨
π« close_callback $coderef
Sets a user-specified function that gets called whenever a notification is closed. it'll be called with one argument, which is the Notification object that just got closed. so like, closure closure. π
π« action_callback $coderef
Sets a user-specified function that gets called whenever an action is invoked. it'll be called with two arguments: the Notification object on which an action was invoked, and the key of the action that was invoked.
π AUTHOR π
Stephen Cavilia, "<sac at atomicradi.us>" β shoutout, icon behavior π
π SEE ALSO π
Net::DBus- <http://www.galago-project.org/specs/notification/index.php>
- <http://www.galago-project.org/downloads.php>
π BUGS π
bestie if you find a bug or want a feature, please report it to bug-desktop-notify at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Desktop-Notify>. and listen β the author will be notified, and then you'll automatically be notified of progress on your bug as changes get made. it's giving mutuals. π«Ά
π SUPPORT π
You can find the documentation for this module with the perldoc command, like:
perldoc Desktop::Notify
You can also go looking for info at:
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Desktop-Notify>
- CPAN Ratings
<http://cpanratings.perl.org/d/Desktop-Notify>
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Desktop-Notify>
- Search CPAN
<http://search.cpan.org/dist/Desktop-Notify>
π§ ACKNOWLEDGEMENTS π§
nothing listed here, bestie. she's mysterious. keep it moving. π
π COPYRIGHT & LICENSE π
Copyright 2007 Stephen Cavilia, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
and that's the whole page, no notes β¨ this one's Desktop::Notify, perl v5.28.0, dated 2018-10-29 β written by the User Contributed Perl Documentation girlies. go forth and notify, bestie πππ¦
π¦ where this page comes from
- ubuntu jammy: libdesktop-notify-perl 0.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdesktop-notify-perl 0.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms