Upon launching QSyncthingTray without any panel/trayer running, it displays an error dialog:
I couldn't detect any system tray on this system.
[ OK ]
and exits upon pressing [ OK ].
Curiously though, if I have QSyncthingTray already running as a tray icon and kill my panel, QSyncthingTray doesn't quit, and upon restarting the panel QSyncthingTray is still there...
For my ~/.xsession & ~/.xinitrc startup, I'd like to add a looped check whether a tray is present, pseudocode:
loop:
if system-tray.is-available:
run QSyncthingTray
done
else sleep 1
How do I do the if system-tray.is-available?
The preferable language is Perl, also interested in Raku and POSIX sh.
Other languages are welcome as well.