TrayIcon(3)
π Gtk2::TrayIcon β TrayIcon(3) π
okay so bestie, welcome to the TrayIcon(3) page, straight out of the User Contributed Perl Documentation collection. sit down, grab a strawberry π, because this one is a whole journey β and I mean that in the "the vibes are complicated" way, not the "slay" way. no cap.
β¨ NAME β¨
Gtk2::TrayIcon β (DEPRECATED) Perl interface to the EggTrayIcon library
yeah. DEPRECATED. right there in the name. we'll get into it. π
β¨ SYNOPSIS β¨
here's the whole vibe in code form, verbatim, don't touch a single character:
use Gtk2::TrayIcon;
Gtk2->init;
my $icon= Gtk2::TrayIcon->new("test");
my $label= Gtk2::Label->new("test");
$icon->add($label);
$icon->show_all;
Gtk2->main;
make a tray icon, slap a label on it, show it, run the main loop. iconic behavior, honestly. π
β¨ ABSTRACT β¨
DEPRECATED β this module lets a Perl developer embed an arbitrary widget in a System Tray, like the Gnome notification area. that's the dream. that's the whole point of her existence. π
β¨ DESCRIPTION β¨
NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
okay so this is the part where I have to be real with you. π
This module has been deprecated by the Gtk-Perl project. and what that means, fr fr, is:
- it will no longer be updated with security patches
- no bug fixes
- no updates when changes are made in the Perl ABI
the Git repo for this module has been archived (made read-only), and it will no longer be possible to submit new commits to it. bestie it's giving "frozen in amber." π¦
you're more than welcome to ask about this module on the Gtk-Perl mailing list, but the priorities going forward are maintaining Gtk-Perl modules that are supported and maintained upstream β and this module is neither.
since this module is licensed under the LGPL v2.1, you may also fork it if you wish β but listen, there are conditions:
- you'll need to use a different name for it on CPAN
- the Gtk-Perl team requests that you use your own resources (mailing list, Git repos, bug trackers, etc.) to maintain your fork going forward
here's the whole info dump, laid out pretty:
- Perl URL:
https://gitlab.gnome.org/GNOME/perl-gtk2-trayicon - Upstream URL:
https://gitlab.gnome.org/GNOME/libegg - Last upstream version:
N/A - Last upstream release date:
2009-05-01 - Migration path for this module:
Gtk3::StatusIcon - Migration module URL:
https://metacpan.org/pod/Gtk3
NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
okay phew, back to the lore. π
EggTrayIcon is slated for inclusion in Gtk+ at some point β which is literally the whole reason it lives in the Gtk2::TrayIcon namespace. and like all egg libs, EggTrayIcon is not considered api stable and it's not installed as a shared object. so. that's the situation. π
enough about what it is not, though. Gtk2::TrayIcon is first and foremost a simple way of giving a Gtk2 script access to the system tray. periodt.
System Trays are found in both KDE and Gnome β but heads up, neither supports the spec fully (see below π).
and one more thing: Gtk2::TrayIcon is a subclass of Gtk2::Plug and should be used as such. iykyk. π«Ά
β¨ METHODS β¨
5 methods are available. (yes bestie, she says 5 and then lists four β we don't make the rules, we just report them π)
$trayicon= Gtk2::TrayIcon->new_from_screen($screen, $name)β creates a widget that's already connected to the notification area of$screen. and$screenshould be aGtk::Gdk::Screen. π₯οΈ$trayicon= Gtk2::TrayIcon->new($name)β likenew_from_screen, but it uses the default screen of the active display instead. easy mode. β¨$msgid= $trayicon->send_message($timeout, $message)β asks the tray to display$messagefor$timeoutmilliseconds. if$timeoutis0, the message will not expire. β³- > heads up: it is up to the tray to decide what to do with the message β both Gnome and KDE just ignore it. π
$trayicon->cancel_message($msgid)β asks the tray to cancel the message. that's it. that's the method. πΈ
β¨ SEE ALSO β¨
Glib, Gtk2, and The System Tray Spec at http://www.freedesktop.org/Standards/systemtray-spec. π
β¨ AUTHOR β¨
Christian Borup <gtk2-perl at borup dot com> π
β¨ COPYRIGHT AND LICENSE β¨
Copyright 2003 by the gtk2-perl team.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. see the GNU Library General Public License for more details. π€
You should have received a copy of the GNU Library General Public License along with this library; if not, see <https://www.gnu.org/licenses/>.
and that's the page, bestie!! π this was perl v5.42.0, dated 2025-07-25, and it's the TrayIcon(3) manual page. go forth, migrate to Gtk3::StatusIcon, and stay iconic. πβ¨π¦πΈ
π¦ where this page comes from
- fedora 43: perl-Gtk2-TrayIcon 0.07-18.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms