You are not logged in.

#1 2020-03-17 17:32:39

Steef435
Member
Registered: 2013-08-29
Posts: 563
Website

snixembed - proxy StatusNotifierItems as XEmbedded systemtray icons

With the release of electron 10, support for the systemtray icon spec was deliberately dropped in favour of StatusNotifierItem, making the tray icons from e.g. riot-desktop not show up on my patched dwm bar. I slapped together a proxy of sorts that talks a sliver¹ of SNI and creates icons using the systemtray icon spec (using deprecated GtkStatusIcon).

Usage: run "snixembed --fork"² from your .xinitrc or similar.

Code and more info: https://git.sr.ht/~steef/snixembed
PKGBUILD: https://aur.archlinux.org/packages/snixembed-git

I'm currently using it for riot-desktop and signal-desktop without issue.

A word of warning: since libappindicator seems to just assume the service talks AppIndicator instead of SNI (and I honestly can't find a specification for AppIndicator), applications relying on that may not show a tray icon or even crash snixembed. Exporting XDG_CURRENT_SESSION=KDE and KDE_SESSION_VERSION=5 seems to help in the case of telegram-desktop.

I'd be happy to hear if anyone ends up using, breaking, or improving it!
Steef

¹ So far I basically only implemented what I need, and it will most likely crash on everything else.
² This will exit once the forked service is set up, this is useful since electron apps usually (wrongly) only check for its availability on startup and then silently fail if it's not there.

EDIT: Just released 0.2.0: snixembed now supports probably everything SNI you'll find in the wild (icons by pixmap or name, tooltips, context menus, activation) and in particular it now supports everything QSystemTrayIcon does, so running snixembed won't break your Qt applications now (thanks to zoof for reporting and testing). It still doesn't fly with libappindicator though (in my eyes it's their fault, but I plan to look into supporting their protocol since it's in use).

Last edited by Steef435 (2020-04-01 15:39:58)

Offline

Board footer

Powered by FluxBB