Skip to main content

Overview

Rofi is configured as a versatile application launcher supporting multiple modes including application launching, file browsing, window switching, and clipboard management.

Configuration Location

~/.config/rofi/
├── config.rasi          # Main configuration
├── colors/              # Color schemes
├── fonts/               # Font configurations
└── themes/              # Theme files
    ├── clipboard.rasi
    ├── defaul.rasi
    └── launchers/       # Launcher layouts

Modes

Rofi is configured with multiple modes:
modi: "drun,run,filebrowser,window,clipboard";

Available Modes

Desktop ApplicationsShows .desktop files from:
  • /usr/share/applications/
  • ~/.local/share/applications/
Displays application names, icons, and descriptions.

General Settings

Behavior

case-sensitive: false;
cycle: true;
show-icons: true;
icon-theme: "BeautySolar";
steal-focus: false;
  • Case-insensitive search by default
  • Cycling through results enabled
  • Icons displayed using BeautySolar theme

Matching

matching: "normal";
tokenize: true;
normalize-match: true;
Tokenized matching allows typing parts of words in any order. Example: Typing “fire fox” matches “Firefox”.

Display Names

display-window: "Windows";
display-run: "Run";
display-ssh: "SSH";
display-drun: "Apps";
display-filebrowser: "Files";
display-clipboard: "Clipboard";
Custom labels for each mode.

Desktop Application Settings

drun-match-fields: "name,generic,exec,categories,keywords";
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>]";
drun-show-actions: false;

Parsing Desktop Files

drun {
    parse-user: true;
    parse-system: true;
}
Searches both user and system .desktop files.

Fallback Icon

run,drun {
    fallback-icon: "application-x-addon";
}
Displays a default icon for apps without icons.

File Browser Settings

filebrowser {
    directories-first: true;
    sorting-method: "name";
}
  • Directories listed before files
  • Sorted alphabetically by name

Window Switcher Settings

window-match-fields: "title,class,role,name,desktop";
window-format: "{w} - {c} - {t:0}";
window-thumbnail: false;
Format: [window id] - [class] - [title]

Appearance

Font

font: "Sono 12";
Sono font at 12pt.

Terminal

terminal: "rofi-sensible-terminal";
Used when launching commands that require a terminal.

Themes

Rofi themes are loaded from ~/.config/rofi/themes/. Example usage in Hyprland config:
$menu = rofi -show drun -theme launchers/gridmenu -drun-icon-theme "BeautySolar"

Usage

Launching Rofi

rofi -show drun
Or with custom theme:
rofi -show drun -theme launchers/gridmenu

Keybindings

Default Rofi keybindings:
KeyAction
EnterSelect item
EscClose Rofi
TabNext match
Shift+TabPrevious match
Ctrl+J/KNext/previous match (vi-style)
Ctrl+VSwitch to next mode
Alt+[1-9]Jump to mode number

Hyprland Integration

In ~/.config/hypr/hyprland.conf:
$menu = rofi -show drun -theme launchers/gridmenu -drun-icon-theme "BeautySolar"
Keybinding in modules/keybindings.conf:
bind = $mainMod, P, exec, $menu
Default: Super + P to launch Rofi.

Clipboard Integration

Using cliphist for clipboard history:
bind = $mainMod, V, exec, cliphist list | rofi -dmenu -theme ~/.config/rofi/themes/clipboard.rasi | cliphist decode | wl-copy
Default: Super + V for clipboard history.

Setting Up cliphist

# Install cliphist
sudo dnf install cliphist  # or build from source

# Start clipboard daemon (add to Hyprland autostart)
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store

Customizing Themes

Using Built-in Themes

rofi-theme-selector
Interactive theme selector.

Creating Custom Themes

Themes use RASI (Rofi Advanced Style Information) syntax:
/* ~/.config/rofi/themes/custom.rasi */
* {
    background: #1e1e2e;
    foreground: #cdd6f4;
    accent: #89b4fa;
}

window {
    border: 2px;
    border-color: @accent;
    border-radius: 8px;
}
Apply:
rofi -show drun -theme custom

Icon Theme

Installing BeautySolar

The configuration uses the BeautySolar icon theme:
# Download from: https://github.com/beauty-cursor/beautysolar-icons
# Or install via package manager if available

Changing Icon Theme

icon-theme: "Papirus";  # or any installed icon theme
Or override in launch command:
rofi -show drun -drun-icon-theme "Papirus"

Performance

History

disable-history: false;
max-history-size: 25;
Stores last 25 selections for faster access.

Desktop Cache

drun-use-desktop-cache: false;
drun-reload-desktop-cache: false;
Disabled for always-fresh results (slight performance cost).

FAQ

Install the icon theme:
sudo dnf install papirus-icon-theme
Set in config:
icon-theme: "Papirus";
Edit config.rasi:
font: "JetBrains Mono 14";
Ensure the font is installed system-wide.
Yes! Use -dmenu mode:
echo -e "Option 1\nOption 2\nOption 3" | rofi -dmenu
Returns selected option to stdout.
Run:
rofi -show keys
Or check the man page:
man rofi
Ensure theme file exists:
ls ~/.config/rofi/themes/
Check for syntax errors:
rofi -show drun -theme mytheme -dump-xresources

Advanced Usage

Custom Scripts with dmenu Mode

#!/bin/bash
# Power menu example

options="Shutdown\nReboot\nLogout\nSuspend"
chosen=$(echo -e "$options" | rofi -dmenu -p "Power")

case $chosen in
    Shutdown) systemctl poweroff ;;
    Reboot) systemctl reboot ;;
    Logout) hyprctl dispatch exit ;;
    Suspend) systemctl suspend ;;
esac

SSH Connection Launcher

rofi -show ssh
Reads from ~/.ssh/config and /etc/ssh/ssh_known_hosts.
  • See Hyprland for window manager integration
  • See Waybar for status bar
  • See Kitty for terminal setup

Build docs developers (and LLMs) love