Turn a script into a tray icon with a menu.
Implements StatusNotifierItem.
- Write a config file that represents a menu. (See
sni-menu.conf.example.) - Run
sni-menu <conf>. Make it a service if you want.
- Write a script to dynamically generate the config. (See
examples/.) - Specifically, fork an
sni-menuprocess and send it a HUP signal to make it reload config. (Seeexamples/weather.sh.) - Menu items can communicate back to controller script via any IPC (signals,
files, sockets, etc). (See
examples/click_count.sh.)
The only requirements are libc and libdbus-1.
$ sudo apt install build-essential pkg-config libdbus-1-dev
$ make