Doesn't work on arch linux Hyprland
Failed to dock icon Traceback (most recent call last): File "/home/sullivan/Documents/theany-org/trackit/.venv/lib/python3.13/site-packages/pystray/_xorg.py", line 162, in _update_icon self._assert_docked() ~~~~~~~~~~~~~~~~~~~^^ File "/home/sullivan/Documents/theany-org/trackit/.venv/lib/python3.13/site-packages/pystray/_xorg.py", line 395, in _assert_docked assert self._systray_manager ^^^^^^^^^^^^^^^^^^^^^ AssertionError Failed to dock icon Traceback (most recent call last): File "/home/sullivan/Documents/theany-org/trackit/.venv/lib/python3.13/site-packages/pystray/_xorg.py", line 143, in _show self._assert_docked() ~~~~~~~~~~~~~~~~~~~^^ File "/home/sullivan/Documents/theany-org/trackit/.venv/lib/python3.13/site-packages/pystray/_xorg.py", line 395, in _assert_docked assert self._systray_manager ^^^^^^^^^^^^^^^^^^^^^ AssertionError
System Information: System name: Linux Release: 6.15.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 24 Jul 2025 18:18:11 +0000
~/: hyprctl version Hyprland 0.50.1 built from branch at commit 4e242d086e20b32951fdc0ebcbfb4d41b5be8dcc ([gha] Nix: update inputs). Date: Sat Jul 19 21:37:06 2025 Tag: v0.50.1, commits: 6291 built against: aquamarine 0.9.2 hyprlang 0.6.3 hyprutils 0.8.1 hyprcursor 0.1.12 hyprgraphics 0.1.5
In order to get it to work on hyprland you need to have the python package PyGObject installed.
(This is also mentioned in the docs)
I tested it with hyprpanel/waybar, and it's most likely the same with other bars.
If PyGObject is not installed, it detects it is on Linux, and then:
- tries the appindicator backend, which silently fails because "gi" (go introspection) from pygobject does not exist
- tries the gtk backend, which fails for the same reason
- falls back to xorg, which is not running
So just add "pygobject" to your dependencies.
This also requires either libappindicator-gtk3 or libayatana-appindicator installed on your system, but you may already have one of them installed from other apps that have a tray icon.