Overlay Bar with Eww
I have been revamping and completing my configs this week and created this simple eww overlay bar in the process that I wanted to share.
While wob and xob do the same thing, they are pretty minimal for my taste.
Besides, Linux == "modularity" && Linux == "choice" and I hadn’t tried eww, hence this small attempt.
The eww part is self explanatory so you can just grab it below. However closing the opened eww window requires a wrapper script since eww doesn’t have timeouts.
Here’s what we do:
- We keep track of how many times the script is invoked. Thanks to
ewwrunning as a daemon,ewwvars can help us here. - If the script is successful, we increment the counter by
1. - We then sleep/wait for the amount of time we want the overlay bar to stay open. Say, for example, 1 second.
- We then decrement the counter value by
1. - If there are no additional invocations in between that one second, the counter value returns to
0. This is when we close the bar, ensuring that the bar is closed only after the last invocation.
And we just got ourselves an overlay bar that can be styled as you want.

sample overlay bars
| |
| |
| |
Read other posts