System Tray#
- class ignis.services.system_tray.SystemTrayService(*args: Any, **kwargs: Any)#
A system tray, where application icons are placed.
- 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))
- signal added#
Emitted when a new item is added.
- Parameters:
item (
SystemTrayItem) -- The instance of the system tray item.
- gproperty items: list[SystemTrayItem]#
read-only
A list of system tray items.
- class ignis.services.system_tray.SystemTrayItem(proxy: DBusProxy)#
A system tray item.
- signal removed#
Emitted when the item is removed.
- gproperty icon: str | GdkPixbuf.Pixbuf | None#
read-only
The icon name or a
GdkPixbuf.Pixbuf.
read-only
Whether the item has a menu.
read-only
A
DBusMenuorNone.Hint
To display the menu, add it to a container, and call the
.popup()method on it.Warning
If you want to add
menuto 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()
- gproperty tooltip: str | None#
read-only
A tooltip, the text should be displayed when you hover cursor over the icon.
- activate(x: int = 0, y: int = 0) None#
Activate the application. Usually this causes an application window to appear.
- async activate_async(x: int = 0, y: int = 0) None#
Asynchronous version of
activate().
- secondary_activate(x: int = 0, y: int = 0) None#
Activate a secondary and less important action compared to
activate().
- async secondary_activate_async(x: int = 0, y: int = 0) None#
Asynchronous version of
secondary_activate().
Ask the item to show a context menu.
Asynchronous version of
context_menu().
- scroll(delta: int = 0, orientation: Literal['horizontal', 'vertical'] = 'horizontal') None#
Ask for a scroll action.