Search code examples
awesome-wm

How to overlay text on to an awesomewm widget?


Over the years I've used conky for most of this stuff, and I currently have a conky-only bottom bar for this purpose. I'm trying to rewrite parts/all of it in awesomewm, but I'm hung up on one thing.

With conky it's trivial to overlay text on something else (normally a graph), just by getting a new line and doing a voffset.

awesomewm, obviously, has a different paradigm. Is there any core (v4) way to achieve the same effect of text overlaying a graph/progressbar? So for example a graph of CPU activity with an overlay showing cpu_p or something similar?


Solution

  • It's trivial an Awesome 4.0+ too, you need to use a wibox.layout.stack to place a wibox.widget.textbox on top of the wibox.widget.graph. See the first example in the progressbar documentation:

    https://awesomewm.org/apidoc/widgets/wibox.widget.progressbar.html