A decent systray in notionwm
NotionWM may be old, but it’s still a very decent window manager with a window management unseen by any other window manager out there.
One part where it shows its age is the systray integration. There is a systray, but it only works reliably with kde-protocol tray icons.
However, there’s a cure for the lack of systray support: stalonetray.
Prepare NotionWM
I have this in my .notion/cfg_statusbar.cfg
mod_statusbar.create { screen=0, pos='br', fullsize=true, systray=true, template="%workspace_pager %filler %systray % %shellbar %date", }
You should have something similiar in your setup already. The important part is that the %systray bit is in the template.
Also, in .notion/cfg_notion.lua
you should see dopath("mod_statusbar")
somewhere.
Now let’s open .notion/cfg_kludges.cfg
and add this block to it:
defwinprop { class = "stalonetray", instance = "stalonetray", statusbar = "systray", }
This will send stalonetray to systray when it is started.
Setup Stalonetray
Well, first install it. Your package manager should have it.
Then create .stalonetrayrc
in your home directory and add
these entries:
icon_size 16 geometry 1x6 background "#121212" grow_gravity W icon_gravity E parent_bg true
How to set this up depends on where you’ve placed your status bar. Mine is at the bottom of the screen and I want systray icons to be placed from right to left. Adjust gravity accordingly.
The geometry
and icon_size
should fit the statusbar height and
should provide enough width for all your icons to fit in. Note that the
geometry are icon slots. So 6x1 makes space for 6 icons width and 1 icon
high.
You can set a background
or set parent_bg
to true
which
essentially makes stalonetray transparent.
And last step is to actually start stalonetray. I’m doing this from my
.xsession
file:
... stalonetray & ... /usr/local/bin/notion
Now start pidgin (gtk) and qtpass (qt) and both icons should piecefully show up next to each other.