System Tray#

class ignis.services.system_tray.SystemTrayService(*args: Any, **kwargs: Any)#

A system tray, where application icons are placed.

Signals:
Properties:
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 the copy() 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 a GdkPixbuf.Pixbuf.

  • item_is_menu (bool, read-only): Whether the item has a menu.

  • menu (DBusMenu | None, read-only): A DBusMenu or None. Add it to a container, and call the popup() method on it to display the menu.

  • tooltip (str, read-only): Tooltip, the text should be displayed when you hover cursor over the icon.