Skip to content
Patrick Motard edited this page Jan 6, 2019 · 29 revisions

The official repository for themes can be found here.

Rofi themes use the .rasi file extension. The format is similar to .css. You can find documentation on the .rasi format here.

Getting Started with themes

Generate a default configuration file

mkdir -p ~/.config/rofi
rofi -dump-config > ~/.config/rofi/config.rasi

This creates a file called config.rasi in the ~/.config/rofi/ folder. You can modify this file to set configuration settings and modify themes. config.rasi is the file rofi looks to by default.

Overriding Default Theme ~/.config/rofi/config.rasi

If you have your own custom theme other than what's defined in config.rasi you can use the -theme {name} flag when running rofi. The {name} handed to the themes folder is the name of the .rasi file in ~/.config/rofi/ that you want to use instead.

Example:

Running rofi with a custom theme file ~/.config/rofi/mytheme.rasi.

rofi -show drun -theme mytheme

Example:

Reference the theme by name in your config.rasi.

configuration {
...
theme: "mytheme";
...
}

Icons

Icon themes must be located in ~/.local/share/icons/ or ~/.icons/. Also -drun needs to be used instead of -run.

Set icons via rofi commands:

rofi -show drun -show-icons -drun-icon-theme MY_ICON_THEME

Set icons via .rasi:

configuration {
    show-icons: true;
    drun-icon-theme: "MY_ICON_THEME";
}

How to enable .rasi syntax highlighting

Add the following to the bottom of your .rasi file. Usually these syntax highlighting indicators are put at the beginning of the file, but rofi will fail to load the theme if it's not at the bottom of the file.

Vim: /* vim:ft=css

Emacs: /*-*- mode: css; -*-*/ This one can go at the top of the file if you want. Doesn't cause issues with rofi.

Clone this wiki locally