\fBrofi\fR 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\.
.
.SH"USAGE"
\fBrofi\fR\'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 \fImodi\fR for different types of actions\.
.
.P
\fBrofi\fR can also function as (drop\-in) replacement for \fBdmenu(1)\fR\.
.
.SS"Running rofi"
To launch \fBrofi\fR directly in a certain mode, specify a mode with \fBrofi \-show <mode>\fR\. To show the run dialog:
\fBrofi\fR can emulate \fBdmenu(1)\fR (a dynamic menu for X) when launched with the \fB\-dmenu\fR flag\.
.
.P
The website for \fBdmenu\fR can be found here \fIhttp://tools\.suckless\.org/dmenu/\fR\.
.
.P
\fBrofi\fR does not aim to be 100% compatible with dmenu\. There are simply too many different flavors of dmenu\. The idea is that the basic usage command\-line flags are obeyed, theme\-related flags are not\. Besides, \fBrofi\fR offers some extended features (like multi\-select, highlighting, message bar, extra key bindings)\.
.
.SS"Display Error message"
\fBrofi\fR error dialog can also be called from the command line\.
System configuration file (for example \fB/etc/rofi\.conf\fR)\.
.
.IP"\(bu"4
Xresources: A method of storing key values in the Xserver\. See here \fIhttps://en\.wikipedia\.org/wiki/X_resources\fR for more information\.
.
.IP"\(bu"4
Rasi theme file: The new \fItheme\fR format can be used to set configuration values\.
.
.IP"\(bu"4
Configuration File: This uses the same format as the Xresources file\. By default it looks in \fBXDG_USER_CONFIG_DIR\fR/rofi/config, but can be overridden on commandline\. By default XDG_USER_CONFIG_DIR defaults to \fB$HOME/\.config\fR\. (See \fBrofi \-h\fR for current location)\. This is the recommended way of configuring \fBrofi\fR\.
.
.IP"\(bu"4
Command\-line options: Arguments passed to \fBrofi\fR\.
.
.IP""0
.
.P
\fBTIP\fR: To get a template config file run: \fBrofi \-dump\-xresources > rofi\-example\.config\fR\.\fBNOTE\fR: In version 1\.4\.0 we support configuration in a new format, a config for this can be generated by: \fBrofi \-dump\-config > config\.rasi\fR\fBNOTE\fR: If you want to use the new configuration format, the config file should be named \fBconfig\.rasi\fR\.
.
.P
The Xresources file expects options starting with \fBrofi\.\fR followed by its name\. An example to set the number of lines:
2\.\.N: Specify the maximum number of threads to use in the thread pool\.
.
.IP""0
.
.P
\fB\-dmenu\fR
.
.P
Run \fBrofi\fR in dmenu mode\. This allows for interactive scripts\. In \fBdmenu\fR mode, \fBrofi\fR reads from STDIN, and output to STDOUT\. A simple example, displaying three pre\-defined options:
Open \fBrofi\fR in a certain mode\. Available modes are \fBwindow\fR, \fBrun\fR, \fBdrun\fR, \fBssh\fR, \fBcombi\fR\. The special argument \fBkeys\fR can be used to open a searchable list of supported key bindings (see \fIKEY BINDINGS\fR)
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 modes will be enabled\. To only show the run and ssh launcher:
Most of the following options are \fBdeprecated\fR and should not be used\. Please use the new theme format to customize \fBrofi\fR\. More information about the new format can be found in the \fBrofi\-theme(5)\fR manpage\.
.
.P
\fB\-lines\fR
.
.P
Maximum number of lines to show before scrolling\.
Select monitor to display \fBrofi\fR on\. It accepts as input: \fIprimary\fR (if primary output is set), the \fIxrandr\fR output name, or integer number (in order of detection)\. Negative numbers are handled differently:
.
.IP"\(bu"4
\fB\-1\fR: the currently focused monitor\.
.
.IP"\(bu"4
\fB\-2\fR: the currently focused window (that is, \fBrofi\fR will be displayed on top of the focused window)\.
.
.IP"\(bu"4
\fB\-3\fR: Position at mouse (overrides the location setting to get normal context menu behavior\.)
.
.IP"\(bu"4
\fB\-4\fR: the monitor with the focused window\.
.
.IP"\(bu"4
\fB\-5\fR: the monitor that shows the mouse pointer\.
.
.IP
Default: \fI\-5\fR
.
.IP""0
.
.P
See \fBrofi \-h\fR output for the detected monitors, their position, and size\.
.
.P
\fB\-theme\fR\fIfilename\fR
.
.P
Path to the new theme file format\. This overrides the old theme settings\.
.
.P
\fB\-theme\-str\fR\fIstring\fR
.
.P
Allow theme parts to be specified on the command line as an override\.
Override the default DPI setting\. If set to \fB0\fR, it tries to auto\-detect based on X11 screen size (similar to i3 and GTK)\. If set to \fB1\fR, it tries to auto\-detect based on the size of the monitor that rofi is displayed on (similar to latest Qt 5)\.
Parse the \fB~/\.ssh/known_hosts\fR file for entries\.
.
.P
Default: \fIenabled\fR
.
.SS"Run settings"
\fB\-run\-command\fR\fIcmd\fR
.
.P
Set command (\fI{cmd}\fR) to execute when running an application\. See \fIPATTERN\fR\.
.
.P
Default: \fI{cmd}\fR
.
.P
\fB\-run\-shell\-command\fR\fIcmd\fR
.
.P
Set command to execute when running an application in a shell\. See \fIPATTERN\fR\.
.
.P
Default: \fI{terminal} \-e {cmd}\fR
.
.P
\fB\-run\-list\-command\fR\fIcmd\fR
.
.P
If set, use an external tool to generate list of executable commands\. Uses \fBrun\-command\fR\.
.
.P
Default: \fI{cmd}\fR
.
.SS"Window switcher settings"
\fB\-window\-format\fR\fIformat\fR
.
.P
Format what is being displayed for windows\.
.
.P
\fIformat\fR: {field[:len]}
.
.P
\fIfield\fR:
.
.IP"\(bu"4
\fBw\fR: desktop name
.
.IP"\(bu"4
\fBt\fR: title of window
.
.IP"\(bu"4
\fBn\fR: name
.
.IP"\(bu"4
\fBr\fR: role
.
.IP"\(bu"4
\fBc\fR: class
.
.IP""0
.
.P
\fIlen\fR: maximum field length (0 for auto\-size)\. If length and window \fIwidth\fR are negative, field length is \fIwidth \- len\fR\. if length is positive, the entry will be truncated or padded to fill that length\.
.
.P
default: {w} {c} {t}
.
.P
\fB\-window\-command\fR\fIcmd\fR
.
.P
Set command to execute on selected window for a custom action\. See \fIPATTERN\fR\.
.
.P
Default: \fI"wmctrl \-i \-R {window}"\fR
.
.SS"Combi settings"
\fB\-combi\-modi\fR\fImode1,mode2\fR
.
.P
The modi to combine in combi mode\. For syntax to see \fB\-modi\fR\. To get one merge view, of \fBwindow\fR,\fBrun\fR, and \fBssh\fR:
Active row, mark \fIX\fR as active. Where \fIX\fR is a comma-separated list of python(1)-style indices and ranges, e.g.
indices start at \fB0\fR, \fB\-1\fR refers to the last row with \fB\-2\fR preceding it, ranges are left-open and right-close, and so on. You can specify:
.
.IP"\(bu"4
A single row: \'\fB5\fR\'
.
.IP"\(bu"4
A range of (last 3) rows: \'\fB\-3:\fR\'
.
.IP"\(bu"4
4 rows starting from row 7: \'\fB7:11\fR\' (or in legacy notation: \'\fB7\-10\fR\')
Add a message line below the filter entry box\. Supports pango markup\. For more information on supported markup see here \fIhttps://developer\.gnome\.org/pango/stable/PangoMarkupFormat\.html\fR
.
.P
\fB\-normal\-window\fR
.
.P
Make \fBrofi\fR react like a normal application window\. Useful for scripts like Clerk that are basically an application\.
.
.P
\fB\-dump\fR
.
.P
Dump the filtered list to stdout and quit\. This can be used to get the list as \fBrofi\fR would filter it\. Use together with \fB\-filter\fR command\.
.
.P
\fB\-input\fR\fIfile\fR
.
.P
Reads from \fIfile\fR instead of stdin\.
.
.P
\fB\-password\fR
.
.P
Hide the input text\. This should not be considered secure!
.
.P
\fB\-markup\-rows\fR
.
.P
Tell \fBrofi\fR that DMenu input is pango markup encoded, and should be rendered\. See here \fIhttps://developer\.gnome\.org/pango/stable/PangoMarkupFormat\.html\fR for details about pango markup\.
.
.P
\fB\-multi\-select\fR
.
.P
Allow multiple lines to be selected\. Adds a small selection indicator to the left of each entry\.
.
.P
\fB\-sync\fR
.
.P
Force rofi mode to first read all data from stdin before showing the selection window\. This is original dmenu behavior\.
.
.P
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options, such as \fB\-dump\fR, \fB\-only\-match\fR or \fB\-auto\-select\fR\.
.
.P
\fB\-async\-pre\-read\fR\fInumber\fR
.
.P
Reads the first 25 entries blocking, then switches to async mode\. This makes it feel more \'snappy\'\.
.
.P
\fIdefault\fR: 25
.
.SS"Message dialog"
\fB\-e\fR\fImessage\fR
.
.P
Pops up a message dialog (used internally for showing errors) with \fImessage\fR\. Message can be multi\-line\.
.
.SS"Other"
\fB\-pid\fR\fIpath\fR
.
.P
Make \fBrofi\fR create a pid file and check this on startup\. The pid file prevents multiple \fBrofi\fR instances from running simultaneously\. This is useful when running \fBrofi\fR from a key\-binding daemon\.
.
.P
\fB\-fake\-transparency\fR
.
.P
Enable fake transparency\. This only works with transparent background color in the theme\.
.
.P
\fB\-fake\-background\fR
.
.P
Select what to use as background for fake transparency\. This can be \'background\', \'screenshot\' or a path to an image file (currently only supports png)\.
.
.P
\fB\-display\-{mode}\fR\fIstring\fR
.
.P
Set the name to use for mode\. This is used as prompt and in combi\-browser\.
For more information on debugging, see the wiki \fIhttps://github\.com/DaveDavenport/rofi/wiki/Debugging%20Rofi\fR
.
.SH"PATTERN"
To launch commands (for example, when using the ssh launcher), the user can enter the used command\-line\. The following keys can be used that will be replaced at runtime:
.
.IP"\(bu"4
\fB{host}\fR: the host to connect to
.
.IP"\(bu"4
\fB{terminal}\fR: the configured terminal (see \-terminal\-emulator)
.
.IP"\(bu"4
\fB{ssh\-client}\fR: the configured ssh client (see \-ssh\-client)
.
.IP"\(bu"4
\fB{cmd}\fR: the command to execute
.
.IP"\(bu"4
\fB{window}\fR: the window ID of the selected window (in \fBwindow\-command\fR)
.
.IP""0
.
.SH"DMENU REPLACEMENT"
If \fBargv[0]\fR (calling command) is dmenu, \fBrofi\fR will start in dmenu mode\. This way it can be used as a drop\-in replacement for dmenu\. Just copy or symlink \fBrofi\fR to dmenu in \fB$PATH\fR\.
The window background and border color should be specified separately\. The key \fBcolor\-window\fR contains a tuple \fBbackground,border,separator\fR\. An example for \fBXresources\fR file:
ARGB colors are also supported\. These can be used to create a transparent window if (1) your Xserver supports TrueColor, and (2) you are running a composite manager\. For example: argb:FF444444
The first two fields specify the alpha level\. This determines the amount of transparency (00 everything, FF nothing)\. The other fields represent the actual color, in hex\.
.
.P
Transparency can be used within \fBrofi\fR, for example if the selected background color is 50% transparent, the background color of the window will be visible through it\.
\fBCtrl\-Enter\fR: Use entered text as a command (in \fBssh/run modi\fR)
.
.IP"\(bu"4
\fBShift\-Enter\fR: Launch the application in a terminal (in run mode)
.
.IP"\(bu"4
\fBShift\-Enter\fR: Return the selected entry and move to the next item while keeping \fBrofi\fR open\. (in dmenu)
.
.IP"\(bu"4
\fBShift\-Right\fR: Switch to the next mode\. The list can be customized with the \fB\-switchers\fR argument\.
.
.IP"\(bu"4
\fBShift\-Left\fR: Switch to the previous mode\. The list can be customized with the \fB\-switchers\fR argument\.
.
.IP"\(bu"4
\fBCtrl\-Tab\fR: Switch to the next mode\. The list can be customized with the \fB\-switchers\fR argument\.
.
.IP"\(bu"4
\fBCtrl\-Shift\-Tab\fR: Switch to the previous mode\. The list can be customized with the \fB\-switchers\fR argument\.
.
.IP"\(bu"4
\fBCtrl\-space\fR: Set selected item as input text\.
.
.IP"\(bu"4
\fBShift\-Del\fR: Delete entry from history\.
.
.IP"\(bu"4
\fBgrave\fR: Toggle case sensitivity\.
.
.IP"\(bu"4
\fBAlt\-grave\fR: Toggle sorting\.
.
.IP"\(bu"4
\fBAlt\-Shift\-S\fR: Take a screenshot and store it in the Pictures directory\.
.
.IP""0
.
.P
To get a full list of key bindings on the commandline, see \fBrofi \-h\fR\. The options starting with \fB\-kb\fR are keybindings\. Key bindings can be modified using the configuration systems\. To get a searchable list of key bindings, run \fBrofi \-show keys\fR\.
.
.P
A key binding starting with \fB!\fR will act when all keys have been released\.
.
.SH"Available Modi"
.
.SS"Window"
Show a list of all the windows and allow switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will close the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\. (See option \fBwindow\-command\fR );
.
.SS"WindowCD"
Shows a list of the windows on the current desktop and allows switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\. (See option \fBwindow\-command\fR );
.
.SS"Run"
Shows a list of executables in \fB$PATH\fR and can launch them (optional in a terminal)\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will remove this entry from the run history\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run the command in a terminal\.
.
.SS"DRun"
Same as the \fBrun\fR launches, but the list is created from the installed desktop files\. It automatically launches them in a terminal if specified in the Desktop File\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will remove this entry from the run history\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) with custom input (no entry matching) will run the command in a terminal\.
.
.SS"SSH"
Shows a list of SSH targets based on your ssh config file, and allows to quickly \fBssh\fR into them\.
.
.SS"Keys"
Shows a searchable list of key bindings\.
.
.SS"Script"
Allows custom scripted Modi to be added\.
.
.SH"FAQ"
.
.SS"The text in the window switcher is not nicely lined out\."
Try using a mono\-space font\.
.
.SS"The window is completely black\."
Check quotes used on the commandline: you might have used \fB“\fR ("smart quotes") instead of \fB"\fR ("machine quotes")\.
In i3 \fIhttp://i3wm\.org/\fR you want to bind \fBrofi\fR to be launched on key release\. Otherwise, it cannot grab the keyboard\. See also the i3 manual \fIhttp://i3wm\.org/docs/userguide\.html\fR:
.
.P
Some tools (such as import or xdotool) might be unable to run upon a KeyPress event, because the keyboard/pointer is still grabbed\. For these situations, the \fB\-\-release\fR flag can be used, as it will execute the command after the keys have been released\.
\fBrofi\fR website can be found here \fIhttps://davedavenport\.github\.io/rofi/\fR
.
.SH"SUPPORT"
\fBrofi\fR support can be obtained here \fIirc://irc\.freenode\.net/#rofi\fR (#rofi on irc\.freenode\.net), or via the forum \fIhttps://reddit\.com/r/qtools//\fR
.
.SH"DEBUGGING"
Please see this \fIhttps://github\.com/DaveDavenport/rofi/wiki/Debugging%20Rofi\fR wiki entry\.
.
.SH"ISSUE TRACKER"
\fBrofi\fR issue tracker can be found here \fIhttps://github\.com/DaveDavenport/rofi/issues\fR
.
.P
When creating an issue, please read this \fIhttps://github\.com/DaveDavenport/rofi/blob/master/\.github/CONTRIBUTING\.md\fR first\.