summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-04-23 20:22:47 +0200
committerDave Davenport <qball@gmpclient.org>2020-04-23 20:22:47 +0200
commitae700b8f4d5a07cf424d7a010b42fce07bf2b191 (patch)
tree9b7f9b8fd907f55c140d5a12065343ce3d53cc32
parent0f02b827409d7417b5055b20390546b5e89d6e92 (diff)
parentf90ad971d9d334b26280fbf14dda700877f75d67 (diff)
Merge remote-tracking branch 'origin/next' into fbcomplete
-rwxr-xr-xExamples/test_script_env.sh1
-rw-r--r--INSTALL.md1
-rw-r--r--doc/README4
-rw-r--r--doc/README.md7
-rw-r--r--doc/rofi-script.516
-rw-r--r--doc/rofi-script.5.markdown3
-rw-r--r--doc/rofi-theme-selector.14
-rw-r--r--doc/rofi-theme.5215
-rw-r--r--doc/rofi-theme.5.markdown2
-rw-r--r--doc/rofi.176
-rw-r--r--doc/rofi.1.markdown11
-rw-r--r--include/view.h6
-rw-r--r--include/widgets/listview.h10
-rw-r--r--source/dialogs/dmenu.c7
-rw-r--r--source/dialogs/script.c18
-rw-r--r--source/rofi.c76
-rw-r--r--source/view.c5
-rw-r--r--source/widgets/listview.c10
18 files changed, 418 insertions, 54 deletions
diff --git a/Examples/test_script_env.sh b/Examples/test_script_env.sh
index d9beff87..64899eb7 100755
--- a/Examples/test_script_env.sh
+++ b/Examples/test_script_env.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+echo -en "\x00no-custom\x1ftrue\n"
echo "${ROFI_RETV}"
diff --git a/INSTALL.md b/INSTALL.md
index 1c2f8f58..6b51b38a 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -20,6 +20,7 @@ You can also use [Meson](https://mesonbuild.com/) as an alternative.
* check (Can be disabled using the `--disable-check` configure flag)
check is used for build-time tests and does not affect functionality.
* Developer packages of the external libraries
+* glib-compile-resources
### External libraries
diff --git a/doc/README b/doc/README
deleted file mode 100644
index 5b37423a..00000000
--- a/doc/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Update manpage using ronn [https://github.com/rtomayko/ronn]
-
- ronn --roff --pipe rofi-manpage.markdown > rofi.1
-
diff --git a/doc/README.md b/doc/README.md
new file mode 100644
index 00000000..389e7a61
--- /dev/null
+++ b/doc/README.md
@@ -0,0 +1,7 @@
+Manpages are build using [go-md2man](https://github.com/cpuguy83/go-md2man)
+
+Manpages can be updated using the following make command:
+
+```
+make update-manpage
+```
diff --git a/doc/rofi-script.5 b/doc/rofi-script.5
index 4d5a2ea3..a2daf9a9 100644
--- a/doc/rofi-script.5
+++ b/doc/rofi-script.5
@@ -64,6 +64,8 @@ Rofi sets the following environment variable when executing the script:
.SS \fB\fCROFI\_RETV\fR
.PP
An integer number with the current state:
+
+.RS
.IP \(bu 2
\fB0\fP: Initial call of script.
.IP \(bu 2
@@ -73,6 +75,8 @@ An integer number with the current state:
.IP \(bu 2
\fB10\-28\fP: Custom keybinding 1\-19
+.RE
+
.SH Passing mode options
.PP
Extra options, like setting the prompt, can be set by the script.
@@ -92,6 +96,8 @@ For example to set the prompt:
.PP
The following extra options exists:
+
+.RS
.IP \(bu 2
\fBprompt\fP: Update the prompt text.
.IP \(bu 2
@@ -104,6 +110,10 @@ The following extra options exists:
\fBactive\fP: Mark rows as active. (for syntax see the active option in dmenu mode)
.IP \(bu 2
\fBdelim\fP: Set the delimiter for for next rows. Default is '\\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls.
+.IP \(bu 2
+\fBno\-custom\fP: Only accept listed entries, ignore custom input.
+
+.RE
.SH Parsing row options
.PP
@@ -124,6 +134,8 @@ For example:
.PP
The following options are supported:
+
+.RS
.IP \(bu 2
\fBicon\fP: Set the icon for that row.
.IP \(bu 2
@@ -131,9 +143,11 @@ The following options are supported:
.IP \(bu 2
\fBnonselectable\fP: If true the row cannot activated.
+.RE
+
.SH SEE ALSO
.PP
-rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1)
+rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1)
.SH AUTHOR
.PP
diff --git a/doc/rofi-script.5.markdown b/doc/rofi-script.5.markdown
index 8b941aa7..7f63b439 100644
--- a/doc/rofi-script.5.markdown
+++ b/doc/rofi-script.5.markdown
@@ -78,6 +78,7 @@ The following extra options exists:
* **urgent**: Mark rows as urgent. (for syntax see the urgent option in dmenu mode)
* **active**: Mark rows as active. (for syntax see the active option in dmenu mode)
* **delim**: Set the delimiter for for next rows. Default is '\n' and this option should finish with this. Only call this on first call of script, it is remembered for consecutive calls.
+ * **no-custom**: Only accept listed entries, ignore custom input.
## Parsing row options
@@ -100,7 +101,7 @@ The following options are supported:
## SEE ALSO
-rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
+rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
diff --git a/doc/rofi-theme-selector.1 b/doc/rofi-theme-selector.1
index 99525093..de076ff4 100644
--- a/doc/rofi-theme-selector.1
+++ b/doc/rofi-theme-selector.1
@@ -18,6 +18,8 @@ It lets you preview each theme with the Enter key and apply the theme to your
.SH Theme directories
.PP
\fBrofi\-theme\-selector\fP searches the following directories for themes:
+
+.RS
.IP \(bu 2
${PREFIX}/share/rofi/themes
.IP \(bu 2
@@ -25,6 +27,8 @@ $XDG\_CONFIG\_HOME/rofi/themes
.IP \(bu 2
$XDG\_DATA\_HOME/share/rofi/themes
+.RE
+
.PP
${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".<br>
$XDG\_CONFIG\_HOME is normally unset. Default path is "$HOME/.config".<br>
diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5
index f9e77daf..81affdb4 100644
--- a/doc/rofi-theme.5
+++ b/doc/rofi-theme.5
@@ -19,11 +19,15 @@ preferred.
.SH Comments
.PP
C and C++ file comments are supported.
+
+.RS
.IP \(bu 2
Anything after \fB\fC//\fR and before a newline is considered a comment.
.IP \(bu 2
Everything between \fB\fC/*\fR and \fB\fC*/\fR is a comment.
+.RE
+
.PP
Comments can be nested and the C comments can be inline.
@@ -242,6 +246,8 @@ When used, values with the wrong type that cannot be converted are ignored.
.PP
The current theme format supports different types:
+
+.RS
.IP \(bu 2
a string
.IP \(bu 2
@@ -275,12 +281,18 @@ an environment variable
.IP \(bu 2
Inherit
+.RE
+
.PP
Some of these types are a combination of other types.
-.SH String.IP \(bu 2
+.SH String
+.RS
+.IP \(bu 2
Format: \fB\fC"[:print:]+"\fR
+.RE
+
.PP
A string is always surrounded by double quotes (\fB\fC"\fR). Between the quotes there can be any printable character.
@@ -299,9 +311,13 @@ font: "Awasome 12";
.PP
The string must be valid UTF\-8.
-.SH Integer.IP \(bu 2
+.SH Integer
+.RS
+.IP \(bu 2
Format: \fB\fC[\-+]?[:digit:]+\fR
+.RE
+
.PP
An integer may contain any number.
@@ -317,9 +333,13 @@ lines: 12;
.fi
.RE
-.SH Real.IP \(bu 2
+.SH Real
+.RS
+.IP \(bu 2
Format: \fB\fC[\-+]?[:digit:]+(\\.[:digit:]+)?\fR
+.RE
+
.PP
A real is an integer with an optional fraction.
@@ -338,9 +358,13 @@ real: 3.4;
.PP
The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e\-3\fR\&.
-.SH Boolean.IP \(bu 2
+.SH Boolean
+.RS
+.IP \(bu 2
Format: \fB\fC(true|false)\fR
+.RE
+
.PP
Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case\-\&sensitive.
@@ -359,6 +383,8 @@ dynamic: false;
.SH Color
.PP
\fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4)
+
+.RS
.IP \(bu 2
Format: \fB\fC#{HEX}{3}\fR (rgb)
.IP \(bu 2
@@ -380,11 +406,15 @@ Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {P
.IP \(bu 2
Format: \fB\fC{named\-color} [ / {PERCENTAGE} ]\fR
+.RE
+
.PP
The white\-space format proposed in CSS4 is also supported.
.PP
The different values are:
+
+.RS
.IP \(bu 2
\fB\fC{HEX}\fR is a hexadecimal number ('0\-9a\-f' case insensitive).
.IP \(bu 2
@@ -413,6 +443,8 @@ PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red,
Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen,
SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent
+.RE
+
.PP
For example:
@@ -440,12 +472,18 @@ text\-color: Black;
.fi
.RE
-.SH Text style.IP \(bu 2
+.SH Text style
+.RS
+.IP \(bu 2
Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR
+.RE
+
.PP
Text style indicates how the highlighted text is emphasized. \fB\fCNone\fR indicates that no emphasis
should be applied.
+
+.RS
.IP \(bu 2
\fB\fCbold\fR: make the text thicker then the surrounding text.
.IP \(bu 2
@@ -457,6 +495,8 @@ should be applied.
.IP \(bu 2
\fB\fCsmall caps\fR: emphasise the text using capitalization.
+.RE
+
.PP
.RS
@@ -464,16 +504,22 @@ should be applied.
For some reason \fB\fCsmall caps\fR does not work on some systems.
.RE
-.SH Line style.IP \(bu 2
+.SH Line style
+.RS
+.IP \(bu 2
Format: \fB\fC(dash|solid)\fR
+.RE
+
.PP
Indicates how a line should be drawn.
It currently supports:
* \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash
* \fB\fCsolid\fR: a solid line
-.SH Distance.IP \(bu 2
+.SH Distance
+.RS
+.IP \(bu 2
Format: \fB\fC{Integer}px\fR
.IP \(bu 2
Format: \fB\fC{Real}em\fR
@@ -482,8 +528,12 @@ Format: \fB\fC{Real}ch\fR
.IP \(bu 2
Format: \fB\fC{Real}%\fR
+.RE
+
.PP
A distance can be specified in 3 different units:
+
+.RS
.IP \(bu 2
\fB\fCpx\fR: Screen pixels.
.IP \(bu 2
@@ -493,6 +543,8 @@ A distance can be specified in 3 different units:
.IP \(bu 2
\fB\fC%\fR: Percentage of the \fBmonitor\fP size.
+.RE
+
.PP
Distances used in the horizontal direction use the monitor width. Distances in
the vertical direction use the monitor height.
@@ -511,7 +563,9 @@ For example:
On a full\-HD (1920x1080) monitor, it defines a padding of 192 pixels on the left
and right side and 108 pixels on the top and bottom.
-.SH Padding.IP \(bu 2
+.SH Padding
+.RS
+.IP \(bu 2
Format: \fB\fC{Integer}\fR
.IP \(bu 2
Format: \fB\fC{Distance}\fR
@@ -522,11 +576,15 @@ Format: \fB\fC{Distance} {Distance} {Distance}\fR
.IP \(bu 2
Format: \fB\fC{Distance} {Distance} {Distance} {Distance}\fR
+.RE
+
.PP
If no unit is specified, pixels are assumed.
.PP
The different number of fields in the formats are parsed like:
+
+.RS
.IP \(bu 2
1 field: \fB\fCall\fR
.IP \(bu 2
@@ -536,7 +594,11 @@ The different number of fields in the formats are parsed like:
.IP \(bu 2
4 fields: \fB\fCtop\fR, \fB\fCright\fR, \fB\fCbottom\fR, \fB\fCleft\fR
-.SH Border.IP \(bu 2
+.RE
+
+.SH Border
+.RS
+.IP \(bu 2
Format: \fB\fC{Integer}\fR
.IP \(bu 2
Format: \fB\fC{Distance}\fR
@@ -555,6 +617,8 @@ Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line s
.IP \(bu 2
Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}\fR
+.RE
+
.PP
Borders are identical to padding, except that each distance field has a line
style property.
@@ -569,23 +633,28 @@ When no unit is specified, pixels are assumed.
.SH Position
.PP
Indicate a place on the window/monitor.
+
+.RS
.IP \(bu 2
-Format: \fB\fC(center|east|north|west|south|north east|north west|south west|south east)\fR
.PP
+Format: \fB\fC(center|east|north|west|south|north east|north west|south west|south east)\fR
+.PP
.RS
.nf
north west | north | north east
\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-
- west | center | east
+ west | center | east
\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-\-\-\-\-\-\-\-\-\-
south west | south | south east
.fi
.RE
+.RE
+
.SH Visibility
.PP
It is possible to hide widgets:
@@ -595,9 +664,13 @@ inputbar {
enabled: false;
}
-.SH Reference.IP \(bu 2
+.SH Reference
+.RS
+.IP \(bu 2
Format: \fB\fC@{PROPERTY NAME}\fR
+.RE
+
.PP
A reference can point to another reference. Currently, the maximum number of redirects is 20.
A property always refers to another property. It cannot be used for a subpart of the property.
@@ -630,22 +703,34 @@ window {
.fi
.RE
-.SH Orientation.IP \(bu 2
+.SH Orientation
+.RS
+.IP \(bu 2
Format: \fB\fC(horizontal|vertical)\fR
+.RE
+
.PP
Specify the orientation of the widget.
-.SH List of keywords.IP \(bu 2
+.SH List of keywords
+.RS
+.IP \(bu 2
Format: \fB\fC[ keyword, keyword ]\fR
+.RE
+
.PP
A list starts with a '[' and ends with a ']'. The entries in the list are comma\-separated.
The \fB\fCkeyword\fR in the list refers to an widget name.
-.SH Environment variable.IP \(bu 2
+.SH Environment variable
+.RS
+.IP \(bu 2
Format: \fB\fC${:alnum:}\fR
+.RE
+
.PP
This will parse the environment variable as the property value. (that then can be any of the above types).
The environment variable should be an alphanumeric string without white\-space.
@@ -661,9 +746,13 @@ The environment variable should be an alphanumeric string without white\-space.
.fi
.RE
-.SH Inherit.IP \(bu 2
+.SH Inherit
+.RS
+.IP \(bu 2
Format: \fB\fCinherit\fR
+.RE
+
.PP
Inherits the property from its parent widget.
@@ -720,14 +809,20 @@ element selected {
.SH Name
.PP
The current widgets available in \fBrofi\fP:
+
+.RS
.IP \(bu 2
\fB\fCwindow\fR
+
+.RS
.IP \(bu 2
\fB\fCoverlay\fR: the overlay widget.
.IP \(bu 2
\fB\fCmainbox\fR: The mainbox box.
.IP \(bu 2
\fB\fCinputbar\fR: The input bar box.
+
+.RS
.IP \(bu 2
\fB\fCbox\fR: the horizontal @box packing the widgets
.IP \(bu 2
@@ -740,27 +835,49 @@ The current widgets available in \fBrofi\fP:
\fB\fCnum\-rows\fR: Shows the total number of rows.
.IP \(bu 2
\fB\fCnum\-filtered\-rows\fR: Shows the total number of rows after filtering.
+
+.RE
.IP \(bu 2
\fB\fClistview\fR: The listview.
+
+.RS
.IP \(bu 2
\fB\fCscrollbar\fR: the listview scrollbar
.IP \(bu 2
\fB\fCelement\fR: a box in the listview holding the entries
+
+.RS
.IP \(bu 2
\fB\fCelement\-icon\fR: the widget in the listview's entry showing the (optional) icon
.IP \(bu 2
\fB\fCelement\-index\fR: the widget in the listview's entry keybindable index (1,2,3..0)
.IP \(bu 2
\fB\fCelement\-text\fR: the widget in the listview's entry showing the text.
+
+.RE
+
+.RE
.IP \(bu 2
\fB\fCmode\-switcher\fR: the main horizontal @box packing the buttons.
+
+.RS
.IP \(bu 2
\fB\fCbutton\fR: the buttons @textbox for each mode
+
+.RE
.IP \(bu 2
\fB\fCmessage\fR: The container holding the textbox.
+
+.RS
.IP \(bu 2
\fB\fCtextbox\fR: the message textbox
+.RE
+
+.RE
+
+.RE
+
.PP
Note that these path names match the default theme. Themes that provide a custom layout will have different
elements, and structure.
@@ -832,7 +949,9 @@ This allows the colors used for drawing the handle to be set independently.
.PP
The following properties are currently supported:
-.SS all widgets:.IP \(bu 2
+.SS all widgets:
+.RS
+.IP \(bu 2
\fBenabled\fP: enable/disable the widget
.IP \(bu 2
\fBpadding\fP: padding
@@ -853,7 +972,11 @@ Background color
\fBborder\-color\fP: color
Color of the border
-.SS window:.IP \(bu 2
+.RE
+
+.SS window:
+.RS
+.IP \(bu 2
.PP
\fBfont\fP: string
@@ -897,7 +1020,11 @@ The width of the window
\fBy\-offset\fP: distance
The offset of the window to the anchor point, allowing you to push the window left/right/up/down
-.SS scrollbar:.IP \(bu 2
+.RE
+
+.SS scrollbar:
+.RS
+.IP \(bu 2
\fBbackground\-color\fP: color
.IP \(bu 2
\fBhandle\-width\fP: distance
@@ -906,14 +1033,22 @@ The offset of the window to the anchor point, allowing you to push the window le
.IP \(bu 2
\fBborder\-color\fP: color
-.SS box:.IP \(bu 2
+.RE
+
+.SS box:
+.RS
+.IP \(bu 2
\fBorientation\fP: orientation
Set the direction the elements are packed.
.IP \(bu 2
\fBspacing\fP: distance
Distance between the packed elements.
-.SS textbox:.IP \(bu 2
+.RE
+
+.SS textbox:
+.RS
+.IP \(bu 2
\fBbackground\-color\fP: color
.IP \(bu 2
\fBborder\-color\fP: the color used for the border around the widget.
@@ -941,7 +1076,11 @@ color is optional, multiple highlight styles can be added like: bold underline i
.IP \(bu 2
\fBblink\fP: Enable/Disable blinking on an input textbox (Boolean).
-.SS listview:.IP \(bu 2
+.RE
+
+.SS listview:
+.RS
+.IP \(bu 2
\fBcolumns\fP: integer
Number of columns to show (at least 1)
.IP \(bu 2
@@ -975,6 +1114,8 @@ Reverse the ordering (top down to bottom up).
\fBfixed\-columns\fP: boolean
Do not reduce the number of columns shown when number of visible elements is not enough to fill them all.
+.RE
+
.PP
Each element is a \fB\fCbox\fR called \fB\fCelement\fR\&. Each \fB\fCelement\fR can contain an \fB\fCelement\-icon\fR and \fB\fCelement\-text\fR\&.
@@ -1066,6 +1207,8 @@ The layout of \fBrofi\fP can be tweaked by packing the 'fixed' widgets in a cust
.PP
The following widgets are fixed, as they provide core \fBrofi\fP functionality:
+
+.RS
.IP \(bu 2
prompt
.IP \(bu 2
@@ -1085,9 +1228,13 @@ num\-rows
.IP \(bu 2
num\-filtered\-rows
+.RE
+
.PP
The following keywords are defined and can be used to automatically pack a subset of the widgets.
These are used in the default theme as depicted in the figure above.
+
+.RS
.IP \(bu 2
mainbox
Packs: \fB\fCinputbar, message, listview, mode\-switcher\fR
@@ -1095,11 +1242,15 @@ Packs: \fB\fCinputbar, message, listview, mode\-switcher\fR
inputbar
Packs: \fB\fCprompt,entry,case\-indicator\fR
+.RE
+
.PP
Any widget name starting with \fB\fCtextbox\fR is a textbox widget, others are box widgets and can pack other widgets.
.PP
There are several special widgets that can be used by prefixing the name of the widget:
+
+.RS
.IP \(bu 2
\fB\fCtextbox\fR:
This is a textbox widget. The displayed string can be set with \fB\fCstr\fR\&.
@@ -1115,6 +1266,8 @@ The \fB\fCaction\fR can be set to:
\fB\fCok|alternate\fR: accept entry and launch alternate action (for run launch in terminal).
\fB\fCcustom|alternate\fR: accept custom input and launch alternate action.
+.RE
+
.PP
To specify children, set the \fB\fCchildren\fR
property (this always happens on the \fB\fCbox\fR child, see example below):
@@ -1205,6 +1358,8 @@ Just like CSS, \fBrofi\fP uses the box model for each widget.
.PP
Explanation of the different parts:
+
+.RS
.IP \(bu 2
Content \- The content of the widget.
.IP \(bu 2
@@ -1217,6 +1372,8 @@ The border use the border\-color of the widget.
Margin \- Clears an area outside the border.
The margin is transparent.
+.RE
+
.PP
The box model allows us to add a border around elements, and to define space between elements.
@@ -1341,6 +1498,8 @@ Parts of the theme can be conditionally loaded, like the CSS \fB\fC@media\fR opt
.PP
It supports the following keys as constraint:
+
+.RS
.IP \(bu 2
\fB\fCmin\-width\fR: load when width is bigger then value.
.IP \(bu 2
@@ -1356,15 +1515,21 @@ It supports the following keys as constraint:
.IP \(bu 2
\fB\fCmonitor\-id\fR: The monitor id, see rofi \-help for id's.
+.RE
+
.SH Multiple file handling
.PP
The rasi file format offers two methods of including other files.
This can be used to modify existing themes, or have multiple variations on a theme.
+
+.RS
.IP \(bu 2
import: Import and parse a second file.
.IP \(bu 2
theme: Discard theme, and load file as a fresh theme.
+.RE
+
.PP
Syntax:
@@ -1383,6 +1548,8 @@ The specified file can either by \fIname\fP, \fIfilename\fP,\fIfull path\fP\&.
.PP
If a filename is provided, it will try to resolve it in the following order:
+
+.RS
.IP \(bu 2
\fB\fC${XDG\_CONFIG\_HOME}/rofi/themes/\fR
.IP \(bu 2
@@ -1392,6 +1559,8 @@ If a filename is provided, it will try to resolve it in the following order:
.IP \(bu 2
\fB\fC${INSTALL PREFIX}/share/rofi/themes/\fR
+.RE
+
.PP
A name is resolved as a filename by appending the \fB\fC\&.rasi\fR extension.
@@ -1402,4 +1571,4 @@ Several examples are installed together with \fBrofi\fP\&. These can be found in
.SH SEE ALSO
.PP
-rofi(1)
+rofi(1), rofi\-script(5), rofi\-theme\-selector(1)
diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown
index 08c5575e..0813f8c9 100644
--- a/doc/rofi-theme.5.markdown
+++ b/doc/rofi-theme.5.markdown
@@ -992,4 +992,4 @@ Several examples are installed together with **rofi**. These can be found in `{d
## SEE ALSO
-rofi(1)
+rofi(1), rofi-script(5), rofi-theme-selector(1)
diff --git a/doc/rofi.1 b/doc/rofi.1
index 8b2f214c..1cdd8bf0 100644
--- a/doc/rofi.1
+++ b/doc/rofi.1
@@ -68,8 +68,12 @@ Markup support can be enabled, see CONFIGURATION options.
.SH CONFIGURATION
.PP
There are currently three methods of setting configuration options (evaluated in order below):
+
+.RS
.IP \(bu 2
-System configuration file (for example \fB\fC/etc/rofi.rasi\fR or old format \fB\fC/etc/rofi.conf\fR).
+System configuration file (for example \fB\fC/etc/rofi.rasi\fR or old format \fB\fC/etc/rofi.conf\fR).
+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.
.IP \(bu 2
Xresources: A method of storing key values in the Xserver. See
here
@@ -84,6 +88,8 @@ This is the recommended way of configuring \fBrofi\fP\&.
.IP \(bu 2
Command\-line options: Arguments passed to \fBrofi\fP\&.
+.RE
+
.PP
\fBTIP\fP: To get a template config file run: \fB\fCrofi \-dump\-xresources > rofi\-example.config\fR\&.
\fBNOTE\fP: In version 1.4.0 we support configuration in a new format, a config for this can be generated by: \fB\fCrofi
@@ -129,6 +135,8 @@ rofi \-dump\-xresources
.PP
The configuration system supports the following types:
+
+.RS
.IP \(bu 2
string
.IP \(bu 2
@@ -138,6 +146,8 @@ char
.IP \(bu 2
Boolean
+.RE
+
.PP
Boolean options have a non\-default command\-line syntax. Example to enable option X:
@@ -185,6 +195,8 @@ This does not validate all passed values (for example, colors).
.PP
Specify the number of threads \fBrofi\fP should use:
+
+.RS
.IP \(bu 2
0: Autodetect the number of supported hardware threads.
.IP \(bu 2
@@ -192,6 +204,8 @@ Specify the number of threads \fBrofi\fP should use:
.IP \(bu 2
2..N: Specify the maximum number of threads to use in the thread pool.
+.RE
+
.PP
\fB\fC\-dmenu\fR
@@ -378,6 +392,8 @@ fallback themes.
.PP
Specify the matching algorithm used.
Current the following methods are supported.
+
+.RS
.IP \(bu 2
\fBnormal\fP: match the int string
.IP \(bu 2
@@ -387,6 +403,8 @@ Current the following methods are supported.
.IP \(bu 2
\fBfuzzy\fP: do a fuzzy match
+.RE
+
.PP
Default: \fInormal\fP
@@ -411,6 +429,8 @@ Only show desktop files that are present in the listed categories.
.PP
When using drun, match only with the specified Desktop entry fields.
The different fields are:
+
+.RS
.IP \(bu 2
\fBname\fP: the application's name
.IP \(bu 2
@@ -428,11 +448,15 @@ The different fields are:
.PP
Default: \fIname,generic,exec,categories,keywords\fP
+.RE
+
.PP
\fB\fC\-drun\-display\-format\fR
.PP
The format string for the drun dialog:
+
+.RS
.IP \(bu 2
\fBname\fP: the application's name
.IP \(bu 2
@@ -444,6 +468,8 @@ The format string for the drun dialog:
.IP \(bu 2
\fBcomment\fP: the application comment
+.RE
+
.PP
Pango markup can be used to formatting the output.
@@ -480,6 +506,8 @@ Default: false
.PP
When using window mode, match only with the specified fields.
The different fields are:
+
+.RS
.IP \(bu 2
\fBtitle\fP: window's title
.IP \(bu 2
@@ -497,6 +525,8 @@ The different fields are:
.PP
Default: \fIall\fP
+.RE
+
.PP
\fB\fC\-matching\-negate\-char\fR \fIchar\fP
@@ -686,6 +716,8 @@ When one entry is left, automatically select it.
Select monitor to display \fBrofi\fP on.
It accepts as input: \fIprimary\fP (if primary output is set), the \fIxrandr\fP output name, or integer number (in order of
detection). Negative numbers are handled differently:
+
+.RS
.IP \(bu 2
\fB\-1\fP: the currently focused monitor.
.IP \(bu 2
@@ -702,6 +734,8 @@ behavior.)
.PP
Default: \fI\-5\fP
+.RE
+
.PP
See \fB\fCrofi \-h\fR output for the detected monitors, their position, and size.
@@ -852,6 +886,8 @@ Format what is being displayed for windows.
.PP
\fIfield\fP:
+
+.RS
.IP \(bu 2
\fBw\fP: desktop name
.IP \(bu 2
@@ -863,6 +899,8 @@ Format what is being displayed for windows.
.IP \(bu 2
\fBc\fP: class
+.RE
+
.PP
\fIlen\fP: maximum field length (0 for auto\-size). If length and window \fIwidth\fP are negative, field length is \fIwidth \- len\fP\&.
if length is positive, the entry will be truncated or padded to fill that length.
@@ -923,11 +961,15 @@ This setting can be changed at runtime (see \fB\fC\-kb\-toggle\-sort\fR).
.PP
There are 2 sorting method:
+
+.RS
.IP \(bu 2
levenshtein (Default)
.IP \(bu 2
fzf sorting.
+.RE
+
.SS Dmenu specific
.PP
\fB\fC\-sep\fR \fIseparator\fP
@@ -991,6 +1033,8 @@ Makes dmenu searches case\-insensitive
.PP
Active row, mark \fIX\fP as active. Where \fIX\fP 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:
+
+.RS
.IP \(bu 2
A single row: '5'
.IP \(bu 2
@@ -1002,6 +1046,8 @@ A set of rows: '2,0,\-9'
.IP \(bu 2
Or any combination: '5,\-3:,7:11,2,0,\-9'
+.RE
+
.PP
\fB\fC\-u\fR \fIX\fP
@@ -1027,6 +1073,8 @@ This mode returns directly when no entries given.
.PP
Allows the output of dmenu to be customized (N is the total number of input entries):
+
+.RS
.IP \(bu 2
\&'s' selected string
.IP \(bu 2
@@ -1042,6 +1090,8 @@ Allows the output of dmenu to be customized (N is the total number of input entr
.IP \(bu 2
\&'F' quoted filter string (user input)
+.RE
+
.PP
Default: 's'
@@ -1124,6 +1174,12 @@ Reads the first 25 entries blocking, then switches to async mode. This makes it
.PP
Set name used for the window title. Will be shown as Rofi \- \fItitle\fP
+.PP
+\fB\fC\-keep\-right\fR
+
+.PP
+Set ellipsize mode to start. So end of string is visible.
+
.SS Message dialog
.PP
\fB\fC\-e\fR \fImessage\fP
@@ -1224,6 +1280,8 @@ For more information on debugging, see the wiki
.SH PATTERN
.PP
To launch commands (for example, when using the ssh