System Tray#
- class ignis.services.system_tray.SystemTrayService(*args: Any, **kwargs: Any)#
A system tray, where application icons are placed.
- Signals:
"added" (
SystemTrayItem
): Emitted when a new item is added.
- Properties:
items (list[
SystemTrayItem
], read-only): A list of items.
- Raises:
AnotherSystemTrayRunningError -- If another system tray is already running.
Example usage:
from ignis.services.system_tray import SystemTrayService system_tray = SystemTrayService.get_default() system_tray.connect("added", lambda x, item: print(item.title))
- class ignis.services.system_tray.SystemTrayItem(*args: Any, **kwargs: Any)#
System tray item.
Warning
If you want to add
menu
to several containers (e.g., make two status bars with a system tray), you must call thecopy()
method to obtain a copy of the menu. This is necessary because you can't add a single widget to multiple containers.menu = item.menu.copy()
- Signals:
"removed" (): Emitted when the item is removed.
- Properties:
id (
str
, read-only): The ID of the item.category (
str
, read-only): The category of the item.title (
str
, read-only): The title of the item.status (
str
, read-only): The status of the item.window_id (
int
, read-only): The window ID.icon (
str | GdkPixbuf.Pixbuf | None
, read-only): The icon name or aGdkPixbuf.Pixbuf
.item_is_menu (
bool
, read-only): Whether the item has a menu.menu (
DBusMenu | None
, read-only): ADBusMenu
orNone
. Add it to a container, and call thepopup()
method on it to display the menu.tooltip (
str
, read-only): Tooltip, the text should be displayed when you hover cursor over the icon.