when-command icon indicating copy to clipboard operation
when-command copied to clipboard

System tray menu not showing on Debian 12

Open almostearthling opened this issue 1 year ago • 2 comments

On Linux (namely on Debian 12) the when start command correctly loads, starts the underlying whenever instance, and displays the system tray icon. However when the icon is right-clicked, no menus are shown and no interaction is possible with the application.

almostearthling avatar Jul 04 '24 22:07 almostearthling

As per pystray documentation this is the behaviour of the Xorg backend, which is enabled when the appindicator and gtk backends fail. However, also making the system site-packages directories available in the module path does not fix the problem: when both python3-gi and libayatana-appindicator3-1 are made available to pystray, no tray icon is shown at all.

almostearthling avatar Jul 07 '24 15:07 almostearthling

Since (most unfortunately) GNOME deprecates indicators, probably the solution is to make the application available as a background application on Linux when the AppIndicator protocol is not supported. The Linux background application should:

  • activate a DBus interface that listens for commands
  • recall the configuration box from the running instance when the when config command is issued on the command line
  • recall the history box from the running instance when the when history command is issued similarly
  • stop the scheduler and the wrapper application when the when stop command is issued.

Looks a bit overcomplicated for a desktop app, but apparently the GNOME designers like this kind of stuff.

almostearthling avatar Jul 08 '24 08:07 almostearthling

The problem is mitigated by making a menu form available on platforms that do not support the system tray menu.

almostearthling avatar Jan 18 '25 21:01 almostearthling