This is the sixth in a series of several posts on how to do way more than you really need to with rofi
. It’s a neat little tool that does so many cool things. I don’t have a set number of posts, and I don’t have a set goal. I just want to share something I find useful.
This post highlights several useful rofi
options. I don’t try to script anything here, so it’s a fairly short read.
Assumptions
I’m running Fedora 27. Most of the instructions are based on that OS. This will translate fairly well to other RHEL derivatives. The Debian ecosystem should also work fairly well, albeit with totally different package names. This probably won’t work at all on Windows, and I have no intention of fixing that.
You’re going to need a newer version of rofi
, >=1.4
. I’m currently running this:
$ rofi -version |
If you installed from source, you should be good to go.
Code
You can view the code related to this post under the post-06-useful-options-i
tag.
combi
The combi
modi
is, depending on your perspective, very useful or very intimidating. It combines the options from everything in its list, making it easy to look at several things without leaving the window.
At the moment, I have mine set to everything I have enabled. A nice thing about rofi
is that it’s very easy to swap out config on the fly, so I could quick run combi
on a smaller set of of my modi
.
$ rofi -show combi -combi-modi "drun,ssh" |
Cycling modi
Being able to switch between enabled modi
makes rofi
a very useful tool. Cycling should be on by default, but it never hurts to forcibly enable it.
$ sed \ |
--- $XDG_USER_CONFIG_DIR/rofi/config.rasi.bak |
The shortcuts are also useful to know.
$ rofi -dump-config | grep kb-mode |
sidebar-mode
Another useful cycling option is sidebar-mode
. By default, the main window gives no notification of its modi
.
However, in sidebar-mode
, rofi
adds a modi
bar that shows the active modi
and lists other available modi
in the current session. It also adds mouse interaction on top of the kb-mode-*
shortcuts.
$ sed \ |
--- $XDG_USER_CONFIG_DIR/rofi/config.rasi.bak |
It can get a bit cramped the more modi
you enable. I don’t mind it while I’m learning everything, but I will eventually slim it down. YMMV.