knowledge/technology/applications/utilities/Rofi.md

1.8 KiB

obj arch-wiki website repo
application https://wiki.archlinux.org/title/rofi https://davatorium.github.io/rofi/ https://github.com/davatorium/rofi

Rofi

Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement that started as a clone of simpleswitcher, written by Sean Pringle and later expanded by Dave Davenport.

Configuration

There are two methods of setting configuration options:

  • Local configuration. Normally, depending on XDG, in ~/.config/rofi/config.rasi.
  • Command line options:
rofi -combi-modi window,drun,ssh -theme solarized -font "hack 10" -show combi

can be expressed in a configuration file like this:

configuration {
 modi: "window,drun,ssh,combi";
 font: "hack 10";
 combi-modi: "window,drun,ssh";
 }
@theme "solarized"

To get a full list of options for config.rasi file run rofi -dump-config or rofi -h. You can write the output of the command directly to your configuration file while running rofi -dump-config > ~/.config/rofi/config.rasi.

Themes

The easiest way to get started theming rofi is by modifying your existing theme.

Themes can be modified/tweaked by adding theming elements to the end of the
config file. The default location of this file is ~/.config/rofi/config.rasi, if the file does not exists, you can create it.

A basic config:

configuration {
  modes: [ combi ];
  combi-modes: [ window, drun, run ];
}

@theme "gruvbox-light"

/* Insert theme modifications after this */

For example if we want to change the Type to filter text in the entry box we append the following:

entry {
    placeholder: "Type here";
}

In the above section, entry indicates the widget, placeholder is the property we want to modify and we set it to the string "Type here".