File: README.md

package info (click to toggle)
rofi 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,108 kB
  • sloc: ansic: 22,718; sh: 1,865; lex: 656; yacc: 549; makefile: 523; xml: 166
file content (262 lines) | stat: -rw-r--r-- 10,469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
[![Build Status](https://travis-ci.org/DaveDavenport/rofi.svg?branch=master)](https://travis-ci.org/DaveDavenport/rofi)
[![codecov.io](https://codecov.io/github/DaveDavenport/rofi/coverage.svg?branch=master)](https://codecov.io/github/DaveDavenport/rofi?branch=master)
[![Issues](https://img.shields.io/github/issues/DaveDavenport/rofi.svg)](https://github.com/DaveDavenport/rofi/issues)
[![Forks](https://img.shields.io/github/forks/DaveDavenport/rofi.svg)](https://github.com/DaveDavenport/rofi/network)
[![Stars](https://img.shields.io/github/stars/DaveDavenport/rofi.svg)](https://github.com/DaveDavenport/rofi/stargazers)
[![Downloads](https://img.shields.io/github/downloads/DaveDavenport/rofi/total.svg)](https://github.com/DaveDavenport/rofi/releases)
[![Coverity](https://scan.coverity.com/projects/3850/badge.svg)](https://scan.coverity.com/projects/davedavenport-rofi)
[![Forum](https://img.shields.io/badge/forum-online-green.svg)](https://reddit.com/r/qtools/)

# A window switcher, Application launcher and dmenu replacement

**Rofi** started as a clone of simpleswitcher, written by [Sean Pringle](http://github.com/seanpringle/simpleswitcher) a
popup window switcher roughly based on [superswitcher](http://code.google.com/p/superswitcher/).
Simpleswitcher laid the foundations, and therefor Sean Pringle deserves most of the credit for this tool. **Rofi**
(renamed, as it lost the *simple* property) has been extended with extra features, like an application launcher,
ssh-launcher and can act as a drop-in dmenu replacement, making it a very versatile tool.

**Rofi**, like dmenu, will provide the user with a textual list of options where one or more can be selected.
This can either be, running an application, selecting a window or options provided by an external script.

Its main features are:

* fully configurable keyboard navigation
* type to filter
    - tokenized: type any word in any order to filter
    - (togglable) case insensitive
    - support for fuzzy-, regex-, and glob matching
* UTF-8 enabled
    - UTF-8-aware string collating
    - international keyboard support (`e -> è)
* RTL language support
* Cairo drawing and Pango font rendering
* built-in modes:
    - window switcher mode
        - EWMH compatible WM
    - application launcher
    - desktop file application launcher
    - SSH launcher mode
    - Combi mode, allowing several modes to be merged into one list
* history-based ordering — last 25 choices are ordered on top based on use (optional)
* Levenshtein distance ordering of matches (optional)
* drop-in dmenu replacement
    - many added improvements
* easily extensible using scripts
* theming

**Rofi** has several built-in modes implementing common use cases and can be exteneded by scripts (either called from
**Rofi** or calling **Rofi**).

Below the different modes are listed:

## Window Switcher

![Window List](https://davedavenport.github.io/rofi/images/rofi/window-list.png)

The window switcher shows the following informations in columns (can be customized):

1. Desktop name
2. Window class
3. Window title

Window mode features:

  - closing applications with `Shift-Delete`
  - custom command with `Shift-Return`


## Application launcher

![run mode](https://davedavenport.github.io/rofi/images/rofi/run-dialog.png)

The run mode allows users to quickly search for and launch a program.

Run mode features:

  - `Shift-Return` to run the selected program in a terminal
  - favorites list, with frequently used programs sorted on top
  - custom entries, like aliases, added by executing a command


## Desktop File Application launcher

The desktop run mode allows users to quickly search and launch an application from the *freedesktop.org* Desktop
Entries. These are used by most Desktop Environments to populate launchers and menus.
Drun mode features:

  - favorites list, with frequently used programs sorted on top
  - auto starting terminal applications in a terminal

## SSH launcher

![SSH Launcher](https://davedavenport.github.io/rofi/images/rofi/ssh-dialog.png)

Quickly `ssh` into remote machines

  - parses `~/.ssh/config` to find hosts

## Script mode

Loads external scripts to add modes to **Rofi**, for example a file-browser.

```
rofi  -show fb -modi fb:../Examples/rofi-file-browser.sh
```

## COMBI mode

Combine multiple modes in one view. This is especially useful when merging the window and run mode into one view.
Allowing to quickly switch to an application, either by switching to it when it is already running or starting it.

Example to combine Desktop run and the window switcher:

```
rofi -combi-modi window,drun -show combi -modi combi
```

## dmenu replacement

![DMENU replacement (running teiler)](https://davedavenport.github.io/rofi/images/rofi/dmenu-replacement.png)

Drop in dmenu replacement. (Screenshot shows rofi used by
[teiler](https://github.com/carnager/teiler) ).

**Rofi** features several improvements over dmenu to improve usability. There is the option to add
an extra message bar (`-mesg`), pre-entering of text (`-filter`), or selecting entries based on a
pattern (`-select`). Also highlighting (`-u` and `-a`) options and modi to force user to select one
provided option (`-only-match`). In addition to this, rofi's dmenu mode can select multiple lines and
write them to stdout.

# Usage

If used with `-show [mode]`, rofi will immediately open in the specified [mode]

If used with `-dmenu`, rofi will use data from STDIN to let the user select an option.

For example, to show a run dialog:

  `rofi -show run`

To show a ssh dialog:

  `rofi -show ssh`

## dmenu

If rofi is passed the `-dmenu` option, or run as `dmenu` (ie, /usr/bin/dmenu is symlinked to /usr/bin/rofi),
it will use the data passed from STDIN.

```
~/scripts/my_script.sh | rofi -dmenu
echo -e "Option #1\nOption #2\nOption #3" | rofi -dmenu
```

In both cases, rofi will output the user's selection to STDOUT.

## Switching Between Modi

Type `Shift-/Left/Right` to switch between active modi.


## Key bindings

| Key                         | Action                                                             |
|:----------------------------|:-------------------------------------------------------------------|
|`Ctrl-v, Insert`             | Paste from clipboard |
|`Ctrl-Shift-v, Shift-Insert` | Paste primary selection |
|`Ctrl-w`                     | Clear the line |
|`Ctrl-u`                     | Delete till the start of line |
|`Ctrl-a`                     | Move to beginning of line |
|`Ctrl-e`                     | Move to end of line |
|`Ctrl-f, Right`              | Move forward one character |
|`Alt-f`                      | Move forward one word |
|`Ctrl-b, Left`               | Move back one character |
|`Alt-b`                      | Move back one word |
|`Ctrl-d, Delete`             | Delete character |
|`Ctrl-Alt-d`                 | Delete word |
|`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 a 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 -modi option. |
|`Shift-Left`                 | Switch to the previous modi. The list can be customized with the -modi option. |
|`Ctrl-Tab`                   | Switch to the next modi. The list can be customized with the -modi option. |
|`Ctrl-Shift-Tab`             | Switch to the previous modi. The list can be customized with the -modi option. |
|`Ctrl-space`                 | Set selected item as input text. |
|`Shift-Del`                  | Delete entry from history. |
|`grave`                      | Toggle case sensitivity. |
|`Alt-grave`                  | Toggle levenshtein sort. |
|`Alt-Shift-S`                | Take a screenshot and store it in the Pictures directory. |

For the full list of key bindings, see: `rofi -show keys` or `rofi -help`.

# Configuration

There are currently three methods of setting configuration options:

 * Local configuration. Normally, depending on XDG, in `~/.config/rofi/config`. This uses the Xresources format.
 * Xresources: A method of storing key values in the Xserver. See
   [here](https://en.wikipedia.org/wiki/X_resources) for more information.
 * Command line options: Arguments are passed to **Rofi**.

A distribution can ship defaults in `/etc/rofi.conf`.

The Xresources options and the command line options are aliased. To define option X set:

    rofi.X: value

In the Xresources file. To set/override this from command line pass the same key
prefixed with '-':

    rofi -X value

To get a list of available options formatted as Xresources entries, run:

    rofi -dump-Xresources

or in a more readable format:

    rofi -help

The configuration system supports the following types:

 * string
 * integer (signed and unsigned)
 * char
 * Boolean

The Boolean option has a non-default command line syntax, to enable option X you do:

    rofi -X

to disable it:

    rofi -no-X

# Manpage

For more detailed information, please see the [manpage](doc/rofi.1.markdown), the [wiki](https://github.com/DaveDavenport/rofi/wiki), or the [forum](https://reddit.com/r/qtools/).

# Installation

Please see the [installation guide](https://github.com/DaveDavenport/rofi/blob/next/INSTALL.md) for instructions on how to
install **Rofi**.

# What is rofi not?

Rofi is not:

 * A preview application. In other words, it will not show a (small) preview of images, movies or other files.
 * A UI toolkit.
 * A library to be used in other applications.
 * An application that can support every possible use-case. It tries to be generic enough to be usable by everybody.
   Specific functionality can be added using scripts.
 * Just a dmenu replacement. The dmenu functionality is a nice 'extra' to **rofi**, not its main purpose.