2021-01-17 10:36:51 -05:00
[![Codacy Badge ](https://api.codacy.com/project/badge/Grade/ca0310962a7c4b829d0c57f1ab023531 )](https://app.codacy.com/app/davatorium/rofi?utm_source=github.com\&utm_medium=referral\&utm_content=davatorium/rofi\&utm_campaign=Badge_Grade_Settings)
2019-05-14 05:52:21 -04:00
[![Build Status ](https://travis-ci.org/davatorium/rofi.svg?branch=master )](https://travis-ci.org/davatorium/rofi)
[![codecov.io ](https://codecov.io/github/davatorium/rofi/coverage.svg?branch=master )](https://codecov.io/github/davatorium/rofi?branch=master)
[![Issues ](https://img.shields.io/github/issues/davatorium/rofi.svg )](https://github.com/davatorium/rofi/issues)
[![Forks ](https://img.shields.io/github/forks/davatorium/rofi.svg )](https://github.com/davatorium/rofi/network)
[![Stars ](https://img.shields.io/github/stars/davatorium/rofi.svg )](https://github.com/davatorium/rofi/stargazers)
[![Downloads ](https://img.shields.io/github/downloads/davatorium/rofi/total.svg )](https://github.com/davatorium/rofi/releases)
2016-10-17 14:58:50 -04:00
[![Coverity ](https://scan.coverity.com/projects/3850/badge.svg )](https://scan.coverity.com/projects/davedavenport-rofi)
2017-04-11 03:06:11 -04:00
[![Forum ](https://img.shields.io/badge/forum-online-green.svg )](https://reddit.com/r/qtools/)
2021-01-17 10:36:51 -05:00
[![Packages ](https://repology.org/badge/tiny-repos/rofi.svg )](https://repology.org/metapackage/rofi/versions)
2015-12-31 15:33:20 -05:00
2017-03-24 04:51:57 -04:00
# A window switcher, Application launcher and dmenu replacement
2014-08-28 15:36:53 -04:00
2019-01-02 04:51:59 -05:00
**Rofi** started as a clone of simpleswitcher, written by [Sean Pringle ](http://github.com/seanpringle/simpleswitcher ) - a
2016-12-07 12:20:05 -05:00
popup window switcher roughly based on [superswitcher ](http://code.google.com/p/superswitcher/ ).
2019-01-02 04:51:59 -05:00
Simpleswitcher laid the foundations, and therefore Sean Pringle deserves most of the credit for this tool. **Rofi**
2021-01-17 10:36:51 -05:00
(renamed, as it lost the *simple* property) has been extended with extra features, like an application launcher and
2019-01-02 04:51:59 -05:00
ssh-launcher, and can act as a drop-in dmenu replacement, making it a very versatile tool.
2016-07-04 11:29:58 -04:00
**Rofi**, like dmenu, will provide the user with a textual list of options where one or more can be selected.
2019-01-02 04:51:59 -05:00
This can either be running an application, selecting a window, or options provided by an external script.
2015-01-20 17:34:53 -05:00
2017-07-31 08:30:05 -04:00
Its main features are:
2021-01-17 10:36:51 -05:00
* Fully configurable keyboard navigation
* Type to filter
* Tokenized: type any word in any order to filter
* Case insensitive (togglable)
* 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
2017-07-31 08:30:05 -04:00
2018-07-11 16:26:06 -04:00
**Rofi** has several built-in modes implementing common use cases and can be extended by scripts (either called from
2016-12-07 12:20:05 -05:00
**Rofi** or calling **Rofi** ).
2015-05-04 09:37:54 -04:00
2019-01-02 04:51:59 -05:00
Below is a list of the different modes:
2015-05-04 09:37:54 -04:00
## Window Switcher
2019-04-18 14:00:57 -04:00
![Window List ](https://davatorium.github.io/rofi/images/rofi/window-list.png )
2015-05-04 09:37:54 -04:00
2016-07-04 11:29:58 -04:00
The window switcher shows the following informations in columns (can be customized):
2015-05-04 09:37:54 -04:00
2021-01-17 10:36:51 -05:00
1. Desktop name
2. Window class
3. Window title
2015-05-04 09:37:54 -04:00
2016-12-07 12:20:05 -05:00
Window mode features:
2021-01-17 10:36:51 -05:00
* Closing applications with `Shift-Delete`
* Custom command with `Shift-Return`
2016-12-07 12:20:05 -05:00
2017-03-24 04:51:57 -04:00
## Application launcher
2015-05-04 09:37:54 -04:00
2019-04-18 14:00:57 -04:00
![run mode ](https://davatorium.github.io/rofi/images/rofi/run-dialog.png )
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
The run mode allows users to quickly search for and launch a program.
2016-12-07 12:20:05 -05:00
2016-07-18 10:03:16 -04:00
Run mode features:
2015-05-04 09:37:54 -04:00
2021-01-17 10:36:51 -05:00
* `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
2016-07-04 03:29:43 -04:00
2017-03-24 04:51:57 -04:00
## Desktop File Application launcher
2016-07-04 03:29:43 -04:00
2016-07-18 10:03:16 -04:00
The desktop run mode allows users to quickly search and launch an application from the *freedesktop.org* Desktop
2017-07-31 08:30:05 -04:00
Entries. These are used by most Desktop Environments to populate launchers and menus.
2016-07-18 10:03:16 -04:00
Drun mode features:
2016-07-04 03:29:43 -04:00
2021-01-17 10:36:51 -05:00
* Favorites list, with frequently used programs sorted on top
* Auto starting terminal applications in a terminal
2015-12-07 02:56:47 -05:00
2015-05-04 09:37:54 -04:00
## SSH launcher
2019-04-18 14:00:57 -04:00
![SSH Launcher ](https://davatorium.github.io/rofi/images/rofi/ssh-dialog.png )
2015-05-04 09:37:54 -04:00
2020-07-08 13:16:48 -04:00
Quickly `ssh` into remote machines. Parses `~/.ssh/config` and `~/.ssh/known_hosts` to find hosts.
2015-05-04 09:37:54 -04:00
2016-07-04 11:29:58 -04:00
## Script mode
Loads external scripts to add modes to **Rofi** , for example a file-browser.
2021-01-17 10:36:51 -05:00
rofi -show fb -modi fb:../Examples/rofi-file-browser.sh
2016-07-28 02:11:23 -04:00
2016-07-04 11:29:58 -04:00
## COMBI mode
2017-07-31 08:30:05 -04:00
Combine multiple modes in one view. This is especially useful when merging the window and run mode into one view.
2016-07-04 11:29:58 -04:00
Allowing to quickly switch to an application, either by switching to it when it is already running or starting it.
2015-05-04 09:37:54 -04:00
2016-07-28 02:11:23 -04:00
Example to combine Desktop run and the window switcher:
2021-01-17 10:36:51 -05:00
rofi -combi-modi window,drun -show combi -modi combi
2016-07-28 02:11:23 -04:00
2015-05-04 09:37:54 -04:00
## dmenu replacement
2019-04-18 14:00:57 -04:00
![DMENU replacement (running teiler) ](https://davatorium.github.io/rofi/images/rofi/dmenu-replacement.png )
2015-05-04 09:37:54 -04:00
Drop in dmenu replacement. (Screenshot shows rofi used by
[teiler ](https://github.com/carnager/teiler ) ).
2016-07-04 11:29:58 -04:00
**Rofi** features several improvements over dmenu to improve usability. There is the option to add
2017-07-31 08:30:05 -04:00
an extra message bar (`-mesg`), pre-entering of text (`-filter`), or selecting entries based on a
2015-05-26 10:50:41 -04:00
pattern (`-select`). Also highlighting (`-u` and `-a` ) options and modi to force user to select one
2017-07-31 08:30:05 -04:00
provided option (`-only-match`). In addition to this, rofi's dmenu mode can select multiple lines and
2016-12-07 12:20:05 -05:00
write them to stdout.
2015-05-26 10:50:41 -04:00
2015-05-04 09:37:54 -04:00
# Usage
2021-01-17 10:36:51 -05:00
If used with `-show [mode]` , rofi will immediately open in the specified \[mode].
2015-05-04 09:37:54 -04:00
If used with `-dmenu` , rofi will use data from STDIN to let the user select an option.
2017-07-31 08:30:05 -04:00
For example, to show a run dialog:
2015-05-04 09:37:54 -04:00
2021-01-17 10:36:51 -05:00
`rofi -show run`
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
To show a ssh dialog:
2015-05-04 09:37:54 -04:00
2021-01-17 10:36:51 -05:00
`rofi -show ssh`
2015-05-04 09:37:54 -04:00
## dmenu
2017-07-31 08:30:05 -04:00
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.
2015-05-04 09:37:54 -04:00
2021-01-17 10:36:51 -05:00
~/scripts/my_script.sh | rofi -dmenu
echo -e "Option #1 \nOption #2 \nOption #3 " | rofi -dmenu
2015-05-04 09:37:54 -04:00
In both cases, rofi will output the user's selection to STDOUT.
## Switching Between Modi
2016-07-18 10:03:16 -04:00
Type `Shift-/Left/Right` to switch between active modi.
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
## Key bindings
2015-05-04 09:37:54 -04:00
2018-06-13 08:15:31 -04:00
| 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, Ctrl-Right` | Move forward one word |
|`Ctrl-b, Left` | Move back one character |
|`Alt-b, Ctrl-Left` | Move back one word |
|`Ctrl-d, Delete` | Delete character |
|`Ctrl-Alt-d` | Delete word |
|`Ctrl-h, Backspace, Shift-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. |
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
For the full list of key bindings, see: `rofi -show keys` or `rofi -help` .
2015-05-04 09:37:54 -04:00
# Configuration
There are currently three methods of setting configuration options:
2021-01-17 10:36:51 -05:00
* 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** .
2015-05-04 09:37:54 -04:00
2016-12-07 12:20:05 -05:00
A distribution can ship defaults in `/etc/rofi.conf` .
2017-07-31 08:30:05 -04:00
The Xresources options and the command line options are aliased. To define option X set:
2015-05-04 09:37:54 -04:00
2019-01-02 04:51:59 -05:00
`rofi.X: value`
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
In the Xresources file. To set/override this from command line pass the same key
2016-07-18 10:03:16 -04:00
prefixed with '-':
2015-05-04 09:37:54 -04:00
2019-01-02 04:51:59 -05:00
`rofi -X value`
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
To get a list of available options formatted as Xresources entries, run:
2015-05-04 09:37:54 -04:00
2019-01-02 04:51:59 -05:00
`rofi -dump-Xresources`
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
or in a more readable format:
2016-07-04 11:29:58 -04:00
2019-01-02 04:51:59 -05:00
`rofi -help`
2016-07-04 11:29:58 -04:00
2015-05-04 09:37:54 -04:00
The configuration system supports the following types:
2021-01-17 10:36:51 -05:00
* String
* Integer (signed and unsigned)
* Char
* Boolean
2015-05-04 09:37:54 -04:00
2017-07-31 08:30:05 -04:00
The Boolean option has a non-default command line syntax, to enable option X you do:
2015-05-04 09:37:54 -04:00
2019-01-02 04:51:59 -05:00
`rofi -X`
2015-05-04 09:37:54 -04:00
to disable it:
2019-01-02 04:51:59 -05:00
`rofi -no-X`
2017-03-24 04:51:57 -04:00
2016-12-13 15:32:42 -05:00
# Manpage
2019-05-14 05:52:21 -04:00
For more detailed information, please see the [manpage ](doc/rofi.1.markdown ), the [wiki ](https://github.com/davatorium/rofi/wiki ), or the [forum ](https://reddit.com/r/qtools/ ).
2015-05-04 09:37:54 -04:00
# Installation
2019-05-14 05:52:21 -04:00
Please see the [installation guide ](https://github.com/davatorium/rofi/blob/next/INSTALL.md ) for instructions on how to
2016-07-04 11:29:58 -04:00
install **Rofi** .
2016-12-22 09:59:13 -05:00
# What is rofi not?
Rofi is not:
2021-01-17 10:36:51 -05:00
* 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.