summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS6
-rw-r--r--README.md4
-rw-r--r--doc/rofi-manpage.markdown94
-rw-r--r--doc/rofi.1129
-rw-r--r--include/mode.h4
-rw-r--r--include/view.h8
-rw-r--r--source/dialogs/script.c4
-rw-r--r--source/rofi.c5
-rw-r--r--source/view.c13
-rw-r--r--source/widgets/scrollbar.c6
-rw-r--r--source/x11-helper.c4
11 files changed, 185 insertions, 92 deletions
diff --git a/AUTHORS b/AUTHORS
index e9c37674..072edefd 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,5 @@
+Anton Löfgren
+bendem
Benjamin Cremer
Benjamin R. Haskell
Bruno Braga
@@ -10,6 +12,7 @@ Deiwin Sarjas
Dimitar Yordanov
Edwin Pujols
Eric Engeström
+fice-t
Gabriel Holodak
Gareth Poole
Georgios Bitzes
@@ -23,6 +26,7 @@ Jasper Lievisse Adriaanse
Klemens Schölhorn
marduk
Michael Vetter
+Niklas Haas
N. Izumi
Paulo Flabiano Smorigo
Peter Cannici
@@ -32,11 +36,13 @@ Rasmus Steinke
Roomcays
Sebastian Reuße
Simon Hanna
+Stanislav Seletskiy
Thomas Adam
Thorsten Wißmann
Tilman Blumenbach
Tobias Kortkamp
Tom Hinton
+Wieland Hoffmann
Yaroslav
seanpringle
vimeitor
diff --git a/README.md b/README.md
index a346aa69..991ac09f 100644
--- a/README.md
+++ b/README.md
@@ -240,6 +240,10 @@ The boolean option has a non-default commandline syntax, to enable option X you
to disable it:
rofi -no-X
+
+# Manpage
+
+For more detailed information, please see the [manpage](doc/rofi-manpage.markdown), the [wiki](https://github.com/DaveDavenport/rofi/wiki) or the [forum](https://forum.qtools.org).
# Installation
diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown
index 6790d844..ffd49623 100644
--- a/doc/rofi-manpage.markdown
+++ b/doc/rofi-manpage.markdown
@@ -29,7 +29,6 @@
[ -show *mode* ]
[ -modi *mode1,mode2* ]
[ -eh *element height* ]
-[ -lazy-filter-limit *limit* ]
[ -e *message*]
[ -a *row* ]
[ -u *row* ]
@@ -59,33 +58,38 @@ filter, tokenized search and more.
## USAGE
-**rofi** can be used in two ways, single-shot (runs a mode then exits) or emulating dmenu.
+**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.
-### Single-shot mode
+**rofi** can also function as (drop in) replacement for **dmenu(1)**.
+
+### Running rofi
To launch **rofi** directly in a certain mode, specify a mode with `rofi -show <mode>`.
To show the run dialog:
rofi -show run
+
### Emulating dmenu
-**rofi** can emulate `dmenu` (a dynamic menu for X) when launched with the `-dmenu` flag.
+**rofi** can emulate **dmenu(1)** (a dynamic menu for X) when launched with the `-dmenu` flag.
-The official website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
+The "official" website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
-## OPTIONS
+## CONFIGURATION
There are currently three methods of setting configuration options (evaluated in order below):
+ * 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.
- By default XDG_USER_CONFIG_DIR defaults to `$HOME/.config`.
+ By default XDG_USER_CONFIG_DIR defaults to `$HOME/.config`. (See `rofi -h` for current location).
* Command-line options: Arguments passed to **rofi**.
- * System configuration file (f.e. /etc/rofi.conf).
The Xresources file expects options starting with `rofi.` followed by it's name. An Example to set the number of lines:
@@ -111,7 +115,7 @@ Boolean options have a non-default command-line syntax. Example to enable option
-X
-to disable it:
+To disable option X:
-no-X
@@ -122,7 +126,7 @@ Below is a list of the most important options:
`-help`
The help option shows the full list of commandline options and the current set value.
-These include dynamic options.
+These include dynamic (run-time generated) options.
`-dump-xresources`
@@ -153,11 +157,9 @@ Or get the options from a script:
~/my_script.sh | rofi -dmenu
-Pressing the `accept-custom` binding (`control-enter` or `shift-enter`) sends the selected entry to STDOUT and moves to the next entry.
-
`-show` *mode*
-Open **rofi** in a certain mode. Available modes are `window`, `run`, `ssh`
+Open **rofi** in a certain mode. Available modes are `window`, `run`,`drun`, `ssh`, `combi`
To show the run-dialog:
rofi -show run
@@ -182,6 +184,7 @@ Example: Have a mode 'Workspaces' using the `i3_switch_workspaces.sh` script:
`-case-sensitive`
Start in case sensitive mode.
+This option can be changed at run-time using the `-kb-toggle-case-sensitivity` key binding.
`-cycle`
@@ -201,7 +204,7 @@ Select the scrolling method. 0: Per page, 1: continuous.
### Theming
-All colors are either hex #rrggbb values or X11 color names.
+All colors are either hex #rrggbb, #aarrggbb or argb:aarrggbbvalues or X11 color names.
`-bw`
@@ -353,15 +356,6 @@ To show sidebar use:
rofi -show run -sidebar-mode -lines 0
-`-lazy-filter-limit` *limit*
-
-The number of entries required for **rofi** to go into lazy filter mode.
-In lazy filter mode, it won't re-filter the list on each keypress, but only after **rofi** been
-idle for 250ms. Experiments shows that the default (5000 lines) works well, set to 0 to always
-enable.
-
-Default: *5000*
-
`-auto-select`
When one entry is left, automatically select it.
@@ -415,6 +409,7 @@ Default: *ssh*
Set the command to execute when starting a ssh session.
The pattern *{host}* is replaced by the selected ssh entry.
+Pattern: *{ssh-client}*
Default: *{terminal} -e {ssh-client} {host}*
`-parse-hosts`
@@ -467,7 +462,7 @@ The modi to combine in combi mode.
For syntax to see `-modi`.
To get one merge view, of window,run,ssh:
- rofi -show combi -combi-modi "window,run,ssh"
+ rofi -show combi -combi-modi "window,run,ssh" -modi combi
### History and Sorting
@@ -480,6 +475,7 @@ Disable history
`-no-levenshtein-sort` to disable
When searching sort the result based on levenshtein distance.
+This setting can be changed at runtime, see `-kb-toggle-sort`.
### Dmenu specific
@@ -591,6 +587,10 @@ See [here](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html) for
Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry.
+`-sync`
+
+Force rofi mode to first read all data from stdin before showing selection window. This is how original dmenu behaviour.
+
### Window Mode
`-window-format` *format*
@@ -608,6 +608,7 @@ Format what is being displayed for windows.
* **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}
@@ -653,6 +654,8 @@ Default: *enabled*
Disable parsing of configuration. This runs rofi in *stock* mode.
+For more information on debugging see the [wiki](https://github.com/DaveDavenport/rofi/wiki/Debugging%20Rofi)
+
## PATTERN
To launch commands (e.g. when using the ssh launcher) the user can enter the used command-line,
@@ -662,6 +665,7 @@ the following keys can be used that will be replaced at runtime:
* `{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`)
## DMENU REPLACEMENT
@@ -672,9 +676,8 @@ This way it can be used as a drop-in replacement for dmenu. just copy or symlink
## THEMING
-With **rofi** 0.15.4 we have a new way of specifying colors, the old settings still apply (for now).
-To enable the new setup, set `rofi.color-enabled` to true. The new setup allows you to specify
-colors per state, similar to **i3**
+With **rofi** 0.15.4 we have a new way of specifying theme colors.
+The new setup allows you to specify colors per state, similar to **i3**
Currently 3 states exists:
* **normal** Normal row.
@@ -690,7 +693,7 @@ For each state the following 5 colors must be set:
* **hlbg** Background color selected row
The window background and border color should be specified separate. The key `color-window` contains
-a pair `background,border`.
+a pair `background,border,separator`.
An example for `Xresources` file:
! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg'
@@ -698,8 +701,8 @@ An example for `Xresources` file:
rofi.color-urgent: #fdf6e3, #dc322f, #eee8d5, #dc322f, #fdf6e3
rofi.color-active: #fdf6e3, #268bd2, #eee8d5, #268bd2, #fdf6e3
- ! 'background', 'border'
- rofi.color-window: #fdf6e3, #002b36
+ ! 'background', 'border', 'separator'
+ rofi.color-window: #fdf6e3, #002b36, #002b36
Same settings can also be specified on command-line:
@@ -707,16 +710,30 @@ Same settings can also be specified on command-line:
## COLORS
-Rofi has an experimental mode for a 'nicer' transparency. The idea is to make the
-background of the window transparent, leaving the text opaque.
-There are 2 requirements for this feature: 1. Your Xserver supports TrueColor, 2. You are running a
-composite manager. If this is satisfied you can use the following format for colors:
+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.
argb:FF444444
+Or
+
+ #FF444444
+
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.
+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.
+
## KEYBINDINGS
**rofi** has the following key-bindings:
@@ -754,8 +771,9 @@ The first two fields specify the alpha level. This determines the amount of tran
* `Alt-grave`: Toggle levenshtein sorting.
* `Alt-Shift-S`: Take a screenshot and store this in the Pictures directory.
-To get a full list of keybindings, see `rofi -dump-xresources | grep kb-`.
+To get a full list of keybindings on the commandline, see `rofi -dump-xresources | grep kb-`.
Keybindings can be modified using the configuration systems.
+To get searchable list of keybindings, run `rofi -show keys`.
A keybinding starting with `!` will act when all keys have been released.
@@ -764,24 +782,28 @@ A keybinding starting with `!` will act when all keys have been released.
### Window
Show a list of all the windows and allow switching between them.
-Pressing the `delete-entry` binding (`shift-delete`) will kill the window.
+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.
+(See option `window-command` );
### 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.
+(See option `window-command` );
### Run
Shows a list of executables in **$PATH** and can launch them (optional in a terminal).
+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.
### 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.
+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.
### SSH
diff --git a/doc/rofi.1 b/doc/rofi.1
index 6451fa8a..b40156e2 100644
--- a/doc/rofi.1
+++ b/doc/rofi.1
@@ -1,21 +1,24 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "ROFI\-MANPAGE" "" "2016-11-30" "" ""
+.TH "ROFI\-MANPAGE" "" "2016-12-14" "" ""
.
.SH "NAME"
\fBrofi\fR \- A window switcher, run launcher, ssh dialog and dmenu replacement
.
.SH "SYNOPSIS"
-\fBrofi\fR [ \-width \fIpct_scr\fR ] [ \-lines \fIlines\fR ] [ \-columns \fIcolumns\fR ] [ \-font \fIpangofont\fR ] [ \-terminal \fIterminal\fR ] [ \-location \fIposition\fR ] [ \-fixed\-num\-lines ] [ \-padding \fIpadding\fR ] [ \-display \fIdisplay\fR ] [ \-bw \fIwidth\fR ] [ \-dmenu [ \-p \fIprompt\fR ] [ \-sep \fIseparator\fR ] [ \-l \fIselected line\fR ] [ \-mesg ] [ \-select ] [ \-input \fIinput\fR ] ] [ \-filter \fIfilter\fR ] [ \-ssh\-client \fIclient\fR ] [ \-ssh\-command \fIcommand\fR ] [ \-window\-command \fIcommand\fR ] [ \-disable\-history ] [ \-levenshtein\-sort ] [ \-case\-sensitive ] [ \-cycle ] [ \-show \fImode\fR ] [ \-modi \fImode1,mode2\fR ] [ \-eh \fIelement height\fR ] [ \-lazy\-filter\-limit \fIlimit\fR ] [ \-e \fImessage\fR] [ \-a \fIrow\fR ] [ \-u \fIrow\fR ] [ \-pid \fIpath\fR ] [ \-version ] [ \-help ] [ \-dump\-xresources ] [ \-dump\-xresources\-theme ] [ \-auto\-select ] [ \-parse\-hosts ] [ \-no\-parse\-known\-hosts ] [ \-combi\-modi \fImode1,mode2\fR ] [ \-normal\-window ] [ \-fake\-transparency ] [ \-matching \fImethod\fR ] [ \-tokenize ] [ \-no\-click\-to\-exit ] [ \-threads \fInum\fR ] [ \-config \fIfilename\fR ]
+\fBrofi\fR [ \-width \fIpct_scr\fR ] [ \-lines \fIlines\fR ] [ \-columns \fIcolumns\fR ] [ \-font \fIpangofont\fR ] [ \-terminal \fIterminal\fR ] [ \-location \fIposition\fR ] [ \-fixed\-num\-lines ] [ \-padding \fIpadding\fR ] [ \-display \fIdisplay\fR ] [ \-bw \fIwidth\fR ] [ \-dmenu [ \-p \fIprompt\fR ] [ \-sep \fIseparator\fR ] [ \-l \fIselected line\fR ] [ \-mesg ] [ \-select ] [ \-input \fIinput\fR ] ] [ \-filter \fIfilter\fR ] [ \-ssh\-client \fIclient\fR ] [ \-ssh\-command \fIcommand\fR ] [ \-window\-command \fIcommand\fR ] [ \-disable\-history ] [ \-levenshtein\-sort ] [ \-case\-sensitive ] [ \-cycle ] [ \-show \fImode\fR ] [ \-modi \fImode1,mode2\fR ] [ \-eh \fIelement height\fR ] [ \-e \fImessage\fR] [ \-a \fIrow\fR ] [ \-u \fIrow\fR ] [ \-pid \fIpath\fR ] [ \-version ] [ \-help ] [ \-dump\-xresources ] [ \-dump\-xresources\-theme ] [ \-auto\-select ] [ \-parse\-hosts ] [ \-no\-parse\-known\-hosts ] [ \-combi\-modi \fImode1,mode2\fR ] [ \-normal\-window ] [ \-fake\-transparency ] [ \-matching \fImethod\fR ] [ \-tokenize ] [ \-no\-click\-to\-exit ] [ \-threads \fInum\fR ] [ \-config \fIfilename\fR ]
.
.SH "DESCRIPTION"
\fBrofi\fR 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\.
.
.SH "USAGE"
-\fBrofi\fR can be used in two ways, single\-shot (runs a mode then exits) or emulating dmenu\.
+\fBrofi\fR 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\.
.
-.SS "Single\-shot mode"
+.P
+\fBrofi\fR can also function as (drop in) replacement for \fBdmenu(1)\fR\.
+.
+.SS "Running rofi"
To launch \fBrofi\fR directly in a certain mode, specify a mode with \fBrofi \-show <mode>\fR\. To show the run dialog:
.
.IP "" 4
@@ -29,25 +32,25 @@ rofi \-show run
.IP "" 0
.
.SS "Emulating dmenu"
-\fBrofi\fR can emulate \fBdmenu\fR (a dynamic menu for X) when launched with the \fB\-dmenu\fR flag\.
+\fBrofi\fR can emulate \fBdmenu(1)\fR (a dynamic menu for X) when launched with the \fB\-dmenu\fR flag\.
.
.P
-The official website for \fBdmenu\fR can be found here \fIhttp://tools\.suckless\.org/dmenu/\fR\.
+The "official" website for \fBdmenu\fR can be found here \fIhttp://tools\.suckless\.org/dmenu/\fR\.
.
-.SH "OPTIONS"
+.SH "CONFIGURATION"
There are currently three methods of setting configuration options (evaluated in order below):
.
.IP "\(bu" 4
-Xresources: A method of storing key values in the Xserver\. See here \fIhttps://en\.wikipedia\.org/wiki/X_resources\fR for more information\. This is the recommended way of configuring \fBrofi\fR\.
+System configuration file (f\.e\. /etc/rofi\.conf)\.
.
.IP "\(bu" 4
-Configuration File: This uses the same format as the Xresources file\. By default it looks in \fBXDG_USER_CONFIG_DIR\fR/rofi/config, but can be overriden on commandline\.
+Xresources: A method of storing key values in the Xserver\. See here \fIhttps://en\.wikipedia\.org/wiki/X_resources\fR for more information\. This is the recommended way of configuring \fBrofi\fR\.
.
.IP "\(bu" 4
-Command\-line options: Arguments passed to \fBrofi\fR\.
+Configuration File: This uses the same format as the Xresources file\. By default it looks in \fBXDG_USER_CONFIG_DIR\fR/rofi/config, but can be overriden on commandline\. By default XDG_USER_CONFIG_DIR defaults to \fB$HOME/\.config\fR\. (See \fBrofi \-h\fR for current location)\.
.
.IP "\(bu" 4
-System configuration file (f\.e\. /etc/rofi\.conf)\.
+Command\-line options: Arguments passed to \fBrofi\fR\.
.
.IP "" 0
.
@@ -121,7 +124,7 @@ Boolean options have a non\-default command\-line syntax\. Example to enable opt
.IP "" 0
.
.P
-to disable it:
+To disable option X:
.
.IP "" 4
.
@@ -140,7 +143,7 @@ Below is a list of the most important options:
\fB\-help\fR
.
.P
-The help option shows the full list of commandline options and the current set value\. These include dynamic options\.
+The help option shows the full list of commandline options and the current set value\. These include dynamic (run\-time generated) options\.
.
.P
\fB\-dump\-xresources\fR
@@ -201,13 +204,10 @@ Or get the options from a script:
.IP "" 0
.
.P
-Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) sends the selected entry to STDOUT and moves to the next entry\.
-.
-.P
\fB\-show\fR \fImode\fR
.
.P
-Open \fBrofi\fR in a certain mode\. Available modes are \fBwindow\fR, \fBrun\fR, \fBssh\fR To show the run\-dialog:
+Open \fBrofi\fR in a certain mode\. Available modes are \fBwindow\fR, \fBrun\fR,\fBdrun\fR, \fBssh\fR, \fBcombi\fR To show the run\-dialog:
.
.IP "" 4
.
@@ -265,7 +265,7 @@ rofi \-modi "window,run,ssh,Workspaces:i3_switch_workspaces\.sh" \-show Workspac
\fB\-case\-sensitive\fR
.
.P
-Start in case sensitive mode\.
+Start in case sensitive mode\. This option can be changed at run\-time using the \fB\-kb\-toggle\-case\-sensitivity\fR key binding\.
.
.P
\fB\-cycle\fR
@@ -292,7 +292,7 @@ Load alternative configuration file\.
Select the scrolling method\. 0: Per page, 1: continuous\.
.
.SS "Theming"
-All colors are either hex #rrggbb values or X11 color names\.
+All colors are either hex #rrggbb, #aarrggbb or argb:aarrggbbvalues or X11 color names\.
.
.P
\fB\-bw\fR
@@ -601,15 +601,6 @@ rofi \-show run \-sidebar\-mode \-lines 0
.IP "" 0
.
.P
-\fB\-lazy\-filter\-limit\fR \fIlimit\fR
-.
-.P
-The number of entries required for \fBrofi\fR to go into lazy filter mode\. In lazy filter mode, it won\'t re\-filter the list on each keypress, but only after \fBrofi\fR been idle for 250ms\. Experiments shows that the default (5000 lines) works well, set to 0 to always enable\.
-.
-.P
-Default: \fI5000\fR
-.
-.P
\fB\-auto\-select\fR
.
.P
@@ -688,7 +679,7 @@ Pattern: \fI{ssh\-client}\fR Default: \fIssh\fR
Set the command to execute when starting a ssh session\. The pattern \fI{host}\fR is replaced by the selected ssh entry\.
.
.P
-Default: \fI{terminal} \-e {ssh\-client} {host}\fR
+Pattern: \fI{ssh\-client}\fR Default: \fI{terminal} \-e {ssh\-client} {host}\fR
.
.P
\fB\-parse\-hosts\fR
@@ -754,7 +745,7 @@ The modi to combine in combi mode\. For syntax to see \fB\-modi\fR\. To get one
.
.nf
-rofi \-show combi \-combi\-modi "window,run,ssh"
+rofi \-show combi \-combi\-modi "window,run,ssh" \-modi combi
.
.fi
.
@@ -770,7 +761,7 @@ Disable history
\fB\-levenshtein\-sort\fR to enable \fB\-no\-levenshtein\-sort\fR to disable
.
.P
-When searching sort the result based on levenshtein distance\.
+When searching sort the result based on levenshtein distance\. This setting can be changed at runtime, see \fB\-kb\-toggle\-sort\fR\.
.
.SS "Dmenu specific"
\fB\-sep\fR \fIseparator\fR
@@ -942,6 +933,12 @@ Tell \fBrofi\fR that DMenu input is pango markup encoded and should be rendered\
.P
Allow multiple lines to be selected\. Adds a small selection indicator to the left of each entry\.
.
+.P
+\fB\-sync\fR
+.
+.P
+Force rofi mode to first read all data from stdin before showing selection window\. This is how original dmenu behaviour\.
+.
.SS "Window Mode"
\fB\-window\-format\fR \fIformat\fR
.
@@ -972,7 +969,7 @@ Format what is being displayed for windows\.
.IP "" 0
.
.P
-\fIlen\fR: maximum field length (0 for auto\-size)\. If length negative and window \fIwidth\fR is negative field length is \fIwidth \- len\fR\.
+\fIlen\fR: maximum field length (0 for auto\-size)\. If length negative and window \fIwidth\fR is negative field length is \fIwidth \- len\fR\. if length is positive, the entry will be truncated or padded to fill that length\.
.
.P
default: {w} {c} {t}
@@ -1022,6 +1019,9 @@ Default: \fIenabled\fR
.P
Disable parsing of configuration\. This runs rofi in \fIstock\fR mode\.
.
+.P
+For more information on debugging see the wiki \fIhttps://github\.com/DaveDavenport/rofi/wiki/Debugging%20Rofi\fR
+.
.SH "PATTERN"
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:
.
@@ -1037,6 +1037,9 @@ To launch commands (e\.g\. when using the ssh launcher) the user can enter the u
.IP "\(bu" 4
\fB{cmd}\fR: The command to execute\.
.
+.IP "\(bu" 4
+\fB{window}\fR: The window id of the selected window\. (In \fBwindow\-command\fR)
+.
.IP "" 0
.
.SH "DMENU REPLACEMENT"
@@ -1053,7 +1056,7 @@ ln \-s /usr/bin/rofi /usr/bin/dmenu
.IP "" 0
.
.SH "THEMING"
-With \fBrofi\fR 0\.15\.4 we have a new way of specifying colors, the old settings still apply (for now)\. To enable the new setup, set \fBrofi\.color\-enabled\fR to true\. The new setup allows you to specify colors per state, similar to \fBi3\fR Currently 3 states exists:
+With \fBrofi\fR 0\.15\.4 we have a new way of specifying theme colors\. The new setup allows you to specify colors per state, similar to \fBi3\fR Currently 3 states exists:
.
.IP "\(bu" 4
\fBnormal\fR Normal row\.
@@ -1087,7 +1090,7 @@ For each state the following 5 colors must be set:
.IP "" 0
.
.P
-The window background and border color should be specified separate\. The key \fBcolor\-window\fR contains a pair \fBbackground,border\fR\. An example for \fBXresources\fR file:
+The window background and border color should be specified separate\. The key \fBcolor\-window\fR contains a pair \fBbackground,border,separator\fR\. An example for \fBXresources\fR file:
.
.IP "" 4
.
@@ -1098,8 +1101,8 @@ rofi\.color\-normal: #fdf6e3, #002b36, #eee8d5, #586e75, #eee8d5
rofi\.color\-urgent: #fdf6e3, #dc322f, #eee8d5, #dc322f, #fdf6e3
rofi\.color\-active: #fdf6e3, #268bd2, #eee8d5, #268bd2, #fdf6e3
-! \'background\', \'border\'
-rofi\.color\-window: #fdf6e3, #002b36
+! \'background\', \'border\', \'separator\'
+rofi\.color\-window: #fdf6e3, #002b36, #002b36
.
.fi
.
@@ -1119,7 +1122,33 @@ rofi \-color\-normal "#fdf6e3,#002b36,#eee8d5,#586e75,#eee8d5"
.IP "" 0
.
.SH "COLORS"
-Rofi has an experimental mode for a \'nicer\' transparency\. The idea is to make the background of the window transparent, leaving the text opaque\. There are 2 requirements for this feature: 1\. Your Xserver supports TrueColor, 2\. You are running a composite manager\. If this is satisfied you can use the following format for colors:
+RGB colors can be specified by either its X11 name, or hexadecimal notation\. For example:
+.
+.IP "" 4
+.
+.nf
+
+white
+.
+.fi
+.
+.IP "" 0
+.
+.P
+Or
+.
+.IP "" 4
+.
+.nf
+
+#FFFFFF
+.
+.fi
+.
+.IP "" 0
+.
+.P
+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\.
.
.IP "" 4
.
@@ -1132,8 +1161,24 @@ argb:FF444444
.IP "" 0
.
.P
+Or
+.
+.IP "" 4
+.
+.nf
+
+#FF444444
+.
+.fi
+.
+.IP "" 0
+.
+.P
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\.
.
+.P
+Within \fBrofi\fR 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\.
+.
.SH "KEYBINDINGS"
\fBrofi\fR has the following key\-bindings:
.
@@ -1236,7 +1281,7 @@ The first two fields specify the alpha level\. This determines the amount of tra
.IP "" 0
.
.P
-To get a full list of keybindings, see \fBrofi \-dump\-xresources | grep kb\-\fR\. Keybindings can be modified using the configuration systems\.
+To get a full list of keybindings on the commandline, see \fBrofi \-dump\-xresources | grep kb\-\fR\. Keybindings can be modified using the configuration systems\. To get searchable list of keybindings, run \fBrofi \-show keys\fR\.
.
.P
A keybinding starting with \fB!\fR will act when all keys have been released\.
@@ -1244,16 +1289,16 @@ A keybinding starting with \fB!\fR will act when all keys have been released\.
.SH "Available Modi"
.
.SS "Window"
-Show a list of all the windows and allow switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\.
+Show a list of all the windows and allow switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will close the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\. (See option \fBwindow\-command\fR );
.
.SS "WindowCD"
-Shows a list of the windows on the current desktop and allows switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\.
+Shows a list of the windows on the current desktop and allows switching between them\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will kill the window\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run a command on the window\. (See option \fBwindow\-command\fR );
.
.SS "Run"
-Shows a list of executables in \fB$PATH\fR and can launch them (optional in a terminal)\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run the command in a terminal\.
+Shows a list of executables in \fB$PATH\fR and can launch them (optional in a terminal)\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will remove this entry from the run history\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) will run the command in a terminal\.
.
.SS "DRun"
-Same as the \fBrun\fR launches, but the list is created from the installed desktop files\. It automatically launches them in a terminal if specified in the Desktop File\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) with custom input (no entry matching) will run the command in a terminal\.
+Same as the \fBrun\fR launches, but the list is created from the installed desktop files\. It automatically launches them in a terminal if specified in the Desktop File\. Pressing the \fBdelete\-entry\fR binding (\fBshift\-delete\fR) will remove this entry from the run history\. Pressing the \fBaccept\-custom\fR binding (\fBcontrol\-enter\fR or \fBshift\-enter\fR) with custom input (no entry matching) will run the command in a terminal\.
.
.SS "SSH"
Shows a list of SSH targets based on your ssh config file, and allows to quickly ssh into them\.
diff --git a/include/mode.h b/include/mode.h
index 59930a60..b8ee36c4 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -26,7 +26,9 @@ typedef enum
/** Reload current DIALOG */
RELOAD_DIALOG = 1002,
/** Previous dialog */
- PREVIOUS_DIALOG = 1003
+ PREVIOUS_DIALOG = 1003,
+ /** Reloads the dialog and unset user input */
+ RESET_DIALOG = 1004,
} ModeMode;
/**
diff --git a/include/view.h b/include/view.h
index 1a6a00fa..6e30ed8a 100644
--- a/include/view.h
+++ b/include/view.h
@@ -216,6 +216,13 @@ void rofi_view_switch_mode ( RofiViewState *state, Mode *mode );
void rofi_view_set_overlay ( RofiViewState *state, const char *text );
/**
+ * @param state The handle to the view.
+ *
+ * Clears the user entry box, set selected to 0.
+ */
+void rofi_view_clear_input ( RofiViewState *state );
+
+/**
* @param menu_flags The state of the new window.
*
* Creates the internal 'Cached' window that gets reused between views.
@@ -247,6 +254,5 @@ void rofi_view_workers_finalize ( void );
* @returns the xcb_window_t for rofi's view or XCB_WINDOW_NONE.
*/
xcb_window_t rofi_view_get_window ( void );
-
/**@}*/
#endif
diff --git a/source/dialogs/script.c b/source/dialogs/script.c
index c57fb5bd..dcbed2e3 100644
--- a/source/dialogs/script.c
+++ b/source/dialogs/script.c
@@ -146,9 +146,7 @@ static ModeMode script_mode_result ( Mode *sw, int mretv, char **input, unsigned
rmpd->cmd_list = new_list;
rmpd->cmd_list_length = new_length;
- g_free ( *input );
- *input = NULL;
- retv = RELOAD_DIALOG;
+ retv = RESET_DIALOG;
}
return retv;
}
diff --git a/source/rofi.c b/source/rofi.c
index f89c64d4..7a127eff 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -214,6 +214,9 @@ void process_result ( RofiViewState *state )
else if ( retv == RELOAD_DIALOG ) {
// do nothing.
}
+ else if ( retv == RESET_DIALOG ) {
+ rofi_view_clear_input ( state );
+ }
else if ( retv < MODE_EXIT ) {
mode = ( retv ) % num_modi;
}
@@ -532,7 +535,7 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
// Because of abe_trigger, state of rofi can be changed. handle this!
// Run mainloop on dummy event.
- xcb_generic_event_t dev = {0,};
+ xcb_generic_event_t dev;
dev.response_type = 0;
main_loop_x11_event_handler_view ( &dev );
}
diff --git a/source/view.c b/source/view.c
index 693bd9e3..dde0be96 100644
--- a/source/view.c
+++ b/source/view.c
@@ -200,7 +200,7 @@ static void menu_capture_screenshot ( void )
static gboolean rofi_view_repaint ( G_GNUC_UNUSED void * data )
{
if ( current_active_menu ) {
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "expose event\n" );
+ g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "expose event" );
TICK_N ( "Expose" );
xcb_copy_area ( xcb->connection, CacheState.edit_pixmap, CacheState.main_window, CacheState.gc,
0, 0, 0, 0, current_active_menu->width, current_active_menu->height );
@@ -319,7 +319,7 @@ void rofi_view_queue_redraw ( void )
{
if ( current_active_menu && CacheState.repaint_source == 0 ) {
CacheState.count++;
- g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "redraw %lu\n", CacheState.count );
+ g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "redraw %lu", CacheState.count );
CacheState.repaint_source = g_idle_add_full ( G_PRIORITY_HIGH_IDLE, rofi_view_repaint, NULL, NULL );
}
}
@@ -1591,6 +1591,7 @@ void rofi_view_hide ( void )
void rofi_view_cleanup ()
{
+ g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Cleanup." );
if ( CacheState.idle_timeout > 0 ) {
g_source_remove ( CacheState.idle_timeout );
CacheState.idle_timeout = 0;
@@ -1679,6 +1680,14 @@ void rofi_view_set_overlay ( RofiViewState *state, const char *text )
widget_move ( WIDGET ( state->overlay ), x_offset, state->border );
}
+void rofi_view_clear_input ( RofiViewState *state )
+{
+ if ( state->text ){
+ textbox_text ( state->text, "");
+ rofi_view_set_selected_line ( state, 0 );
+ }
+}
+
void rofi_view_switch_mode ( RofiViewState *state, Mode *mode )
{
state->sw = mode;
diff --git a/source/widgets/scrollbar.c b/source/widgets/scrollbar.c
index 759528b6..9314e7cd 100644
--- a/source/widgets/scrollbar.c
+++ b/source/widgets/scrollbar.c
@@ -127,10 +127,10 @@ unsigned int scrollbar_clicked ( const scrollbar *sb, int y )
{
if ( sb != NULL ) {
if ( y >= sb->widget.y && y <= ( sb->widget.y + sb->widget.h ) ) {
- unsigned int r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) );
- unsigned int handle = sb->widget.h - r;
+ short r = ( sb->length * sb->widget.h ) / ( (double) ( sb->length + sb->pos_length ) );
+ short handle = sb->widget.h - r;
double sec = ( ( r ) / (double) ( sb->length - 1 ) );
- unsigned int half_handle = handle / 2;
+ short half_handle = handle / 2;
y -= sb->widget.y + half_handle;
y = MIN ( MAX ( 0, y ), sb->widget.h - 2 * half_handle );
diff --git a/source/x11-helper.c b/source/x11-helper.c
index 20894a17..149becba 100644
--- a/source/x11-helper.c
+++ b/source/x11-helper.c
@@ -640,15 +640,13 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key
char *mod_key = input_key;
char *error_msg = NULL;
unsigned int modmask