I tried to make mere windows more useful by making them to output more
useful content in place of window name. One existing example is gentoo
emerge, which prints status in number of emerged packages with system
load.
In attachements - more such apps with same indication, which I could
call taskbar indicator (could be window indicator). There are two
implementations for indicator itself, which I made to work with
existing window.
- taskbar-applet-term
works in terminal emulator, writing text to status line (tsl, fsl
caps). SL display seems only supported in graphical terms like xterm,
st, alacritty, etc; tmux SL is just passed to outer term without being
used for its own tabs. This is used by all attached applets besides
osmo (osmo uses x11 variant). Most of them use existing tui apps,
mostly with ncurses (only weather runs own loop using wttr.in).
- taskbar-applet-x11
Starts gui app, finds its window by pid (it _NET_WM_PID is set) and
sets text for it via xprop. Good if app itself doesn't rewrite title at
random (though I know, this could be detected in the even-driven style).
I guess, this way allowes to implement some ayatana features. What I
could note - it's much more elementary than ayatana:
- only one function, to show/hide window.
- with special coding this window could implement menu with any desired
features, like hide on focus (as all popup menus) or some internal
action. Both for term and x11 variants (don't know about dmenu, but
rofi has -normal-window, which should allow it to have proper
behavior).
- unfortunally, no custom functions for taskbar entry, which means that
e.g. mouse scroll over "applet" is imposible - all should be done at
least via already described popup menu implementation.
- Would be great if panel supported per tab individual width, to occupy
minimum space like all existing indicators (I have feeling, I tried
such long time ago, but now I'm unable to remember, what).
Screenshot with mixer applet is also attached. Althoug I did it with
floating window model in mind, should be no problem to adapt for any
window control model.
Received on Wed Jul 07 2021 - 19:37:51 CEST