rofi/doc/rofi-manpage.markdown

942 lines
25 KiB
Markdown
Raw Normal View History

2014-08-01 21:29:01 +00:00
# ROFI 1 rofi
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
## NAME
2014-05-22 08:37:25 +00:00
2017-03-18 14:54:35 +00:00
**rofi** - A window switcher, application launcher, ssh dialog and dmenu replacement
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
## SYNOPSIS
2014-05-22 08:37:25 +00:00
**rofi**
[ -width *pct_scr* ]
[ -lines *lines* ]
[ -columns *columns* ]
[ -font *pangofont* ]
[ -terminal *terminal* ]
[ -location *position* ]
[ -fixed-num-lines ]
[ -padding *padding* ]
[ -display *display* ]
[ -bw *width* ]
[ -dmenu [ -p *prompt* ] [ -sep *separator* ] [ -l *selected line* ] [ -mesg ] [ -select ] [ -input *input* ] ]
[ -filter *filter* ]
[ -ssh-client *client* ]
[ -ssh-command *command* ]
[ -window-command *command* ]
[ -disable-history ]
[ -levenshtein-sort ]
[ -case-sensitive ]
[ -cycle ]
[ -show *mode* ]
[ -modi *mode1,mode2* ]
[ -eh *element height* ]
[ -e *message*]
2015-04-04 14:46:30 +00:00
[ -a *row* ]
[ -u *row* ]
[ -pid *path* ]
[ -version ]
2015-11-25 08:16:30 +00:00
[ -help ]
2015-07-07 20:10:40 +00:00
[ -dump-xresources ]
2015-12-10 17:20:04 +00:00
[ -dump-xresources-theme ]
2015-02-24 16:34:25 +00:00
[ -auto-select ]
2015-03-29 10:27:00 +00:00
[ -parse-hosts ]
[ -no-parse-known-hosts ]
2015-04-01 12:49:27 +00:00
[ -combi-modi *mode1,mode2* ]
2015-09-20 09:45:28 +00:00
[ -normal-window ]
2015-10-21 18:31:58 +00:00
[ -fake-transparency ]
[ -matching *method* ]
2015-10-25 09:53:22 +00:00
[ -tokenize ]
[ -no-click-to-exit ]
2015-11-25 15:53:58 +00:00
[ -threads *num* ]
[ -config *filename* ]
[ -no-show-match ]
2017-01-18 17:12:54 +00:00
[ -theme *filename* ]
[ -theme-str *string* ]
2017-01-21 11:58:52 +00:00
[ -dpi *dpi* ]
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
## DESCRIPTION
2015-04-22 19:03:02 +00:00
**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.
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
## USAGE
2014-05-22 08:37:25 +00:00
2016-12-14 08:26:12 +00:00
**rofi** main functionality is to assist in your workflow, allowing you to quickly (with a few keystrokes) switch
between windows, start applications or log into a remote machine via ssh. There are different modi for different type of
actions.
2014-05-22 08:37:25 +00:00
2016-12-14 08:26:12 +00:00
**rofi** can also function as (drop in) replacement for **dmenu(1)**.
### Running rofi
2015-04-05 19:49:55 +00:00
2015-09-02 21:49:08 +00:00
To launch **rofi** directly in a certain mode, specify a mode with `rofi -show <mode>`.
2015-04-05 19:49:55 +00:00
To show the run dialog:
rofi -show run
2016-12-14 08:26:12 +00:00
2015-04-05 20:00:27 +00:00
### Emulating dmenu
2016-12-14 08:26:12 +00:00
**rofi** can emulate **dmenu(1)** (a dynamic menu for X) when launched with the `-dmenu` flag.
2015-04-05 20:00:27 +00:00
2016-12-14 08:26:12 +00:00
The "official" website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
2014-05-22 08:37:25 +00:00
2016-12-14 08:26:12 +00:00
## CONFIGURATION
2014-08-01 21:29:01 +00:00
2016-03-05 19:52:46 +00:00
There are currently three methods of setting configuration options (evaluated in order below):
2016-12-14 08:26:12 +00:00
* System configuration file (f.e. /etc/rofi.conf).
* 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**.
* Configuration File: This uses the same format as the Xresources file.
By default it looks in `XDG_USER_CONFIG_DIR`/rofi/config, but can be overriden on commandline.
2016-12-14 08:26:12 +00:00
By default XDG_USER_CONFIG_DIR defaults to `$HOME/.config`. (See `rofi -h` for current location).
2015-04-25 15:40:01 +00:00
* Command-line options: Arguments passed to **rofi**.
**TIP**: To get a template config file run: `rofi -dump-xresources > rofi-example.config`.
2015-09-02 21:49:08 +00:00
The Xresources file expects options starting with `rofi.` followed by it's name. An Example to set the number of lines:
2015-09-02 21:49:08 +00:00
rofi.lines: 10
2015-09-02 21:49:08 +00:00
Command line options override settings from Xresources file. The same option set as argument:
prefixed with a '-':
2015-09-02 21:49:08 +00:00
rofi -lines 10
To get a list of available options, formatted as Xresources entries run:
2015-07-07 20:10:40 +00:00
rofi -dump-xresources
The configuration system supports the following types:
* String
* Integer (signed and unsigned)
* Char
* Boolean
2015-09-02 21:49:08 +00:00
Boolean options have a non-default command-line syntax. Example to enable option X:
2015-04-25 15:40:01 +00:00
-X
2016-12-14 08:26:12 +00:00
To disable option X:
2015-04-25 15:40:01 +00:00
-no-X
Below is a list of the most important options:
2015-05-24 05:48:04 +00:00
### General
2015-11-25 08:16:30 +00:00
`-help`
The help option shows the full list of commandline options and the current set value.
2016-12-14 08:26:12 +00:00
These include dynamic (run-time generated) options.
2015-11-25 08:16:30 +00:00
`-dump-xresources`
Dump the current active configuration in Xresources format to the command-line.
This does not validate all passed values (e.g. colors).
2015-12-10 17:20:04 +00:00
`-dump-xresources-theme`
2016-04-27 09:43:36 +00:00
Dump the current color scheme in Xresources format to the command-line.
2015-12-10 17:20:04 +00:00
2015-11-25 15:53:58 +00:00
`-threads` *num*
Specify the number of threads **rofi** should use:
* 0: Autodetect the number of supported hardware threads.
* 1: Disable threading
* 2..N: Specify the maximum number of threads to use in the thread pool.
2014-10-20 18:29:26 +00:00
`-dmenu`
2015-09-03 22:27:34 +00:00
Run **rofi** in dmenu mode. This allows for interactive scripts.
In `dmenu` mode, **rofi** reads from STDIN, and output to STDOUT.
2015-09-03 22:53:11 +00:00
A simple example, displaying 3 pre-defined options:
2015-04-08 01:50:57 +00:00
2015-09-03 22:27:34 +00:00
echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu
2015-04-08 01:50:57 +00:00
2015-09-03 22:27:34 +00:00
Or get the options from a script:
2015-04-08 01:50:57 +00:00
2015-09-03 22:27:34 +00:00
~/my_script.sh | rofi -dmenu
2015-04-08 01:50:57 +00:00
2014-10-20 18:29:26 +00:00
`-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 keybindings
(see *KEYBINDINGS*)
2015-09-03 22:27:34 +00:00
To show the run-dialog:
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
rofi -show run
2014-10-20 18:29:26 +00:00
`-modi` *mode1,mode1*
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
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:
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
rofi -modi "run,ssh" -show run
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
Custom modes can be added using the internal 'script' mode. Each mode has two parameters:
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
<name>:<script>
2014-10-20 18:29:26 +00:00
Example: Have a mode 'Workspaces' using the `i3_switch_workspaces.sh` script:
2014-10-20 18:29:26 +00:00
rofi -modi "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces
2014-10-20 18:29:26 +00:00
2015-01-12 13:13:46 +00:00
`-case-sensitive`
2015-09-03 22:27:34 +00:00
Start in case sensitive mode.
2016-12-14 08:26:12 +00:00
This option can be changed at run-time using the `-kb-toggle-case-sensitivity` key binding.
2014-10-20 18:29:26 +00:00
`-cycle`
Cycle through the results list. Default is 'true'.
`-filter` *filter*
2015-09-03 22:27:34 +00:00
Filter the list by setting text in input bar to *filter*
`-config` *filename*
Load alternative configuration file.
2016-02-17 19:29:23 +00:00
`-scroll-method` *method*
Select the scrolling method. 0: Per page, 1: continuous.
`-no-show-match`
Hide the indicator that shows what part of the string is matched.
2017-02-02 18:00:45 +00:00
`-no-lazy-grab`
2017-02-02 18:00:45 +00:00
Disables lazy grab, this forces the keyboard being grabbed before gui is shown.
2017-03-18 14:54:35 +00:00
### Matching
`-matching` *method*
2015-10-25 09:53:22 +00:00
Specify the matching algorithm used.
Current the following methods are supported.
2015-11-25 08:16:30 +00:00
* **normal**: Match the int string.
* **regex**: Match a regex input.
* **glob**: Match a glob pattern.
* **fuzzy**: Do a fuzzy match.
2015-11-25 08:16:30 +00:00
Default: *normal*
Note: glob matching might be slow for larger lists
2015-10-25 09:53:22 +00:00
`-tokenize`
Tokenize the input.
2014-10-20 18:29:26 +00:00
### Layout
2017-03-18 14:54:35 +00:00
Most of the following options are **deprecated** and should not be used. Please use the new theme format to customize
rofi.
2014-05-22 08:37:25 +00:00
`-lines`
2015-09-03 22:27:34 +00:00
Maximum number of lines to show before scrolling.
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
rofi -lines 25
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Default: *15*
2014-05-22 08:37:25 +00:00
`-columns`
2015-09-03 22:27:34 +00:00
Number of columns to show before scrolling.
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
rofi -columns 2
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Default: *1*
2014-08-14 19:16:42 +00:00
`-width` [value]
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Set width of menu. `[value]` is specified in percentage.
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
rofi -width 60
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
If `[value]` is larger then 100, size is set in pixels. Example to span a full hd monitor:
2014-08-14 19:16:42 +00:00
2015-09-03 22:27:34 +00:00
rofi -width 1920
2014-08-14 19:16:42 +00:00
2015-09-03 22:27:34 +00:00
If `[value]` is negative, it tries to estimates a character width. To show 30 characters on a row:
2014-08-14 19:16:42 +00:00
2015-09-03 22:27:34 +00:00
rofi -width -30
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Character width is a rough estimation, and might not be correct, but should work for most monospaced fonts.
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Default: *50*
`-location`
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Specify where the window should be located. The numbers map to the following locations on screen:
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
1 2 3
8 0 4
7 6 5
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Default: *0*
2014-05-22 08:37:25 +00:00
`-fixed-num-lines`
2015-09-03 22:27:34 +00:00
Keep a fixed number of visible lines (See the `-lines` option.)
2014-05-22 08:37:25 +00:00
`-padding`
2015-09-03 22:27:34 +00:00
Define the inner margin of the window.
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Default: *5*
2015-11-04 14:55:06 +00:00
`-fullscreen`
Use the full screen height and width.
2014-11-09 12:10:24 +00:00
`-sidebar-mode`
2015-09-03 22:27:34 +00:00
Open in sidebar-mode. In this mode a list of all enabled modes is shown at the bottom.
(See `-modi` option)
To show sidebar use:
2014-11-09 12:10:24 +00:00
2015-09-03 22:27:34 +00:00
rofi -show run -sidebar-mode -lines 0
2014-11-09 12:10:24 +00:00
2015-02-24 16:34:25 +00:00
`-auto-select`
2015-09-03 22:27:34 +00:00
When one entry is left, automatically select it.
2015-02-24 16:34:25 +00:00
2015-08-02 13:45:52 +00:00
`-m` *num*
`-m` *name*
2015-08-02 13:45:52 +00:00
`-monitor` *num*
`-monitor` *name*
2016-08-20 09:22:18 +00:00
Select monitor to display **rofi** on.
As input it accepts: *primary* (if primary output is set), the *xrandr* output name or integer number (in order of
detection). Negative numbers are handled differently:
* **-1**: the currently focused monitor.
* **-2**: the currently focused window (i.e. rofi will be displayed on top of the focused window).
2016-07-11 06:29:27 +00:00
* **-3**: Position at mouse (overrides the location setting to get normal context menu
behaviour.)
2016-04-29 19:42:31 +00:00
* **-4**: the monitor with the focused window.
* **-5**: the monitor that shows the mouse pointer.
Default: *-5*
2015-08-02 13:45:52 +00:00
See `rofi -h` output for the detected monitors, their position and size.
2017-01-18 17:12:54 +00:00
`-theme` *filename*
Path to the new theme file format. This overrides the old theme settings.
`-theme-str` *string*
Allow theme parts to be specified on the commandline as an override.
For example
rofi -theme-str '#window { fullscreen: true; }'
This option can be specified multiple times.
2017-01-21 11:58:52 +00:00
`-dpi` *number*
Override the default DPI setting.
2017-01-22 13:58:59 +00:00
If set to `0` it tries to auto-detect based on X11 screen size. (Similar to i3 and GTK)
If set to `1` it tries to auto-detect based on monitor (rofi is displayed on) size. (Similar to latest QT5)
2017-01-21 11:58:52 +00:00
### PATTERN setting
2014-05-22 08:37:25 +00:00
2014-10-20 18:29:26 +00:00
`-terminal`
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
Specify what terminal to start.
2014-08-01 21:29:01 +00:00
2015-09-03 22:27:34 +00:00
rofi -terminal xterm
2014-08-01 21:29:01 +00:00
2015-09-03 22:27:34 +00:00
Pattern: *{terminal}*
Default: *x-terminal-emulator*
2014-10-20 18:29:26 +00:00
`-ssh-client` *client*
2014-10-20 18:29:26 +00:00
2015-09-03 22:27:34 +00:00
Override the used ssh client.
2014-05-22 19:56:57 +00:00
2015-09-03 22:27:34 +00:00
Pattern: *{ssh-client}*
Default: *ssh*
2014-05-22 08:37:25 +00:00
### SSH settings
`-ssh-command` *cmd*
2015-09-03 22:27:34 +00:00
Set the command to execute when starting a ssh session.
The pattern *{host}* is replaced by the selected ssh entry.
2016-12-14 08:26:12 +00:00
Pattern: *{ssh-client}*
2015-09-03 22:27:34 +00:00
Default: *{terminal} -e {ssh-client} {host}*
2015-03-29 10:27:00 +00:00
`-parse-hosts`
2015-09-03 22:27:34 +00:00
Parse the `/etc/hosts` file for entries.
2015-03-29 10:27:00 +00:00
Default: *disabled*
`-parse-known-hosts`
`-no-parse-known-hosts`
Parse the `~/.ssh/known_hosts` file for entries.
Default: *enabled*
2014-10-20 18:29:26 +00:00
### Run settings
`-run-command` *cmd*
2015-09-03 22:27:34 +00:00
Set command (*{cmd}*) to execute when running an application.
See *PATTERN*.
2015-09-03 22:27:34 +00:00
Default: *{cmd}*
`-run-shell-command` *cmd*
2015-09-03 22:27:34 +00:00
Set command to execute when running an application in a shell.
See *PATTERN*.
2015-09-03 22:27:34 +00:00
Default: *{terminal} -e {cmd}*
2015-01-05 20:53:50 +00:00
`-run-list-command` *cmd*
2015-09-03 22:27:34 +00:00
If set, use an external tool to generate list of executable commands. Uses 'run-command'
2015-01-05 20:53:50 +00:00
2015-09-03 22:27:34 +00:00
Default: *""*
### Window switcher settings
`-window-format` *format*
Format what is being displayed for windows.
*format*: {field[:len]}
*field*:
* **w**: Desktop name
* **t**: Title of window
* **n**: Name
* **r**: Role
* **c**: Class
*len*: maximum field length (0 for auto-size). If length negative and window *width* is negative field length is *width - len*.
if length is positive, the entry will be truncated or padded to fill that length.
default: {w} {c} {t}
`-window-command` *cmd*
Set command to execute on selected window for custom action.
See *PATTERN*.
Default: *"xkill -id {window}"*
2015-04-01 12:49:27 +00:00
### Combi settings
`-combi-modi` *mode1,mode2*
2015-09-03 22:27:34 +00:00
The modi to combine in combi mode.
For syntax to see `-modi`.
To get one merge view, of window,run,ssh:
2015-04-01 12:49:27 +00:00
2016-12-14 08:26:12 +00:00
rofi -show combi -combi-modi "window,run,ssh" -modi combi
2015-04-01 12:49:27 +00:00
2014-10-20 18:29:26 +00:00
### History and Sorting
2014-06-05 19:55:47 +00:00
`-disable-history`
2015-04-19 11:19:20 +00:00
`-no-disable-history` (re-enable history)
2014-06-05 19:55:47 +00:00
2015-09-03 22:27:34 +00:00
Disable history
2014-06-05 19:55:47 +00:00
2015-04-19 11:19:20 +00:00
`-levenshtein-sort` to enable
`-no-levenshtein-sort` to disable
2015-09-03 22:27:34 +00:00
When searching sort the result based on levenshtein distance.
2016-12-14 08:26:12 +00:00
This setting can be changed at runtime, see `-kb-toggle-sort`.
2014-10-20 16:11:10 +00:00
### Dmenu specific
2014-05-22 08:37:25 +00:00
2014-10-19 17:42:02 +00:00
`-sep` *separator*
2015-09-03 22:27:34 +00:00
Separator for dmenu. Example: To show list 'a' to 'e' with '|' as separator:
2014-10-20 16:11:10 +00:00
2015-09-03 22:27:34 +00:00
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
2014-10-20 16:11:10 +00:00
`-p` *prompt*
2015-09-03 22:27:34 +00:00
Specify the prompt to show in dmenu mode. E.g. select monkey a,b,c,d or e.
2014-10-20 16:11:10 +00:00
2015-09-03 22:27:34 +00:00
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey:"
2014-10-20 16:11:10 +00:00
2015-09-03 22:27:34 +00:00
Default: *dmenu*
2014-10-30 16:53:22 +00:00
2015-08-02 19:25:02 +00:00
`-selected-row` *selected row*
2015-09-03 22:27:34 +00:00
Select a certain row.
2015-09-03 22:27:34 +00:00
Default: *0*
2015-09-02 21:49:08 +00:00
`-l` *number of lines to show*
2015-09-03 22:27:34 +00:00
Maximum number of lines the menu may show before scrolling.
2015-09-03 22:27:34 +00:00
rofi -lines 25
2015-09-03 22:27:34 +00:00
Default: *15*
`-i`
2015-09-03 22:27:34 +00:00
Makes dmenu searches case-insensitive
2015-04-04 14:46:30 +00:00
`-a` *X*
2015-09-03 22:27:34 +00:00
Active row, mark row X as active. (starting at 0)
You can specify single element: -a 3
A range: -a 3-8
or a set of rows: -a 0,2
or any combination: -a 0,2-3,9
2015-04-04 14:46:30 +00:00
`-u` *X*
2015-09-03 22:27:34 +00:00
Urgent row, mark row X as urgent. (starting at 0)
You can specify single element: -u 3
A range: -u 3-8
or a set of rows: -u 0,2
or any combination: -u 0,2-3,9
2015-04-04 14:46:30 +00:00
`-only-match`
2015-09-03 22:27:34 +00:00
Only return a selected item, do not allow custom entry.
This mode always returns an entry, or returns directly when no entries given.
2015-06-11 18:38:48 +00:00
`-no-custom`
2015-09-03 22:27:34 +00:00
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.
2015-06-11 18:38:48 +00:00
2015-05-10 10:08:08 +00:00
`-format` *format*
2015-09-03 22:27:34 +00:00
Allows the output of dmenu to be customized (N is total number of input entries):
2015-05-10 10:08:08 +00:00
2015-09-03 22:27:34 +00:00
* 's' selected string.
* 'i' index (0 - (N-1)).
* 'd' index (1 - N).
* 'q' quote string.
* 'f' filter string (user input).
* 'F' quoted filter string (user input).
2015-05-24 05:48:04 +00:00
2015-09-03 22:27:34 +00:00
Default: 's'
2015-05-10 10:08:08 +00:00
2015-05-24 05:48:04 +00:00
`-select` *string*
2015-09-03 22:27:34 +00:00
Select first line that matches the given string
2015-05-24 05:48:04 +00:00
`-mesg` *string*
2015-09-03 22:27:34 +00:00
Add a message line below the filter entry box. Supports pango markup.
For more information on supported markup see [here](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html)
2015-09-20 09:45:28 +00:00
`-normal-window`
2015-06-26 14:33:13 +00:00
2016-11-30 05:54:34 +00:00
Make **rofi** react like a normal application window. Useful for scripts like Clerk that are basically an application.
2015-06-26 14:33:13 +00:00
2015-11-28 12:36:28 +00:00
`-dump`
2015-10-21 18:31:58 +00:00
2015-11-28 12:36:28 +00:00
Dump the filtered list to stdout and quit.
This can be used to get the list as **rofi** would filter it.
Use together with `-filter` command.
2015-10-21 18:31:58 +00:00
`-input` *file*
Reads from *file* instead of stdin.
2016-01-10 12:28:14 +00:00
`-password`
Hide the input text. This should not be considered secure!
2016-06-05 18:29:01 +00:00
`-markup-rows`
Tell **rofi** that DMenu input is pango markup encoded and should be rendered.
See [here](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) for details about pango markup.
2016-07-18 21:51:46 +00:00
`-multi-select`
2016-07-18 21:51:46 +00:00
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
2016-07-18 21:51:46 +00:00
2016-12-14 08:26:12 +00:00
`-sync`
Force rofi mode to first read all data from stdin before showing selection window. This is how original dmenu behaviour.
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options
such as `-dump`, `-only-match` or `-auto-select`
2016-01-10 12:28:14 +00:00
`-async-pre-read` *number*
Reads the first 25 entries blocking. Then switches to async mode. This makes it feel more 'snappy'.
*default*: 25
2014-10-20 16:11:10 +00:00
### Message dialog
`-e` *message*
2015-09-03 22:27:34 +00:00
Popup a message dialog (used internally for showing errors) with *message*.
Message can be multi-line.
2014-10-19 17:42:02 +00:00
### Other
2016-12-21 08:52:55 +00:00
`-pid` *path*
2015-09-03 22:27:34 +00:00
Make **rofi** create a pid file and check this on startup. Avoiding multiple copies running
simultaneously. This is useful when running **rofi** from a keybinding daemon.
2015-11-28 12:36:28 +00:00
`-fake-transparency`
2016-11-01 07:10:27 +00:00
Enable fake transparency. This only works with transparent background color in the theme.
2015-11-28 12:36:28 +00:00
`-fake-background`
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).
`-display-{mode}` *string*
Set the name to use for mode. This is used as prompt and in combi-browser.
`-click-to-exit`
`-no-click-to-exit`
Click the mouse outside of the **rofi** window to exit.
Default: *enabled*
2014-10-20 18:31:15 +00:00
### Debug
2014-10-20 18:29:26 +00:00
`-no-config`
2015-09-03 22:27:34 +00:00
Disable parsing of configuration. This runs rofi in *stock* mode.
2016-12-14 08:26:12 +00:00
For more information on debugging see the [wiki](https://github.com/DaveDavenport/rofi/wiki/Debugging%20Rofi)
## PATTERN
2015-09-03 22:27:34 +00:00
To launch commands (e.g. 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:
2015-09-03 22:27:34 +00:00
* `{host}`: The host to connect to.
* `{terminal}`: The configured terminal (See -terminal-emulator)
* `{ssh-client}`: The configured ssh client (See -ssh-client)
* `{cmd}`: The command to execute.
2016-12-14 08:26:12 +00:00
* `{window}`: The window id of the selected window. (In `window-command`)
2014-05-22 08:37:25 +00:00
2015-04-25 15:40:01 +00:00
## DMENU REPLACEMENT
2015-09-03 22:27:34 +00:00
If `argv[0]` (calling command) is dmenu, **rofi** will start in dmenu mode.
This way it can be used as a drop-in replacement for dmenu. just copy or symlink **rofi** to dmenu in `$PATH`.
ln -s /usr/bin/rofi /usr/bin/dmenu
2015-04-22 19:03:02 +00:00
## THEMING
2015-04-06 20:17:05 +00:00
2017-03-18 14:54:35 +00:00
The theme format below describes the old (pre version 1.4) theme format. Please see rofi-theme(5) manpage for an updated
manual.
The theme setup allows you to specify colors per state, similar to **i3**
2015-09-03 22:27:34 +00:00
Currently 3 states exists:
2015-04-06 20:17:05 +00:00
2015-09-03 22:27:34 +00:00
* **normal** Normal row.
* **urgent** Highlighted row (urgent)
* **active** Highlighted row (active)
2015-09-20 09:45:28 +00:00
2015-09-03 22:27:34 +00:00
For each state the following 5 colors must be set:
2015-04-06 20:17:05 +00:00
2015-09-03 22:27:34 +00:00
* **bg** Background color row
* **fg** Text color
* **bgalt** Background color alternating row
* **hlfg** Foreground color selected row
* **hlbg** Background color selected row
2015-04-06 20:17:05 +00:00
2015-09-03 22:27:34 +00:00
The window background and border color should be specified separate. The key `color-window` contains
2016-12-14 08:26:12 +00:00
a pair `background,border,separator`.
2015-09-03 22:27:34 +00:00
An example for `Xresources` file:
2015-04-06 20:17:05 +00:00
2015-09-03 22:30:46 +00:00
! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg'
rofi.color-normal: #fdf6e3, #002b36, #eee8d5, #586e75, #eee8d5
rofi.color-urgent: #fdf6e3, #dc322f, #eee8d5, #dc322f, #fdf6e3
rofi.color-active: #fdf6e3, #268bd2, #eee8d5, #268bd2, #fdf6e3
2015-05-24 05:48:04 +00:00
2016-12-14 08:26:12 +00:00
! 'background', 'border', 'separator'
rofi.color-window: #fdf6e3, #002b36, #002b36
2015-04-06 20:17:05 +00:00
Same settings can also be specified on command-line:
2015-09-03 22:30:46 +00:00
rofi -color-normal "#fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5"
2015-01-22 14:25:40 +00:00
2015-04-22 19:03:02 +00:00
## COLORS
2015-01-22 14:25:40 +00:00
2016-12-14 08:26:12 +00:00
RGB colors can be specified by either its X11 name, or hexadecimal notation.
For example:
white
Or
#FFFFFF
ARGB colors are also support, these can be used to create a transparent window if: 1. Your Xserver supports TrueColor, 2.
You are running a composite manager.
2015-01-22 14:25:40 +00:00
2015-09-03 22:27:34 +00:00
argb:FF444444
2015-01-22 14:25:40 +00:00
2016-12-14 08:26:12 +00:00
Or
#FF444444
2015-09-03 22:27:34 +00:00
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.
2015-01-22 14:25:40 +00:00
2016-12-14 08:26:12 +00:00
Within **rofi** transparency can be used, e.g. if the selected background color is 50% transparent, the background color
of the window will be visible through it.
2015-04-22 19:03:02 +00:00
## KEYBINDINGS
2014-05-22 08:37:25 +00:00
2015-09-03 22:27:34 +00:00
**rofi** has the following key-bindings:
2015-09-02 21:49:08 +00:00
* `Ctrl-v, Insert`: Paste clipboard
* `Ctrl-Shift-v, Shift-Insert`: Paste primary selection
* `Ctrl-u`: Clear the line
* `Ctrl-a`: Beginning of line
* `Ctrl-e`: End of line
* `Ctrl-f, Right`: Forward one character
* `Alt-f`: Forward one word
* `Ctrl-b, Left`: Back one character
* `Alt-b`: Back one word
* `Ctrl-d, Delete`: Delete character
2015-11-25 08:16:30 +00:00
* `Ctrl-Alt-d`: Delete word
2015-09-02 21:49:08 +00:00
* `Ctrl-h, Backspace`: Backspace (delete previous character)
* `Ctrl-Alt-h`: Delete previous word
* `Ctrl-j,Ctrl-m,Enter`: Accept entry
* `Ctrl-n,Down`: Select next entry
* `Ctrl-p,Up`: Select previous entry
* `Page Up`: Go to the previous page
* `Page Down`: Go to the next page
* `Ctrl-Page Up`: Go to the previous column
* `Ctrl-Page Down`: Go to the next column
* `Ctrl-Enter`: Use entered text as command (in ssh/run modi)
* `Shift-Enter`: Launch the application in a terminal (in run mode)
* `Shift-Enter`: Return the selected entry and move to the next item while keeping Rofi open. (in dmenu)
* `Shift-Right`: Switch to the next modi. The list can be customized with the `-switchers` argument.
* `Shift-Left`: Switch to the previous modi. The list can be customized with the `-switchers` argument.
* `Ctrl-Tab`: Switch to the next modi. The list can be customized with the `-switchers` argument.
* `Ctrl-Shift-Tab`: Switch to the previous modi. The list can be customized with the `-switchers` argument.
* `Ctrl-space`: Set selected item as input text.
* `Shift-Del`: Delete entry from history.
* `grave`: Toggle case sensitivity.
2015-12-13 10:50:59 +00:00
* `Alt-grave`: Toggle levenshtein sorting.
2015-12-09 07:29:18 +00:00
* `Alt-Shift-S`: Take a screenshot and store this in the Pictures directory.
2015-09-02 21:49:08 +00:00
2016-12-14 08:26:12 +00:00
To get a full list of keybindings on the commandline, see `rofi -dump-xresources | grep kb-`.
2015-09-03 22:27:34 +00:00
Keybindings can be modified using the configuration systems.
2016-12-14 08:26:12 +00:00
To get searchable list of keybindings, run `rofi -show keys`.
2015-05-02 10:38:37 +00:00
A keybinding starting with `!` will act when all keys have been released.
2015-11-25 08:16:30 +00:00
## Available Modi
### Window
Show a list of all the windows and allow switching between them.
2016-12-14 08:26:12 +00:00
Pressing the `delete-entry` binding (`shift-delete`) will close the window.
Pressing the `accept-custom` binding (`control-enter` or `shift-enter`) will run a command on the window.
2016-12-14 08:26:12 +00:00
(See option `window-command` );
2015-11-25 08:16:30 +00:00
### WindowCD
Shows a list of the windows on the current desktop and allows switching between them.
Pressing the `delete-entry` binding (`shift-delete`) will kill the window.
Pressing the `accept-custom` binding (`control-enter` or `shift-enter`) will run a command on the window.
2016-12-14 08:26:12 +00:00
(See option `window-command` );
2015-11-25 08:16:30 +00:00
### Run
Shows a list of executables in **$PATH** and can launch them (optional in a terminal).
2016-12-14 08:26:12 +00:00
Pressing the `delete-entry` binding (`shift-delete`) will remove this entry from the run history.
Pressing the `accept-custom` binding (`control-enter` or `shift-enter`) will run the command in a terminal.
2015-11-25 08:16:30 +00:00
### DRun
Same as the **run** launches, but the list is created from the installed desktop files. It automatically launches them
in a terminal if specified in the Desktop File.
2016-12-14 08:26:12 +00:00
Pressing the `delete-entry` binding (`shift-delete`) will remove this entry from the run history.
Pressing the `accept-custom` binding (`control-enter` or `shift-enter`) with custom input (no entry matching) will run the command in a terminal.
2015-11-25 08:16:30 +00:00
### SSH
Shows a list of SSH targets based on your ssh config file, and allows to quickly ssh into them.
2016-10-20 20:56:17 +00:00
### Keys
Shows a searchable list of key bindings.
2015-11-25 08:16:30 +00:00
### Script
Allows custom scripted Modi to be added.
2015-11-25 08:16:30 +00:00
2014-11-08 12:51:41 +00:00
## FAQ
### The text in the window switcher is not nicely lined out.
2014-11-08 12:51:41 +00:00
2016-04-03 12:56:23 +00:00
Try using a mono-space font.
2014-11-08 12:51:41 +00:00
### The window is completely black.
2014-12-07 15:04:22 +00:00
2016-04-03 12:56:23 +00:00
Check quotes used on the commandline: e.g. used “ instead of ".
2014-12-07 15:04:22 +00:00
### What does the icon in the top right show?
2016-04-03 12:56:23 +00:00
The indicator shows:
` ` Case insensitive and no sorting.
`-` Case sensitivity enabled, no sorting.
`+` Case insensitive and Sorting enabled
`±` Sorting and Case sensitivity enabled"
2016-12-21 08:42:04 +00:00
## EXAMPLES
Some basic usage examples of **rofi**:
Show the run dialog:
rofi -modi run -show run
Show the the run dialog and allow switching to Desktop File run dialog (drun):
rofi -modi run,drun -show run
Combine the run and Desktop File run dialog (drun):
rofi -modi combi -show combi -combi-modi run,drun
Combine the run and Desktop File run dialog (drun) and allow switching to window switcher:
rofi -modi combi,window -show combi -combi-modi run,drun
Run **rofi** full monitor width at the top of the monitor like a dropdown menu:
rofi -show run -width 100 -location 1 -lines 5 -bw 2 -yoffset -2
Get a colored list of available wifi networks:
tty-pipe nmcli device wifi | out2html -p | rofi -dmenu -markup-rows
Popup a text message claiming that this is the end:
rofi -e "This is the end"
Popup a text message in red, bold font claiming that this is still the end:
rofi -e "<span color='red'><b>This is still the end</b></span>>" -markup
Show all keybindings:
rofi -show keys
Use `qalc` to get a simple calculator in **rofi**:
rofi -show calc -modi "calc:qalc +u8 -nocurrencies"
## I3
2017-01-18 17:12:54 +00:00
In [I3](http://i3wm.org/) you want to bind rofi to be launched on key-release. Otherwise it cannot grab the keyboard.
See also the I3 [manual](http://i3wm.org/docs/userguide.html):
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 --release flag can be used, which will execute the command after the keys have
been released.
2015-04-22 19:03:02 +00:00
## LICENSE
2015-04-25 15:40:01 +00:00
MIT/X11
2015-05-24 05:48:04 +00:00
2015-04-25 15:40:01 +00:00
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
2015-05-24 05:48:04 +00:00
2015-04-25 15:40:01 +00:00
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
2015-05-24 05:48:04 +00:00
2015-04-25 15:40:01 +00:00
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2015-04-22 19:03:02 +00:00
2014-08-05 18:09:39 +00:00
## WEBSITE
**rofi** website can be found at [here](https://davedavenport.github.io/rofi/)
2014-08-03 19:51:31 +00:00
## SUPPORT
2016-11-13 17:39:21 +00:00
**rofi** support can be obtained [here](irc://irc.freenode.net/#rofi) (#rofi on irc.freenode.net), or via the
[forum](https://forum.qtools.org/)
## DEBUGGING
Please see [this](https://github.com/DaveDavenport/rofi/wiki/Debugging Rofi) wiki entry.
## ISSUE TRACKER
**rofi** issue tracker can be found [here](https://github.com/DaveDavenport/rofi/issues)
When creating an issue, please read [this](https://github.com/DaveDavenport/rofi/blob/master/.github/CONTRIBUTING.md)
first.
2016-11-13 17:39:21 +00:00
## SEE ALSO
2017-03-18 14:54:35 +00:00
rofi-sensible-terminal(1), dmenu(1), rofi-theme(5)
2016-06-06 20:21:58 +00:00
2014-08-01 21:29:01 +00:00
## AUTHOR
2014-05-22 08:37:25 +00:00
Qball Cow <qball@gmpclient.org>
2015-06-04 20:29:26 +00:00
Rasmus Steinke <rasi@xssn.at>
2015-05-05 09:33:54 +00:00
Quentin Glidic <sardemff7+rofi@sardemff7.net>
2016-04-02 08:14:13 +00:00
2016-06-06 20:21:58 +00:00
2014-05-22 08:37:25 +00:00
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
2015-04-25 15:40:01 +00:00
For a full list of authors, check the AUTHORS file.