1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00
rofi/doc/rofi.1.markdown

1059 lines
29 KiB
Markdown
Raw Normal View History

2014-08-01 17:29:01 -04:00
# ROFI 1 rofi
2014-05-22 04:37:25 -04:00
2014-08-01 17:29:01 -04:00
## NAME
2014-05-22 04:37:25 -04:00
2017-03-18 10:54:35 -04:00
**rofi** - A window switcher, application launcher, ssh dialog and dmenu replacement
2014-05-22 04:37:25 -04:00
2014-08-01 17:29:01 -04:00
## SYNOPSIS
2014-05-22 04:37:25 -04:00
2017-07-22 15:11:46 -04:00
**rofi** [ -show *mode* ]|[ -dmenu ]|[ -e *msg* ] [ CONFIGURATION ]
2014-05-22 04:37:25 -04:00
2014-08-01 17:29:01 -04:00
## 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.
2014-05-22 04:37:25 -04:00
2014-08-01 17:29:01 -04:00
## USAGE
2014-05-22 04:37:25 -04:00
**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 *modi* for different types of actions.
2014-05-22 04:37:25 -04:00
**rofi** can also function as (drop-in) replacement for **dmenu(1)**.
2016-12-14 03:26:12 -05:00
### Running rofi
2015-04-05 15:49:55 -04:00
2015-09-02 17:49:08 -04:00
To launch **rofi** directly in a certain mode, specify a mode with `rofi -show <mode>`.
To show the `run` dialog:
2015-04-05 15:49:55 -04:00
rofi -show run
2015-04-05 16:00:27 -04:00
### Emulating dmenu
2021-06-01 04:32:58 -04:00
**rofi** can emulate **dmenu(1)** (a dynamic menu for X11) when launched with the `-dmenu` flag.
2015-04-05 16:00:27 -04:00
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
2017-07-18 03:18:18 -04:00
**rofi** 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, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
2017-07-22 15:11:46 -04:00
### Display Error message
**rofi** error dialog can also be called from the command line.
2017-07-22 15:11:46 -04:00
rofi -e "my message"
Markup support can be enabled, see CONFIGURATION options.
2016-12-14 03:26:12 -05:00
## CONFIGURATION
2014-08-01 17:29:01 -04:00
2016-03-05 14:52:46 -05:00
There are currently three methods of setting configuration options (evaluated in order below):
2021-06-01 04:32:58 -04:00
* 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.
2017-07-22 16:14:15 -04:00
* Rasi theme file: The new *theme* format can be used to set configuration values.
2015-04-25 11:40:01 -04:00
* Command-line options: Arguments passed to **rofi**.
**TIP**: To get a template config file run: `rofi -dump-config > config.rasi`
2021-06-01 04:32:58 -04:00
To get a list of available options formatted in reasi format, run:
rofi -dump-config
This will contain (commented) all current configuration options.
The configuration system supports the following types:
* string
* integer (signed and unsigned)
* char
2021-06-07 17:13:21 -04:00
* boolean
* lists
2021-06-01 04:32:58 -04:00
For the syntax of these options see the **rofi-theme(5)** manpage.
For use on the commandline, Boolean options have a non-default command-line
syntax. Example to enable option X:
2015-04-25 11:40:01 -04:00
-X
2016-12-14 03:26:12 -05:00
To disable option X:
2015-04-25 11:40:01 -04:00
-no-X
Below is a list of the most important options:
2015-05-24 01:48:04 -04:00
### General
2015-11-25 03:16:30 -05:00
`-help`
The help option shows the full list of command-line options and the current set values.
2016-12-14 03:26:12 -05:00
These include dynamic (run-time generated) options.
2015-11-25 03:16:30 -05:00
`-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 0 when succesful.
2015-11-25 10:53:58 -05: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.
`-display` *display*
The X server to contact. Default is `$DISPLAY`.
2014-10-20 14:29:26 -04:00
`-dmenu`
2015-09-03 18:27:34 -04:00
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:
2015-04-07 21:50:57 -04:00
2015-09-03 18:27:34 -04:00
echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu
2015-04-07 21:50:57 -04:00
2015-09-03 18:27:34 -04:00
Or get the options from a script:
2015-04-07 21:50:57 -04:00
2015-09-03 18:27:34 -04:00
~/my_script.sh | rofi -dmenu
2015-04-07 21:50:57 -04:00
2014-10-20 14:29:26 -04: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 key bindings
(see *KEY BINDINGS*)
2015-09-03 18:27:34 -04:00
To show the run-dialog:
2014-10-20 14:29:26 -04:00
2015-09-03 18:27:34 -04:00
rofi -show run
2014-10-20 14:29:26 -04:00
`-modi` *mode1,mode2*
2014-10-20 14:29:26 -04:00
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:
2014-10-20 14:29:26 -04:00
2015-09-03 18:27:34 -04:00
rofi -modi "run,ssh" -show run
2014-10-20 14:29:26 -04:00
Custom modes can be added using the internal `script` mode. Each such mode has two parameters:
2014-10-20 14:29:26 -04:00
2015-09-03 18:27:34 -04:00
<name>:<script>
2014-10-20 14:29:26 -04:00
Example: Have a mode called 'Workspaces' using the `i3_switch_workspaces.sh` script:
2014-10-20 14:29:26 -04:00
rofi -modi "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces
2014-10-20 14:29:26 -04:00
Notes: The i3 window manager does not like commas in the command when specifying an exec command.
2017-03-31 14:57:42 -04:00
For that case '#' can be used as an separator.
2015-01-12 08:13:46 -05:00
`-case-sensitive`
2015-09-03 18:27:34 -04:00
Start in case sensitive mode.
2016-12-14 03:26:12 -05:00
This option can be changed at run-time using the `-kb-toggle-case-sensitivity` key binding.
2014-10-20 14:29:26 -04:00
`-cycle`
2017-11-23 12:41:52 -05:00
Cycle through the result list. Default is 'true'.
`-filter` *filter*
2015-09-03 18:27:34 -04:00
Filter the list by setting text in input bar to *filter*
`-config` *filename*
Load an alternative configuration file.
`-cache-dir` *filename*
Directory that is used to place temporary files, like history.
2016-02-17 14:29:23 -05:00
`-scroll-method` *method*
Select the scrolling method. 0: Per page, 1: continuous.
`-normalize-match`
Normalize the string before matching, so o will match ö, and é matches e.
This is not a perfect implementation, but works.
For now it disabled highlighting of the matched part.
2017-02-02 13:00:45 -05:00
`-no-lazy-grab`
2017-02-02 13:00:45 -05:00
Disables lazy grab, this forces the keyboard being grabbed before gui is shown.
`-no-plugins`
Disable plugin loading.
`-plugin-path` *directory*
Specify the directory where **rofi** should look for plugins.
2017-11-01 17:01:05 -04:00
`-show-icons`
Show application icons in `drun` and `window` modes.
2017-11-01 17:01:05 -04:00
2018-06-09 16:17:32 -04:00
`-icon-theme`
2017-11-01 17:01:05 -04:00
2018-06-09 16:17:32 -04:00
Specify icon theme to be used.
2017-11-01 17:01:05 -04:00
If not specified default theme from DE is used, *Adwaita* and *gnome* themes act as
fallback themes.
`-markup`
Use Pango markup to format output wherever possible.
`-normal-window`
Make **rofi** react like a normal application window. Useful for scripts like Clerk that are basically an application.
`-[no-]steal-focus`
2021-03-27 11:28:27 -04:00
Make rofi steal focus on launch and restore close to window that held it when launched.
2021-03-27 11:28:27 -04:00
2017-03-18 10:54:35 -04:00
### Matching
`-matching` *method*
2015-10-25 05:53:22 -04:00
Specify the matching algorithm used.
Current the following methods are supported.
2015-11-25 03:16:30 -05:00
* **normal**: match the int string
* **regex**: match a regex input
* **glob**: match a glob pattern
* **fuzzy**: do a fuzzy match
* **prefix**: match prefix
2015-11-25 03:16:30 -05:00
Default: *normal*
Note: glob matching might be slow for larger lists
2015-10-25 05:53:22 -04:00
`-tokenize`
Tokenize the input.
`-drun-categories` *category1*,*category2*
Only show desktop files that are present in the listed categories.
`-drun-match-fields` *field1*,*field2*,...
When using `drun`, match only with the specified Desktop entry fields.
The different fields are:
* **name**: the application's name
* **generic**: the application's generic name
2018-10-17 17:02:50 -04:00
* **exec**: the application's executable
* **categories**: the application's categories
* **comment**: the application comment
* **all**: all of the above
Default: *name,generic,exec,categories,keywords*
2018-10-17 17:02:50 -04:00
`-drun-display-format`
The format string for the `drun` dialog:
2018-10-17 17:02:50 -04:00
* **name**: the application's name
* **generic**: the application's generic name
* **exec**: the application's executable
* **categories**: the application's categories
* **comment**: the application comment
Pango markup can be used to formatting the output.
Default: {name} [<span weight='light' size='small'><i>({generic})</i></span>]
2018-10-17 17:02:50 -04:00
Note: Only fields enabled in `-drun-match-fields` can be used in the format string.
`-[no-]drun-show-actions`
Show actions present in the Desktop files.
Default: false
`-window-match-fields` *field1*,*field2*,...
2018-10-17 17:02:50 -04:00
When using window mode, match only with the specified fields.
The different fields are:
* **title**: window's title
* **class**: window's class
2018-10-17 17:02:50 -04:00
* **role**: window's role
* **name**: window's name
* **desktop**: window's current desktop
* **all**: all of the above
Default: *all*
`-matching-negate-char` *char*
Set the character used to negate the query (i.e. if it does **not** match the next keyword ).
Set to '\x0' to disable.
Default: '-'
2014-10-20 14:29:26 -04:00
### Layout
2017-03-18 10:54:35 -04:00
Most of the following options are **deprecated** and should not be used. Please use the new theme format to customize
**rofi**. More information about the new format can be found in the **rofi-theme(5)** manpage.
2017-03-18 10:54:35 -04:00
2014-05-22 04:37:25 -04:00
`-lines`
2015-09-03 18:27:34 -04:00
Maximum number of lines to show before scrolling.
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
rofi -lines 25
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Default: *15*
2014-05-22 04:37:25 -04:00
`-columns`
2015-09-03 18:27:34 -04:00
Number of columns to show before scrolling.
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
rofi -columns 2
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Default: *1*
2014-08-14 15:16:42 -04:00
`-width` [value]
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Set width of menu. `[value]` is specified in percentage.
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
rofi -width 60
2014-05-22 04:37:25 -04:00
If `[value]` is larger then 100, size is set in pixels. Example to span a full-HD monitor:
2014-08-14 15:16:42 -04:00
2015-09-03 18:27:34 -04:00
rofi -width 1920
2014-08-14 15:16:42 -04:00
If `[value]` is negative, it tries to estimates a character width. To show 30 characters in a row:
2014-08-14 15:16:42 -04:00
2015-09-03 18:27:34 -04:00
rofi -width -30
2014-05-22 04:37:25 -04:00
Character width is a rough estimate, and might not be correct, but should work for most monospaced fonts.
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Default: *50*
`-location`
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Specify where the window should be located. The numbers map to the following locations on screen:
2014-05-22 04:37:25 -04:00
2014-08-01 17:29:01 -04:00
1 2 3
8 0 4
7 6 5
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Default: *0*
2014-05-22 04:37:25 -04:00
`-fixed-num-lines`
2015-09-03 18:27:34 -04:00
Keep a fixed number of visible lines (See the `-lines` option.)
2014-05-22 04:37:25 -04:00
`-padding`
2015-09-03 18:27:34 -04:00
Define the inner margin of the window.
2014-05-22 04:37:25 -04:00
2015-09-03 18:27:34 -04:00
Default: *5*
2014-11-09 07:10:24 -05:00
`-sidebar-mode`
2015-09-03 18:27:34 -04: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 07:10:24 -05:00
2015-09-03 18:27:34 -04:00
rofi -show run -sidebar-mode -lines 0
2014-11-09 07:10:24 -05:00
`-hover-select`
Automatically select the entry the mouse is hovering over. This option is best combined with custom mouse bindings.
To utilize hover-select and accept an entry in a single click, use:
rofi -show run -hover-select -me-select-entry '' -me-accept-entry MousePrimary
`-eh` *number*
Set row height (in chars)
Default: *1*
2015-02-24 11:34:25 -05:00
`-auto-select`
2015-09-03 18:27:34 -04:00
When one entry is left, automatically select it.
2015-02-24 11:34:25 -05:00
2015-08-02 09:45:52 -04:00
`-m` *num*
`-m` *name*
2015-08-02 09:45:52 -04:00
`-monitor` *num*
`-monitor` *name*
2016-08-20 05:22:18 -04:00
Select monitor to display **rofi** on.
It accepts as input: *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 (that is, **rofi** will be displayed on top of the focused window).
2016-07-11 02:29:27 -04:00
* **-3**: Position at mouse (overrides the location setting to get normal context menu
behavior.)
2016-04-29 15:42:31 -04:00
* **-4**: the monitor with the focused window.
* **-5**: the monitor that shows the mouse pointer.
Default: *-5*
2015-08-02 09:45:52 -04:00
See `rofi -h` output for the detected monitors, their position, and size.
2017-01-18 12:12:54 -05: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 command line as an override.
2017-01-18 12:12:54 -05:00
For example:
2017-01-18 12:12:54 -05:00
rofi -theme-str '#window { fullscreen: true; }'
This option can be specified multiple times.
2017-01-21 06:58:52 -05:00
`-dpi` *number*
Override the default DPI setting.
* 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 the size of the monitor that **rofi** is displayed on (similar to latest Qt 5).
2017-01-21 06:58:52 -05:00
2020-03-29 06:58:28 -04:00
`-selected-row` *selected row*
Select a certain row.
Default: *0*
### PATTERN setting
2014-05-22 04:37:25 -04:00
2014-10-20 14:29:26 -04:00
`-terminal`
2014-05-22 04:37:25 -04:00
Specify which terminal to start.
2014-08-01 17:29:01 -04:00
2015-09-03 18:27:34 -04:00
rofi -terminal xterm
2014-08-01 17:29:01 -04:00
2015-09-03 18:27:34 -04:00
Pattern: *{terminal}*
2015-09-03 18:27:34 -04:00
Default: *x-terminal-emulator*
2014-10-20 14:29:26 -04:00
`-ssh-client` *client*
2014-10-20 14:29:26 -04:00
Override the used `ssh` client.
2014-05-22 15:56:57 -04:00
2015-09-03 18:27:34 -04:00
Pattern: *{ssh-client}*
2015-09-03 18:27:34 -04:00
Default: *ssh*
2014-05-22 04:37:25 -04:00
### SSH settings
`-ssh-command` *cmd*
2015-09-03 18:27:34 -04:00
Set the command to execute when starting a ssh session.
The pattern *{host}* is replaced by the selected ssh entry.
2016-12-14 03:26:12 -05:00
Pattern: *{ssh-client}*
2015-09-03 18:27:34 -04:00
Default: *{terminal} -e {ssh-client} {host}*
2015-03-29 06:27:00 -04:00
`-parse-hosts`
2015-09-03 18:27:34 -04:00
Parse the `/etc/hosts` file for entries.
2015-03-29 06:27:00 -04:00
Default: *disabled*
`-parse-known-hosts`
`-no-parse-known-hosts`
Parse the `~/.ssh/known_hosts` file for entries.
Default: *enabled*
2014-10-20 14:29:26 -04:00
### Run settings
`-run-command` *cmd*
2015-09-03 18:27:34 -04:00
Set command (*{cmd}*) to execute when running an application.
See *PATTERN*.
2015-09-03 18:27:34 -04:00
Default: *{cmd}*
`-run-shell-command` *cmd*
2015-09-03 18:27:34 -04:00
Set command to execute when running an application in a shell.
See *PATTERN*.
2015-09-03 18:27:34 -04:00
Default: *{terminal} -e {cmd}*
2015-01-05 15:53:50 -05:00
`-run-list-command` *cmd*
If set, use an external tool to generate list of executable commands. Uses `run-command`.
2015-01-05 15:53:50 -05:00
Default: *{cmd}*
### 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 and window *width* are 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 a alt action (`-kb-accept-alt`).
See *PATTERN*.
Default: *"wmctrl -i -R {window}"*
2020-04-29 06:59:49 -04:00
`-window-thumbnail`
Show window thumbnail (if available) as icon in the window switcher.
2015-04-01 08:49:27 -04:00
### Combi settings
`-combi-modi` *mode1*,*mode2*
2015-04-01 08:49:27 -04:00
2015-09-03 18:27:34 -04:00
The modi to combine in combi mode.
For syntax to `-combi-modi`, see `-modi`.
To get one merge view, of `window`,`run`, and `ssh`:
2015-04-01 08:49:27 -04:00
2016-12-14 03:26:12 -05:00
rofi -show combi -combi-modi "window,run,ssh" -modi combi
2015-04-01 08:49:27 -04:00
**NOTE**: The i3 window manager does not like commas in the command when specifying an exec command.
For that case '#' can be used as a separator.
2014-10-20 14:29:26 -04:00
### History and Sorting
2014-06-05 15:55:47 -04:00
`-disable-history`
2015-04-19 07:19:20 -04:00
`-no-disable-history` (re-enable history)
2014-06-05 15:55:47 -04:00
2015-09-03 18:27:34 -04:00
Disable history
2014-06-05 15:55:47 -04:00
2017-10-03 13:51:27 -04:00
`-sort` to enable
`-no-sort` to disable
Enable, disable sorting.
This setting can be changed at runtime (see `-kb-toggle-sort`).
`-sorting-method` 'method' to specify the sorting method.
There are 2 sorting method:
* levenshtein (Default)
* fzf sorting.
2017-10-03 13:51:27 -04:00
`-max-history-size` *number*
Maximum number of entries to store in history. Defaults to 25. (WARNING: can cause slowdowns when set to high)
2014-10-20 12:11:10 -04:00
### Dmenu specific
2014-05-22 04:37:25 -04:00
2014-10-19 13:42:02 -04:00
`-sep` *separator*
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
2014-10-20 12:11:10 -04:00
2015-09-03 18:27:34 -04:00
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
2014-10-20 12:11:10 -04:00
`-p` *prompt*
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
2014-10-20 12:11:10 -04:00
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
2014-10-20 12:11:10 -04:00
2015-09-03 18:27:34 -04:00
Default: *dmenu*
2014-10-30 12:53:22 -04:00
2015-09-02 17:49:08 -04:00
`-l` *number of lines to show*
2015-09-03 18:27:34 -04:00
Maximum number of lines the menu may show before scrolling.
2015-09-03 18:27:34 -04:00
rofi -lines 25
2015-09-03 18:27:34 -04:00
Default: *15*
`-i`
Makes `dmenu` searches case-insensitive
2015-04-04 10:46:30 -04:00
`-a` *X*
Active row, mark *X* as active. Where *X* is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify:
* A single row: '5'
* A range of (last 3) rows: '-3:'
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
* A set of rows: '2,0,-9'
* Or any combination: '5,-3:,7:11,2,0,-9'
2015-04-04 10:46:30 -04:00
`-u` *X*
Urgent row, mark *X* as urgent. See `-a` option for details.
2015-04-04 10:46:30 -04:00
`-only-match`
2015-09-03 18:27:34 -04:00
Only return a selected item, do not allow custom entry.
This mode always returns an entry. It will not return if no matching entry is
selected.
2015-06-11 14:38:48 -04:00
`-no-custom`
2015-09-03 18:27:34 -04:00
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.
2015-06-11 14:38:48 -04:00
2015-05-10 06:08:08 -04:00
`-format` *format*
Allows the output of dmenu to be customized (N is the total number of input entries):
2015-05-10 06:08:08 -04:00
* 's' selected string
* 'i' index (0 - (N-1))
* 'd' index (1 - N)
* 'q' quote string
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
* 'f' filter string (user input)
* 'F' quoted filter string (user input)
2015-05-24 01:48:04 -04:00
2015-09-03 18:27:34 -04:00
Default: 's'
2015-05-10 06:08:08 -04:00
2015-05-24 01:48:04 -04:00
`-select` *string*
2015-09-03 18:27:34 -04:00
Select first line that matches the given string
2015-05-24 01:48:04 -04:00
`-mesg` *string*
Add a message line below the filter entry box. Supports Pango markup.
For more information on supported markup see [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html)
2015-06-26 10:33:13 -04:00
2015-11-28 07:36:28 -05:00
`-dump`
2015-10-21 14:31:58 -04:00
2015-11-28 07:36:28 -05: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 14:31:58 -04:00
`-input` *file*
Reads from *file* instead of stdin.
2016-01-10 07:28:14 -05:00
`-password`
Hide the input text. This should not be considered secure!
2016-06-05 14:29:01 -04:00
`-markup-rows`
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
2016-06-05 14:29:01 -04:00
2016-07-18 17:51:46 -04:00
`-multi-select`
2016-07-18 17:51:46 -04:00
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
2016-07-18 17:51:46 -04:00
2016-12-14 03:26:12 -05:00
`-sync`
Force **rofi** mode to first read all data from stdin before showing the selection window. This is original dmenu behavior.
2016-12-14 03:26:12 -05:00
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 07:28:14 -05:00
`-async-pre-read` *number*
Reads the first *number* entries blocking, then switches to async mode.
This makes it feel more 'snappy'.
*default*: 25
`-window-title` *title*
Set name used for the window title. Will be shown as Rofi - *title*
`-w` *windowid*
Position **rofi** over the window with the given X11 window ID.
`-keep-right`
Set ellipsize mode to start. So end of string is visible.
2014-10-20 12:11:10 -04:00
### Message dialog
`-e` *message*
Pops up a message dialog (used internally for showing errors) with *message*.
2015-09-03 18:27:34 -04:00
Message can be multi-line.
2014-10-19 13:42:02 -04:00
### File browser settings
`-file-browser-directory` *directory*
Directory the file browser starts in.
### Other
`-drun-use-desktop-cache`
Build and use a cache with the content of desktop files. Usable for systems with slow hard drives.
`-drun-reload-desktop-cache`
If `drun-use-desktop-cache` is enabled, rebuild a cache with the content of desktop files.
2016-12-21 03:52:55 -05:00
`-pid` *path*
Make **rofi** create a pid file and check this on startup. The pid file prevents multiple **rofi** instances from running simultaneously. This is useful when running **rofi** from a key-binding daemon.
2015-11-28 07:36:28 -05:00
`-fake-transparency`
2016-11-01 03:10:27 -04:00
Enable fake transparency. This only works with transparent background color in the theme.
2015-11-28 07:36:28 -05: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*
## 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:
* `{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
* `{window}`: the window ID of the selected window (in `window-command`)
2014-05-22 04:37:25 -04:00
2015-04-25 11:40:01 -04:00
## DMENU REPLACEMENT
2015-09-03 18:27:34 -04: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 15:03:02 -04:00
## THEMING
2015-04-06 16:17:05 -04:00
2021-06-07 17:13:21 -04:00
Please see **rofi-theme(5)** manpage for more information on themeing.
2016-12-14 03:26:12 -05:00
## KEY BINDINGS
2014-05-22 04:37:25 -04:00
**rofi** has the following key bindings:
2015-09-02 17:49:08 -04:00
* `Ctrl-v, Insert`: Paste from clipboard
2015-09-02 17:49:08 -04:00
* `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, Ctrl-Right`: Forward one word
2015-09-02 17:49:08 -04:00
* `Ctrl-b, Left`: Back one character
* `Alt-b, Ctrl-Left`: Back one word
2015-09-02 17:49:08 -04:00
* `Ctrl-d, Delete`: Delete character
2015-11-25 03:16:30 -05:00
* `Ctrl-Alt-d`: Delete word
* `Ctrl-h, Backspace, Shift-Backspace`: Backspace (delete previous character)
2015-09-02 17:49:08 -04:00
* `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 previous page
* `Page Down`: Go to next page
* `Ctrl-Page Up`: Go to previous column
* `Ctrl-Page Down`: Go to next column
* `Ctrl-Enter`: Use entered text as a command (in `ssh/run modi`)
2015-09-02 17:49:08 -04:00
* `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 mode. The list can be customized with the `-switchers` argument.
* `Shift-Left`: Switch to the previous mode. The list can be customized with the `-switchers` argument.
* `Ctrl-Tab`: Switch to the next mode. The list can be customized with the `-switchers` argument.
* `Ctrl-Shift-Tab`: Switch to the previous mode. The list can be customized with the `-switchers` argument.
2015-09-02 17:49:08 -04:00
* `Ctrl-space`: Set selected item as input text.
* `Shift-Del`: Delete entry from history.
* `grave`: Toggle case sensitivity.
* `Alt-grave`: Toggle sorting.
* `Alt-Shift-S`: Take a screenshot and store it in the Pictures directory.
* `Ctrl-l`: File complete for run dialog.
2015-09-02 17:49:08 -04:00
2017-12-12 16:03:19 -05:00
To get a full list of key bindings on the commandline, see `rofi -h`.
The options starting with `-kb` are keybindings.
Key bindings can be modified using the configuration systems.
To get a searchable list of key bindings, run `rofi -show keys`.
2015-05-02 06:38:37 -04:00
A key binding starting with `!` will act when all keys have been released.
2015-11-25 03:16:30 -05:00
## Available Modi
### window
2015-11-25 03:16:30 -05:00
Show a list of all the windows and allow switching between them.
2016-12-14 03:26:12 -05: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 03:26:12 -05:00
(See option `window-command` );
2015-11-25 03:16:30 -05:00
2021-06-07 17:13:21 -04:00
If there is no match, it will try to launch the input.
### windowcd
2015-11-25 03:16:30 -05:00
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 03:26:12 -05:00
(See option `window-command` );
2015-11-25 03:16:30 -05:00
If there is no match, it will try to launch the input.
### run
2015-11-25 03:16:30 -05:00
Shows a list of executables in `$PATH` and can launch them (optional in a terminal).
2016-12-14 03:26:12 -05: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 03:16:30 -05:00
2021-06-07 17:13:21 -04:00
When pressing the `mode-complete` binding (`Control-l`), you can use the File Browser mode to launch the application
with a file as the first argument.
### drun
2015-11-25 03:16:30 -05:00
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 03:26:12 -05: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 03:16:30 -05:00
2021-06-07 17:13:21 -04:00
The DRUN mode tries to follows the [XDG Desktop Entry
Specification](https://freedesktop.org/wiki/Specifications/desktop-entry-spec/) and should be compatible with
applications using this standard. Some application create invalid desktop files, **rofi** will discard these entries.
See de debugging section how to get more information from the DRUN mode, this will print why desktop files are
discarded.
### ssh
2015-11-25 03:16:30 -05:00
Shows a list of SSH targets based on your `ssh` config file, and allows to quickly `ssh` into them.
2015-11-25 03:16:30 -05:00
### keys
2016-10-20 16:56:17 -04:00
Shows a searchable list of key bindings.
### script
2015-11-25 03:16:30 -05:00
2021-06-07 17:13:21 -04:00
Allows custom scripted Modi to be added, see the **rofi-script(5)** manpage for more information.
2015-11-25 03:16:30 -05:00
### combi
Combines multiple modi in one list. Specify which modi are included with the `-combi-modi` option.
When using the combi mode, a *!bang* can be used to filter the results by modi.
All modi that match the bang as a prefix are included.
For example, say you have specified `-combi-modi run,window,windowcd`. If your
query begins with the bang `!w`, only results from the `window` and `windowcd`
modi are shown, even if the rest of the input text would match results from `run`.
If no match, the input is handled by the first combined modi.
2014-11-08 07:51:41 -05:00
## FAQ
### The text in the window switcher is not nicely aligned.
2014-11-08 07:51:41 -05:00
2016-04-03 08:56:23 -04:00
Try using a mono-space font.
2014-11-08 07:51:41 -05:00
### The window is completely black.
2014-12-07 10:04:22 -05:00
Check quotes used on the command-line: you might have used `“` ("smart quotes") instead of `"` ("machine quotes").
2014-12-07 10:04:22 -05:00
### What does the icon in the top right show?
2016-04-03 08:56:23 -04: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 03:42:04 -05:00
## EXAMPLES
Some basic usage examples of **rofi**:
Show the run dialog:
rofi -modi run -show run
Show the run dialog, and allow switching to Desktop File run dialog (`drun`):
2016-12-21 03:42:04 -05:00
rofi -modi run,drun -show run
Combine the run and Desktop File run dialog (`drun`):
2016-12-21 03:42:04 -05:00
rofi -modi combi -show combi -combi-modi run,drun
Combine the run and Desktop File run dialog (`drun`), and allow switching to window switcher:
2016-12-21 03:42:04 -05:00
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
Pop up a text message claiming that this is the end:
2016-12-21 03:42:04 -05:00
rofi -e "This is the end"
Pop up a text message in red, bold font claiming that this is still the end:
2016-12-21 03:42:04 -05:00
2017-11-18 06:40:05 -05:00
rofi -e "<span color='red'><b>This is still the end</b></span>" -markup
2016-12-21 03:42:04 -05:00
Show all key bindings:
2016-12-21 03:42:04 -05:00
rofi -show keys
Use `qalc` to get a simple calculator in **rofi**:
rofi -show calc -modi "calc:qalc +u8 -nocurrencies"
## i3
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, as it will execute the command after the keys have
been released.
2015-04-22 15:03:02 -04:00
## LICENSE
2015-04-25 11:40:01 -04:00
MIT/X11
2015-05-24 01:48:04 -04:00
2015-04-25 11:40:01 -04: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 01:48:04 -04:00
2015-04-25 11:40:01 -04:00
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
2015-05-24 01:48:04 -04:00
2015-04-25 11:40:01 -04: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 15:03:02 -04:00
2014-08-05 14:09:39 -04:00
## WEBSITE
**rofi** website can be found [here](https://davedavenport.github.io/rofi/)
2014-08-03 15:51:31 -04:00
## SUPPORT
2021-06-07 17:13:21 -04:00
**rofi** support can be obtained:
* [GitHub Discussions](https://github.com/davatorium/rofi/discussions)
* [Forum (reddit)](https://reddit.com/r/qtools//)
* [IRC](irc://irc.libera.chat:6697/#rofi) (#rofi on irc.libera.chat),
2016-11-13 12:39:21 -05:00
## DEBUGGING
2021-06-07 17:13:21 -04:00
To debug it is smart to first try disabling your custom configuration:
`-no-config`
Disable parsing of configuration. This runs rofi in *stock* mode.
If you run custom C plugins, you can disable them using:
`-no-plugins`
Disables the loading of plugins.
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G_MESSAGES_DEBUG
environment variable. At creation of this page the following debug domains exists:
* all: Show debug information from all domains.
* X11Helper: The X11 Helper functions.
* View: The main rofi_view functions.
* Widgets.Box: The Box widget.
* Dialogs.DMenu: The dmenu mode.
* Dialogs.Run: The run mode.
* Dialogs.DRun: The desktop file run mode.
* Dialogs.Window: The window mode.
* Dialogs.Script: The script mode.
* Dialogs.Combi: The script mode.
* Dialogs.Ssh: The ssh mode.
* Rofi: The main application.
* Timings: Get timing output.
* Theme: Theme engine debug output. (warning lots of output).
* Widgets.Icon: The Icon widget.
* Widgets.Box: The box widget.
* Widgets.Container: The container widget.
* Widgets.Window: The window widget.
* Helpers.IconFetcher: Information about icon lookup.
The output of this can provide useful information when writing an issue.
More information (possibly outdated) see [this](https://github.com/DaveDavenport/rofi/wiki/Debugging Rofi) wiki entry.
## ISSUE TRACKER
The **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 12:39:21 -05:00
## SEE ALSO
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-theme-selector(1)**
2016-06-06 16:21:58 -04:00
2014-08-01 17:29:01 -04:00
## AUTHOR
2014-05-22 04:37:25 -04:00
* Qball Cow <qball@gmpclient.org>
* Rasmus Steinke <rasi@xssn.at>
* Quentin Glidic <sardemff7+rofi@sardemff7.net>
2016-06-06 16:21:58 -04:00
2014-05-22 04:37:25 -04:00
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
2015-04-25 11:40:01 -04:00
For a full list of authors, check the `AUTHORS` file.