rofi/doc/rofi-manpage.markdown

395 lines
8.9 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
rofi - A window switcher, run dialog and dmenu replacement
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* ] [ -fg *color* ]
2014-05-22 08:37:25 +00:00
[ -bg *color* ] [ -hlfg *color* ] [ -hlbg *color* ] [ -key *combo* ] [ -dkey *comdo* ] [ -rkey *comdo* ]
[ -terminal *terminal* ] [ -location *position* ] [ -hmode ] [ -fixed-num-lines ] [ -padding *padding* ]
2014-05-22 08:37:25 +00:00
[ -opacity *opacity%* ] [ -display *display* ] [ -bc *color* ] [ -bw *width* ] [ -dmenu [ -p *prompt* ] ]
[ -ssh-client *client* ] [ -ssh-command *command* ] [ -now ] [ -rnow ] [ -snow ] [ -version ]
[ -help] [ -dump-xresources ] [ -disable-history ] [ -levenshtein-sort ] [ -show *mode* ] [ -switcher
2014-10-30 16:53:22 +00:00
*mode1,mode2* ] [ -e *message*] [ -sep *separator* ] [ -eh *element height* ]
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
## DESCRIPTION
**rofi** is an X11 popup window switcher. A list is displayed center-screen showing open window titles, WM_CLASS, and desktop number.
2014-05-22 08:37:25 +00:00
The user may filter the list by typing, navigate with Up/Down or Tab keys, and select a window with Return (Enter). Escape cancels.
2014-08-01 21:29:01 +00:00
## License
2014-05-22 08:37:25 +00:00
MIT/X11
2014-08-01 21:29:01 +00:00
## USAGE
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
**rofi** can be used in two ways, single-shot; executes once and directly exits when done or as
2014-05-22 08:37:25 +00:00
daemon listening to specific key-combinations.
The default key combinations are:
* `F12`
Show all windows on all desktops.
* `mod1-F2`
Show run-dialog.
* `mod1-F3`
Show run-dialog.
2014-08-01 21:29:01 +00:00
## OPTIONS
2014-05-22 08:37:25 +00:00
`-key`
2014-08-01 21:29:01 +00:00
Change the key combination to display all windows (default: F12).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -key F12
rofi -key control+shift+s
rofi -key mod1+Tab
2014-05-22 08:37:25 +00:00
`-rkey`
2014-08-01 21:29:01 +00:00
Change the key combination to display the run dialog (default: mod1-F2).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -rkey F11
rofi -rkey control+shift+d
rofi -rkey mod1+grave (grave=backtick)
2014-05-22 08:37:25 +00:00
`-skey`
2014-08-01 21:29:01 +00:00
Change the key combination to display the ssh dialog (default: Alt-F3).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -skey F10
rofi -skey control+shift+s
rofi -skey mod1+grave (grave=backtick)
2014-05-22 08:37:25 +00:00
`-now`
2014-08-01 21:29:01 +00:00
Run rofi in all-windows mode once then exit. Does not bind any keys.
2014-05-22 08:37:25 +00:00
`-rnow`
2014-08-01 21:29:01 +00:00
Run rofi in run-dialog mode once then exit. Does not bind any keys.
2014-05-22 08:37:25 +00:00
`-snow`
2014-08-01 21:29:01 +00:00
Run rofi in ssh mode once then exit. Does not bind any keys.
2014-05-22 08:37:25 +00:00
2014-10-20 18:29:26 +00:00
`-dmenu`
Run rofi in dmenu mode. Allowing it to be used for user interaction in scripts.
Pressing `shift-enter` will open the selected entries and move to the next entry.
`-show` *mode*
Open rofi in a certain mode.
For example to show the run-dialog:
rofi -show run
This function deprecates -rnow,-snow and -now
`-switchers` *mode1,mode1*
Give a comma separated list of modes to enable, in what order.
For example to only show the run and ssh dialog (in that order):
rofi -switchers "run,ssh" -show run
Custom modes can be added using the internal 'script' mode. Each mode has two parameters:
<name>:<script>
So to have a mode 'Workspaces' using the `i3_switch_workspace.sh` script type:
rofi -switchers "window,run,ssh,Workspaces:i3_switch_workspaces.sh" -show Workspaces
### Theming
2014-05-22 08:37:25 +00:00
`-bg`
2014-08-01 21:29:01 +00:00
Set the background text color (X11 named color or hex #rrggbb) for the menu (default: #222222).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -fg "#222222"
2014-05-22 08:37:25 +00:00
`-bc`
2014-08-01 21:29:01 +00:00
Set the border color (X11 named color or hex #rrggbb) for the menu (default: #000000).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -bc black
2014-05-22 08:37:25 +00:00
`-bw`
2014-08-01 21:29:01 +00:00
Set the border width in pixels (default: 1).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -bw 1
2014-05-22 08:37:25 +00:00
`-fg`
2014-08-01 21:29:01 +00:00
Set the foreground text color (X11 named color or hex #rrggbb) for the menu (default: #cccccc).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -fg "#cccccc"
2014-05-22 08:37:25 +00:00
`-font`
Pango font name for use by the menu (default: mono 14).
2014-05-22 08:37:25 +00:00
rofi -font monospace\ 14
2014-05-22 08:37:25 +00:00
`-hlbg`
2014-08-01 21:29:01 +00:00
Set the background text color (X11 named color or hex #rrggbb) for the highlighted item in the
menu (default: #005577).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -fg "#005577"
2014-05-22 08:37:25 +00:00
`-hlfg`
2014-08-01 21:29:01 +00:00
Set the foreground text color (X11 named color or hex #rrggbb) for the highlighted item in the
menu (default: #ffffff).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -fg "#ffffff"
2014-05-22 08:37:25 +00:00
`-opacity`
2014-08-01 21:29:01 +00:00
Set the window opacity (0-100).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -opacity "75"
2014-05-22 08:37:25 +00:00
2014-10-20 18:29:26 +00:00
### Layout
2014-05-22 08:37:25 +00:00
`-lines`
2014-08-01 21:29:01 +00:00
Maximum number of lines the menu may show before scrolling (default: 25).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -lines 25
2014-05-22 08:37:25 +00:00
`-columns`
2014-08-01 21:29:01 +00:00
The number of columns the menu may show before scrolling (default: 25).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -columns 2
2014-05-22 08:37:25 +00:00
2014-08-14 19:16:42 +00:00
`-width` [value]
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
Set the width of the menu as a percentage of the screen width (default: 60).
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -width 60
2014-05-22 08:37:25 +00:00
2014-08-14 19:16:42 +00:00
If value is larger then 100, the size is set in pixels. e.g. to span a full hd monitor:
2014-10-20 18:29:26 +00:00
rofi -width 1980
2014-08-14 19:16:42 +00:00
If the value is negative, it tries to estimates a character width. To show 30 characters on a row:
2014-10-20 18:29:26 +00:00
rofi -width -30
2014-05-22 08:37:25 +00:00
2014-10-20 18:29:26 +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
`-location`
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
Specify where the window should be located. The numbers map to the following location on the
monitor:
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
`-hmode`
Switch to horizontal mode (ala dmenu). The number of elements is the number of `lines` times the
number of `columns`.
`-fixed-num-lines`
2014-08-01 21:29:01 +00:00
Keep a fixed number of visible lines (See the `-lines` option.)
2014-05-22 08:37:25 +00:00
`-padding`
2014-08-01 21:29:01 +00:00
Define the inner margin of the window. Default is 5 pixels.
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
To make rofi look like dmenu:
2014-05-22 08:37:25 +00:00
2014-08-01 21:29:01 +00:00
rofi -hmode -padding 0
2014-05-22 08:37:25 +00:00
2014-11-09 12:10:24 +00:00
`-sidebar-mode`
Go into side-bar mode, it will show list of modi at the bottom.
To show sidebar use:
rofi -rnow -sidebar-mode -lines 0
2014-10-20 18:29:26 +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
2014-10-20 18:29:26 +00:00
Specify what terminal to start (default x-terminal-emulator)
2014-08-01 21:29:01 +00:00
2014-10-20 18:29:26 +00:00
rofi -terminal xterm
2014-08-01 21:29:01 +00:00
2014-10-20 18:29:26 +00:00
`-ssh-client` *client*
2014-05-22 19:56:57 +00:00
2014-10-20 18:29:26 +00:00
Override the used ssh client. Default is `ssh`.
### SSH settings
2014-05-22 19:56:57 +00:00
2014-05-22 08:37:25 +00:00
`-ssh-set-title` *true|false*
SSH dialogs tries to set 'ssh hostname' of the spawned terminal.
Not all terminals support this.
Default value is true.
*This command has been deprecated for the ssh-command string*
`-ssh-command` *cmd*
Set the command to execute when starting a ssh session.
2014-10-20 18:29:26 +00:00
### Run settings
`-run-command` *cmd*
Set the command to execute when running an application.
See *PATTERN*.
`-run-shell-command` *cmd*
Set the command to execute when running an application in a shell.
See *PATTERN*.
2014-10-20 18:29:26 +00:00
### History and Sorting
2014-06-05 19:55:47 +00:00
`-disable-history`
Disable history
`-levenshtein-sort`
When searching sort the result based on levenshtein distance.
Note that levenshtein sort is disabled in dmenu mode.
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*
2014-10-20 16:11:10 +00:00
Separator for dmenu. For example to show list a to e with '|' as separator:
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
`-p` *prompt*
Specify the prompt to show in dmenu mode. E.g. select monkey a,b,c,d or e.
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey:"
2014-10-30 16:53:22 +00:00
`-eh` *element height*
The height of a field in lines. e.g.
echo -e "a\n3|b\n4|c\n5" | rofi -sep '|' -eh 2 -dmenu
2014-10-20 16:11:10 +00:00
### Message dialog
`-e` *message*
Popup a message dialog (used internally for showing errors) with *message*.
Message can be multi-line.
2014-10-19 17:42:02 +00:00
2014-10-20 18:31:15 +00:00
### Debug
2014-10-20 18:29:26 +00:00
`-dump-xresources`
Dump the current active configuration in xresources format to the command-line.
## Pattern
To launch commands (e.g. when using the ssh dialog) the user can enter the used commandline,
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.
2014-05-22 08:37:25 +00:00
## Dmenu replacemnt
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/dmenu /usr/bin/rofi
## Signals
`HUP`
If in daemon mode, reload the configuration from Xresources. (arguments still override).
2014-08-05 18:09:39 +00:00
## Keybindings
2014-05-22 08:37:25 +00:00
2014-08-05 18:09:39 +00:00
Rofi supports the following keybindings:
2014-08-03 19:51:31 +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
* `Ctrl-b, Left`: Back one character
* `Ctrl-d, Delete`: Delete character
* `Ctrl-h, Backspace`: Backspace (delete previous character)
* `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 dialog)
2014-08-05 18:09:39 +00:00
* `?`: Switch to the next modi. The list can be customized with the `-switchers` argument.
2014-11-11 20:50:16 +00:00
* `ctrl-/`: Switch to the previous modi. The list can be customized with the `-switchers` argument.
* `Ctrl-space`: Set selected item as input text.
2014-08-05 18:09:39 +00:00
2014-11-08 12:51:41 +00:00
## FAQ
`Text in window switcher is not nicely lined out`
Try using a mono-space font.
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
**rofi** bugtracker can be found [here](https://github.com/DaveDavenport/rofi/issues)
2014-08-01 21:29:01 +00:00
## AUTHOR
2014-05-22 08:37:25 +00:00
Qball Cow <qball@gmpclient.org>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>