# ROFI 1 rofi ## NAME **rofi** - A window switcher, run launcher, ssh dialog and dmenu replacement ## SYNOPSIS **rofi** [ -width *pct_scr* ] [ -lines *lines* ] [ -columns *columns* ] [ -font *pangofont* ] [ -fg *color* ] [ -fg-urgent *color* ] [ -fg-active *color* ] [ -bg-urgent *color* ] [ -bg-active *color* ] [ -bg *color* ] [ -bgalt *color* ] [ -hlfg *color* ] [ -hlbg *color* ] [ -key-**mode** *combo* ] [ -terminal *terminal* ] [ -location *position* ] [ -fixed-num-lines ] [ -padding *padding* ] [ -opacity *opacity%* ] [ -display *display* ] [ -bc *color* ] [ -bw *width* ] [ -dmenu [ -p *prompt* ] [ -sep *separator* ] [ -l *selected line* ] [ -mesg ] [ -select ] ] [ -filter *filter* ] [ -ssh-client *client* ] [ -ssh-command *command* ] [ -disable-history ] [ -levenshtein-sort ] [ -case-sensitive ] [ -show *mode* ] [ -modi *mode1,mode2* ] [ -eh *element height* ] [ -lazy-filter-limit *limit* ] [ -e *message*] [ -a *row* ] [ -u *row* ] [ -pid *path* ] [ -now ] [ -rnow ] [ -snow ] [ -version ] [ -help] [ -dump-xresources ] [ -auto-select ] [ -parse-hosts ] [ -combi-modi *mode1,mode2* ] [ -normal-window ] [ -fake-transparency ] [ -quiet ] ## DESCRIPTION **rofi** is an X11 popup window switcher, run dialog, dmenu replacement and more. It focuses on being fast to use and have minimal distraction. It supports keyboard and mouse navigation, type to filter, tokenized search and more. ## USAGE **rofi** can be used in three ways, single-shot; executes once and directly exits when done, as a daemon listening to specific key-combination or emulating dmenu. ### Single-shot mode To launch **rofi** directly in a certain mode, specify a mode with `rofi -show `. To show the run dialog: rofi -show run ### Daemon mode To launch **rofi** in daemon mode don't specify any mode, instead keys can be bound to launch a certain mode. To show run-mode by pressing `F2` start **rofi** like this: rofi -key-run F2 Keybindings can also be specified in the `Xresources` file. ### Emulating dmenu **rofi** can emulate `dmenu` (a dynamic menu for X) when launched with the `-dmenu` flag. The official website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/). ## OPTIONS There are currently three methods of setting configuration options: * Compile time: edit config.c. This method is strongly discouraged. * Xresources: A method of storing key values in the Xserver. See [here](https://en.wikipedia.org/wiki/X_resources) for more information. This is the recommended way of configuring **rofi**. * Command-line options: Arguments passed to **rofi**. The Xresources file expects options starting with `rofi.` followed by it's name. An Example to set the number of lines: rofi.lines: 10 Command line options override settings from Xresources file. The same option set as argument: prefixed with a '-': rofi -lines 10 To get a list of available options, formatted as Xresources entries run: rofi -dump-xresources The configuration system supports the following types: * String * Integer (signed and unsigned) * Char * Boolean Boolean options have a non-default command-line syntax. Example to enable option X: -X to disable it: -no-X Below is a list of the most important options: ### General `-key-{mode}` **KEY** Set the key combination to display a {mode} in daemon mode. rofi -key-run F12 rofi -key-ssh control+shift+s rofi -key-window mod1+Tab `-dmenu` Run **rofi** in dmenu mode. This allows for interactive scripts. In `dmenu` mode, **rofi** reads from STDIN, and output to STDOUT. A simple example, displaying 3 pre-defined options: echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu Or get the options from a script: ~/my_script.sh | rofi -dmenu Pressing `shift-enter` sends the selected entry to STDOUT and moves to the next entry. `-show` *mode* Open **rofi** in a certain mode. Available modes are `window`, `run`, `ssh` To show the run-dialog: rofi -show run `-modi` *mode1,mode1* Specify a ordered, comma separated list of modes to enable. Enabled modes can be changed at runtime. Default key is Ctrl+Tab. If no modes are specified all modes will be enabled. To only show the run and ssh launcher: rofi -modi "run,ssh" -show run Custom modes can be added using the internal 'script' mode. Each mode has two parameters: :