In this article
A quick application launcher removes a lot of friction from a keyboard-driven desktop. Open Rofi, type part of a name and press Enter. My Gruvnode profile on the X1 Carbon uses a compact launcher with dark Gruvbox colours.
This guide explains the published Rofi file and a small configuration you can test separately. You need Rofi installed in a compatible graphical session. My concrete reference is XMonad on X11; check your installed Rofi version's support when using Wayland.
drun and run serve different purposes
drun lists applications from desktop files, usually the same programs a desktop menu knows. A desktop file can specify a readable name, icon and launch command. run works with executable commands, for example those available through your PATH.
For a beginner, drun is a useful starting point because you search for an application name rather than know its full command. A command available in run does not necessarily have a desktop entry for drun. This difference matters for Flatpak apps and programs you build yourself.
Try the launcher before adding your own theme:
rofi -show drun
Type a name, move the selection with the arrow keys and launch with Enter. Escape closes the window without launching anything.
Read my Rasi file
Rasi is Rofi's configuration and theme syntax. The beginning of my file controls behaviour:
configuration {
modi: "drun,run";
show-icons: true;
display-drun: "Apps";
font: "JetBrains Mono 11";
drun-display-format: "{name}";
}
modi selects available modes; -show drun selects the opening mode. show-icons enables icon display but does not install an icon theme. display-drun changes the label, while drun-display-format limits the displayed entry information to its name.
The theme section styles widgets such as window, inputbar, listview and element selected. My global colours live in the * block. A reference such as @foreground reuses a value elsewhere, allowing one colour change to update multiple widgets.
Create a small independent test file
Make a separate directory:
mkdir -p ~/rofi-tutorial
Save this complete exercise as ~/rofi-tutorial/config.rasi. It is an original teaching example rather than a complete replacement for my theme:
configuration {
modi: "drun,run";
show-icons: false;
font: "monospace 12";
}
* {
background-color: #1d2021;
text-color: #ebdbb2;
}
window {
width: 40%;
padding: 16px;
}
listview {
lines: 6;
}
element selected {
background-color: #504945;
text-color: #b8bb26;
}
Launch specifically that file:
rofi -config ~/rofi-tutorial/config.rasi -show drun
Expect a dark window, six visible list rows and a differently coloured selection. Your usual ~/.config/rofi/config.rasi is preserved. Escape ends the exercise; launching without -config uses the normal configuration again.
Adjust size, spacing and selection colours
My original uses width: 38%, twelve pixels of window padding and eight list rows. These choices suit my display. A percentage width can help on smaller screens, while long application names may need more room.
Change one test-file value at a time: first lines, then width. Reopen Rofi after each edit to see what that setting controls. Changing the font, size and colours simultaneously makes it harder to identify the cause of a problem.
Rasi needs semicolons after properties and matching braces. A colour such as #b8bb26 is unquoted; strings such as "drun,run" are quoted. When Rofi reports an error, inspect both the indicated line and the property just before it.
Connect Rofi to an XMonad shortcut
On my X1, Super + D opens the launcher. The window manager essentially runs rofi -show drun. The global shortcut therefore belongs in XMonad, while the colours and dimensions belong in Rasi.
Within an existing shortcut list set up with EZConfig, an entry can look like this:
("M-d", spawn "rofi -show drun")
This is not a complete xmonad.hs. Read the XMonad introduction before adding the entry in the right place. Check whether M-d already has a binding. Make sure the terminal command works before connecting it to a shortcut.
Troubleshoot missing apps and icons
| Observation | Useful next check |
|---|---|
App missing from drun |
Check its desktop file and installation |
Command missing from run |
Check PATH and the executable |
| Icons missing | Try show-icons: false, then inspect the icon theme |
| Unexpected font | Use an installed family name |
| Shortcut does nothing | Test the command first, then the XMonad binding |
Rofi does not install a selected application. It launches programs already configured on the computer. Likewise, a pleasant theme cannot correct an invalid desktop-file command. Keep appearance, application entries and window-manager shortcuts separate during diagnosis.
Local selection and launched applications
The selection shown here needs no cloud account. A browser or game launcher you start afterwards can still go online. Rofi also supports additional modes and scripts whose behaviour depends on their code. Read their inputs, file access and commands before using them.
Configuration and references
- My checked X1 Rofi profile.
- Rofi manual: modes and command options.
- Rofi theme reference: widgets and Rasi properties.
- Gruvnode on GitHub: the complete laptop setup.
Sources checked on 8 October 2026. This tutorial explains the X11 setup; Wayland support and default themes can differ between Rofi versions.