.nh .TH ROFI 1 rofi .SH NAME .PP \fBrofi\fP - A window switcher, application launcher, ssh dialog, dmenu replacement and more .SH SYNOPSIS .PP \fBrofi\fP [ -show \fImode\fP ]|[ -dmenu ]|[ -e \fImsg\fP ] [ CONFIGURATION ] .SH DESCRIPTION .PP \fBrofi\fP 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 .PP \fBrofi\fP\&'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 \fBssh\fR\&. There are different \fImodes\fP for different types of actions. \fBrofi\fP 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 \fBdmenu(1)\fP\&. See emulating dmenu below. .SS Running rofi .PP To launch \fBrofi\fP directly in a certain mode, specify a mode with \fBrofi -show \fR\&. To show the \fBdrun\fR dialog: .EX rofi -show drun .EE .PP A useful setup in minimalistic window managers is to combine \fBdrun\fR, \fBrun\fR with \fBwindow\fR mode: .EX rofi -show combi -modes combi -combi-modes "window,drun,run" .EE .PP 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. .SS Emulating dmenu .PP \fBrofi\fP can emulate \fBdmenu(1)\fP (a dynamic menu for X11) when launched with the \fB-dmenu\fR flag. .PP For more information see \fBrofi-dmenu(5)\fP\&. .SS Display Error message .PP \fBrofi\fP error dialog can also be called from the command line. .EX rofi -e "my message" .EE .PP Markup support can be enabled, see CONFIGURATION options. .SH CONFIGURATION .PP There are currently three methods of setting configuration options (evaluated in order below): .RS .IP \(bu 2 System configuration file (for example \fB/etc/rofi.rasi\fR). It first checks \fBXDG_CONFIG_DIRS\fR, and then \fBSYSCONFDIR\fR (that is passed at compile time). It loads the first config file it finds, it does not merge multiple system configuration files. .IP \(bu 2 Rasi theme file: The new \fItheme\fP format can be used to set configuration values. .IP \(bu 2 Command-line options: Arguments passed to \fBrofi\fP\&. .RE .PP To get a template config file, run: \fBrofi -dump-config > config.rasi\fR .PP This will contain (commented) all current configuration options, modified options are uncommented. .PP To get a template config file that sets the icon-theme run: \fBrofi -icon-theme hicolor -dump-config\fR\&. .PP It is \fBstrongly\fP recommended to use this as a starting point for your configuration. .PP An empty configuration section in the config file looks like: .EX configuration { // set config options here } .EE .PP Most of the configuration options mentioned below (beside options like \fB-show\fR, \fB-dump-config\fR that apply to a single run) can be set here. .PP For example to set the dpi value to 72: .EX configuration { dpi: 72; } .EE .PP The configuration system supports the following types: .RS .IP \(bu 2 string .IP \(bu 2 integer (signed and unsigned) .IP \(bu 2 char .IP \(bu 2 boolean .IP \(bu 2 lists .RE .PP For the syntax of these options, see the \fBrofi-theme(5)\fP manpage. .PP For use on the command line, Boolean options have a non-default command-line syntax. Example to enable option X: .EX -X .EE .PP To disable option X: .EX -no-X .EE .PP Below is a list of the most important options: .SS General .PP \fB-help\fR .PP The help option shows the full list of command-line options and the current set values. These include dynamic (run-time generated) options. .PP \fB-version\fR .PP Show the \fBrofi\fP version and exit. .PP \fB-dump-config\fR .PP Dump the current active configuration, in rasi format, to stdout and exit. Information about the rasi format can be found in the \fBrofi-theme(5)\fP manpage. .PP \fB-dump-theme\fR .PP Dump the current active theme, in rasi format, to stdout and exit. .PP \fB-rasi-validate\fR \fIfilename\fP .PP Try to parse the file and return 0 when successful, non-zero when failed. .PP \fB-list-keybindings\fR .PP List all known keybindings without trying to parse them. This can be used to look for duplicate bindings. .PP \fB-threads\fR \fInum\fP .PP Specify the number of threads \fBrofi\fP should use: .RS .IP \(bu 2 0: Autodetect the number of supported hardware threads. .IP \(bu 2 1: Disable threading .IP \(bu 2 2..n: Specify the maximum number of threads to use in the thread pool. .RE .PP Default: Autodetect .PP \fB-display\fR \fIdisplay\fP .PP The X server to contact. Default is \fB$DISPLAY\fR\&. .PP \fB-dmenu\fR .PP Run \fBrofi\fP in dmenu mode. This allows for interactive scripts. In \fBdmenu\fR mode, \fBrofi\fP reads from STDIN, and output to STDOUT. A simple example, displaying three pre-defined options: .EX echo -e "Option #1\\nOption #2\\nOption #3" | rofi -dmenu .EE .PP Or get the options from a script: .EX ~/my_script.sh | rofi -dmenu .EE .PP See the \fBrofi-dmenu(5)\fP manpage for more information. .PP \fB-show\fR \fImode\fP .PP Open \fBrofi\fP 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 the \fBrofi-keys(5)\fP manpage) .PP To show the run-dialog: .EX rofi -show run .EE .PP If \fB-show\fR is the last option passed to rofi, the first enabled modes is shown. .PP \fB-modes\fR \fImode1,mode2\fP .PP Specify an ordered, comma-separated list of modes to enable. Enabled modes can be changed at runtime. Default key is \fBCtrl+Tab\fR\&. If no modes are specified, all configured modes will be enabled. To only show the \fBrun\fR and \fBssh\fR launcher: .EX rofi -modes "run,ssh" -show run .EE .PP Custom modes can be added using the internal \fBscript\fR mode. Each such mode has two parameters: .EX :