module/tray: init

Introduce new module implementing the status notifier
spec (https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/). The
core dbus logic and spec implementation is from
swaybar (https://github.com/swaywm/sway/tree/master/swaybar/tray), with
rendering stripped out and a switch to tllist. The dbus loop is async and not
re-entrant so the module lock is taken each time we process a message (and when
we process content). To reduce memory usage the icon pixmaps are immutable and
reference counted. So they can be passed between the module and the
particles (through tags) without copying.

Work to be done in future diffs:
1. Tray interactivity/menu support
2. Support KDE search paths for the tray.  Can it be implemented with yml
   scripting?
This commit is contained in:
Jordan Isaacs 2023-11-13 23:27:18 -08:00
parent 6113f9b94e
commit df08456d08
No known key found for this signature in database
GPG key ID: 98983D44651F8116
6 changed files with 1248 additions and 0 deletions

View file

@ -81,6 +81,9 @@ EXTERN_MODULE(river);
#if defined(HAVE_PLUGIN_script)
EXTERN_MODULE(script);
#endif
#if defined(HAVE_PLUGIN_tray)
EXTERN_MODULE(tray);
#endif
#if defined(HAVE_PLUGIN_sway_xkb)
EXTERN_MODULE(sway_xkb);
#endif
@ -215,6 +218,9 @@ static void __attribute__((constructor)) init(void)
#if defined(HAVE_PLUGIN_sway_xkb)
REGISTER_CORE_MODULE(sway-xkb, sway_xkb);
#endif
#if defined(HAVE_PLUGIN_tray)
REGISTER_CORE_MODULE(tray, tray);
#endif
#if defined(HAVE_PLUGIN_xkb)
REGISTER_CORE_MODULE(xkb, xkb);
#endif