ROFI(1) General Commands Manual ROFI(1) NAME rofi - A window switcher, application launcher, ssh dialog, dmenu replacement and more SYNOPSIS rofi [ -show mode ]|[ -dmenu ]|[ -e msg ] [ CONFIGURATION ] DESCRIPTION rofi is an X11 pop-up 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's main functionality is to assist in your workflow, allowing you to quickly switch between windows, start applications or log into a remote machine via ssh. There are different modes for different types of actions. rofi is a standalone application and should not be integrated into scripts. For integration into scripts it has a special mode that functions as a (drop-in) replacement for dmenu(1). See emulating dmenu below. Running rofi To launch rofi directly in a certain mode, specify a mode with rofi -show . To show the drun dialog: rofi -show drun A useful setup in minimalistic window managers is to combine drun, run with window mode: rofi -show combi -modes combi -combi-modes "window,drun,run" In this setup it first list all open applications, then all installed applications. So if you type firefox and hit return, it will switch to the running firefox, or launch it when it is not running. Emulating dmenu rofi can emulate dmenu(1) (a dynamic menu for X11) when launched with the -dmenu flag. For more information see rofi-dmenu(5). Display Error message rofi error dialog can also be called from the command line. rofi -e "my message" Markup support can be enabled, see CONFIGURATION options. CONFIGURATION There are currently three methods of setting configuration options (evaluated in order below): o System configuration file (for example /etc/rofi.rasi). It first checks XDG_CONFIG_DIRS, and then SYSCONFDIR (that is passed at compile time). It loads the first config file it finds, it does not merge multiple system configuration files. o Rasi theme file: The new theme format can be used to set configuration values. o Command-line options: Arguments passed to rofi. To get a template config file, run: rofi -dump-config > config.rasi This will contain (commented) all current configuration options, modified options are uncommented. To get a template config file that sets the icon-theme run: rofi -icon-theme hicolor -dump-config. It is strongly recommended to use this as a starting point for your configuration. An empty configuration section in the config file looks like: configuration { // set config options here } Most of the configuration options mentioned below (beside options like -show, -dump-config that apply to a single run) can be set here. For example to set the dpi value to 72: configuration { dpi: 72; } The configuration system supports the following types: o string o integer (signed and unsigned) o char o boolean o lists For the syntax of these options, see the rofi-theme(5) manpage. For use on the command line, Boolean options have a non-default command-line syntax. Example to enable option X: -X To disable option X: -no-X Below is a list of the most important options: General -help The help option shows the full list of command-line options and the current set values. These include dynamic (run-time generated) options. -version Show the rofi version and exit. -dump-config Dump the current active configuration, in rasi format, to stdout and exit. Information about the rasi format can be found in the rofi-theme(5) manpage. -dump-theme Dump the current active theme, in rasi format, to stdout and exit. -rasi-validate filename Try to parse the file and return 0 when successful, non-zero when failed. -list-keybindings List all known keybindings without trying to parse them. This can be used to look for duplicate bindings. -threads num Specify the number of threads rofi should use: o 0: Autodetect the number of supported hardware threads. o 1: Disable threading o 2..n: Specify the maximum number of threads to use in the thread pool. Default: Autodetect -display display The X server to contact. Default is $DISPLAY. -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 three 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 See the rofi-dmenu(5) manpage for more information. -show mode Open rofi in a certain mode. Available modes are window, run, drun, ssh, combi. The special argument keys can be used to open a searchable list of supported key bindings (see the rofi-keys(5) manpage) To show the run-dialog: rofi -show run If -show is the last option passed to rofi, the first enabled modes is shown. -modes mode1,mode2 Specify an 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 configured modes will be enabled. To only show the run and ssh launcher: rofi -modes "run,ssh" -show run Custom modes can be added using the internal script mode. Each such mode has two parameters: :