Interact with this post using Mastodon or
Rofi is not a bar by design
Published on
I’m using Rofi
as a launcher
for almost everything on my system. This is done using the power of scripts. I’m also using Rofi as a temporary bar to show my system information (time, disk usage, network status, battery…).
Few weeks ago, I decided to revisit this setup to optimize it, meaning integrating the launchers in this bar. Basically, replicating a “more traditional” bar like Waybar.
Why abandon traditional panels?
I said “replicating” something like Waybar so you can easily picture the idea, but that would make no sense to reinvente the wheel. To summarize the main difference between my Rofi setup and such bars: this setup doesn’t stay on screen and the bar is not clickable, but it’s more resource friendly and can be used with the keyboard. My workflow being centered around tiling window managers and minimalist aesthetics, static elements on the screen felt like an anachronism. My goal was to reclaim screen space, reduce visual clutter, and allow interactions without moving my hands from the keyboard.
Additionally, this setup combines system information display to a global launcher. By default, Rofi will still listen to user inputs and execute an action based on pattern recognition.
Rofi is not a bar
You’re right, Rofi is a versatile application launcher or dmenu replacement. Nonetheless, its ability to present a searchable, filterable list of options is its core strength and one can leverage this strength far beyond launching apps. By integrating Rofi with custom scripts, it could become an on-demand interface for virtually anything on my system - even a bar.
A simple keybinding brings up a Rofi menu displaying system information as shown below:

- the first element opens my own Tmux session manager script
- the “clock” lists my tasks in Vit (/cli_taskwarrior_vit/)
- the “date” shows the calendar using Khal
- the “network” executes a scripts that let me switch WIFI or VPN through visual submenus using Rofi as well ;)
- the “volume” opens a Rofi submenu to manage my bluetooth devices, and select the audio inputs and outputs
Rofi’s actions are based on pattern’s recognition and that makes the bar setup very easy. Using a code structure like the one below, I’ve defined variables that get displayed in the bar. Then, I’ve associated actions to each element on the bar.
# Variables definition
tmux=$(tmux_cmd)
time=$(time_cmd)
date=$(date+cmd)
...
# Rofi bar
menu=("$tmux" "$time" "$date" ...)
action=$(printf "%s\n" "${menu[@]}" | rofi -dmenu -p "" -i -l 1)
# Actions
case $action in
"") ;; # exit on Escape
{menu[0]})
# call tmux session manager script
;;
{menu[1]})
# call Vit script
;;
{menu[2]})
# call Khal script
;;
...Beyond the bar
I’m sure you’ve noted that there is a space on the left of the bar. This is where Rofi accepts user inputs. Still using pattern recogniton, Rofi can launch any app on my ssytem but also call specific scripts to perform:
- units conversions
- simple math calculation
- an internet search
In addition to this bar, using keybindings, I also use other Rofi as a:
- clipboard manager
- bookmark manager (list, open, edit, add, remove)
- password/2FA token manager (list, edit, add, remove, autofill internet fields)
Layout and style
You may not like the look of my personal bar and that’s fine.

It’s also extremely easy to change how elements are layered or to create a vertical bar. You can also add a box to display a message.
On top of that, you can also adjust specific style parameters for each Rofi process you call. This is very nice as it lets you setup a general theme while allowing you for granular and dedicated tweaks directly from the Rofi command. No need to create an entire new theme file for each Rofi process.
This is done by using -theme-str as an option followed by a list of style parameters you want to change. For example -theme-str 'window {width: 30%;} listview {columns: 1;}'
I let you explore the file if you want to go into this rabbit hole :)
Conclusion
Rofi’s flexibility allows for endless possibilities, limited only by the user’s scripting prowess and imagination. Combining a general launcher to a bar opens a lot of options. There are even more modes that you can use in Rofi if you want (*e.g. windows switcher, filebrowser…)
I have to admit that this is an unconventional setup but it may give you some ideas. Here is what it brings to my workflow:
- On-demand access: information and controls are only visible when needed, preserving focus
- Deep customization: tailor every menu and action to my exact preferences and needs
- Keyboard-driven efficiency: eliminate the need to reach for the mouse for interaction, fostering a faster and more fluid interaction with my system
- Minimalist aesthetic: reclaims valuable screen real estate, reducing visual clutter for a cleaner desktop
Tweaking Rofi might take a little bit more of initial tinkering than other bars, but the payoff in productivity and personal satisfaction is, in my humble opinion, well worth the journey. As of today, Rofi has really became a central piece of my system.
- Use me I'm famous: rofi
- Rofi is not a bar by design
More food for thoughts? Check other posts about: #System
Thanks for your read. Hope it's been useful to you.
✄ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈ ┈