Desktop::Notify(3pm)

πŸ“¦
version 0.05 Β· 3 versions
, in ubuntu jammy, ubuntu noble

πŸ’– 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 is basename($0).
  • app_icon β€” path to an image to use for the notification icons. cute.
  • bus β€” the Net::DBus message bus to use. default is calling Net::DBus->session, which is usually where notification-daemon can be reached.
  • service β€” the DBus service name of the daemon. default is org.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 is org.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 🌈


πŸ’€ 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 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