MKDoc website (#1772)

* Add initial documentation page using mkdocs

* Test action

* Add notes to mkdoc site.

* Add installation guide

* Add installation and config guide to mkdocs.

* Add installation manual

* Add image to main page

* [mkdocs] Add plugin guide.

* [mkdocs] Add plugin to main page and some small fixes.

* Add shipped themes page

* [actions] Also rebuild website on the next branch
This commit is contained in:
Dave Davenport 2022-12-31 13:15:01 +01:00 committed by GitHub
parent 9143d291d4
commit 3d62bb32c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
91 changed files with 18747 additions and 102 deletions

20
.github/workflows/mkdocs.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- sphinx
- next
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v1
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
CONFIG_FILE: mkdocs/mkdocs.yml
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -1,22 +1,8 @@
> # :warning: This page does not describe all of **ROFI**'s configuration options, just the most common usecase. For the full configuration options, check the manpages.
> This page does not describe all of **ROFI**'s configuration options, just the most common usecase. For the full configuration options, check the manpages.
<br />
## :exclamation: Upgrade from old configuration format to new :exclamation:
In release after '2 Jan 2020' you can convert to the new configuration format by using the following command:
```bash
rofi -upgrade-config
```
This will create `~/.config/rofi/config.rasi` (or the default location for your system) with the previously configured options.
From 1.7.0 the old configuration format is no longer supported and the `-upgrade-config` option is no longer available.
<br />
# Where does the configuration live
Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on most systems this is `~/.config/rofi/`.
@ -62,6 +48,12 @@ configuration {
}
```
To create a copy of the current theme, you can run:
```bash
rofi -dump-theme > ~/.config/rofi/current.rasi
```
# Configuration file format
## Encoding
@ -195,6 +187,7 @@ configuration {
```
Rofi will first parse the config block in `~/.config/rofi/config.rasi`, then parse `~/.config/rofi/myConfig.rasi` and then load the theme `myTheme`.\
More information can be obtained from **Themes** section\
Imports can be nested.
Rofi will first parse the config block in `~/.config/rofi/config.rasi`, then
parse `~/.config/rofi/myConfig.rasi` and then load the theme `myTheme`. More
information can be obtained from the **rofi-theme(5)** manpage. Imports can be
nested.

View file

@ -184,6 +184,8 @@ can then load the core in GDB.
> Where the core file is located and what its exact name is different on each distributions. Please consult the
> relevant documentation.
For more information see the rofi-debugging(5) manpage.
## Install distribution
### Debian or Ubuntu

View file

@ -4,7 +4,7 @@
.PP
\fBrofi-theme\fP - Rofi theme format files
.SH GETTING STARTED WITH THEMING
.SH Getting started with theming
.PP
The easiest way to get started theming rofi is by modifying your existing theme.
@ -227,7 +227,7 @@ rofi -dump-theme
.fi
.RE
.SH DEFAULT THEME LOADING
.SH Default theme loading
.PP
By default, rofi loads the default theme. This theme is \fBalways\fP loaded.
The default configuration contains:
@ -265,14 +265,14 @@ rofi -no-config -dump-theme
.fi
.RE
.SH DESCRIPTION
.SH Description
.PP
The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very
static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a
more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a
user-friendly way. Therefore, a new file format has been created, replacing the old one.
.SH FORMAT SPECIFICATION
.SH Format specification
.SH Encoding
.PP
The encoding of the file is UTF-8. Both unix (\fB\fC\\n\fR) and windows (\fB\fC\\r\\n\fR) newlines format are supported. But unix is
@ -556,7 +556,7 @@ Inherit
.PP
Some of these types are a combination of other types.
.SH String
.SS String
.RS
.IP \(bu 2
Format: \fB\fC"[:print:]+"\fR
@ -595,7 +595,7 @@ text {
.PP
The following special characters can be escaped: \fB\fC\\b\fR, \fB\fC\\f\fR, \fB\fC\\n\fR, \fB\fC\\r\fR, \fB\fC\\t\fR, \fB\fC\\v\fR, \fB\fC\\\fR and \fB\fC"\fR\&.
.SH Integer
.SS Integer
.RS
.IP \(bu 2
Format: \fB\fC[-+]?[:digit:]+\fR
@ -617,7 +617,7 @@ lines: 12;
.fi
.RE
.SH Real
.SS Real
.RS
.IP \(bu 2
Format: \fB\fC[-+]?[:digit:]+(\\.[:digit:]+)?\fR
@ -642,7 +642,7 @@ 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
.SS Boolean
.RS
.IP \(bu 2
Format: \fB\fC(true|false)\fR
@ -664,7 +664,7 @@ dynamic: false;
.fi
.RE
.SH Image
.SS Image
.PP
\fBrofi\fP support a limited set of background-image formats.
@ -688,7 +688,7 @@ Angle in deg,rad,grad (as used in color).
.PP
Where the \fB\fCpath\fR is a string, and \fB\fCstop\fR color is of type color.
.SH Color
.SS Color
.PP
\fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4)
@ -776,7 +776,7 @@ text-color: Black;
.fi
.RE
.SH Text style
.SS Text style
.RS
.IP \(bu 2
Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR
@ -820,7 +820,7 @@ The following option is disabled as pango crashes on this if there is eel
.RE
.SH Line style
.SS Line style
.RS
.IP \(bu 2
Format: \fB\fC(dash|solid)\fR
@ -833,7 +833,7 @@ 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
.SS Distance
.RS
.IP \(bu 2
Format: \fB\fC{Integer}px\fR
@ -935,7 +935,7 @@ It supports the following operations:
.PP
It uses the C precedence ordering.
.SH Padding
.SS Padding
.RS
.IP \(bu 2
Format: \fB\fC{Integer}\fR
@ -968,7 +968,7 @@ The different number of fields in the formats are parsed like:
.RE
.SH Border
.SS Border
.RS
.IP \(bu 2
Format: \fB\fC{Integer}\fR
@ -1003,7 +1003,7 @@ When no unit is specified, pixels are assumed.
.RE
.SH Position
.SS Position
.PP
Indicate a place on the window/monitor.
@ -1028,7 +1028,7 @@ Format: \fB\fC(center|east|north|west|south|north east|north west|south west|sou
.RE
.SH Visibility
.SS Visibility
.PP
It is possible to hide widgets:
@ -1043,7 +1043,7 @@ inputbar {
.fi
.RE
.SH Reference
.SS Reference
.RS
.IP \(bu 2
Format: \fB\fC@{PROPERTY NAME}\fR
@ -1110,7 +1110,7 @@ window {
If the property \fB\fCwidth\fR is set globally (\fB\fC*{}\fR) that value is used, if the property
\fB\fCwidth\fR is not set, the default value is used.
.SH Orientation
.SS Orientation
.RS
.IP \(bu 2
Format: \fB\fC(horizontal|vertical)\fR
@ -1120,7 +1120,7 @@ Format: \fB\fC(horizontal|vertical)\fR
.PP
Specify the orientation of the widget.
.SH Cursor
.SS Cursor
.RS
.IP \(bu 2
Format: \fB\fC(default|pointer|text)\fR
@ -1130,7 +1130,7 @@ Format: \fB\fC(default|pointer|text)\fR
.PP
Specify the type of mouse cursor that is set when the mouse pointer is over the widget.
.SH List of keywords
.SS List of keywords
.RS
.IP \(bu 2
Format: \fB\fC[ keyword, keyword ]\fR
@ -1141,7 +1141,7 @@ Format: \fB\fC[ keyword, keyword ]\fR
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 List of values
.SS List of values
.RS
.IP \(bu 2
Format: \fB\fC[ value, value, ... ]\fR
@ -1151,7 +1151,7 @@ Format: \fB\fC[ value, value, ... ]\fR
.PP
An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated.
.SH Environment variable
.SS Environment variable
.RS
.IP \(bu 2
Format: \fB\fC${:alnum:}\fR
@ -1198,7 +1198,7 @@ window {
.PP
If environment WIDTH is set, then that value is parsed, otherwise the default value (\fB\fC40%\fR).
.SH Inherit
.SS Inherit
.RS
.IP \(bu 2
Format: \fB\fCinherit\fR
@ -1219,7 +1219,7 @@ mainbox {
.fi
.RE
.SH ELEMENTS PATHS
.SH Elements paths
.PP
Element paths exists of two parts, the first part refers to the actual widget by name.
Some widgets have an extra state.
@ -1257,10 +1257,10 @@ element selected {
.fi
.RE
.SH SUPPORTED ELEMENT PATH
.SH Name
.SS Supported element paths
.SS Name
.PP
The current widgets available in \fBrofi\fP:
The default widgets available in \fBrofi\fP and the default hierarchic:
.RS
.IP \(bu 2
@ -1338,7 +1338,7 @@ The current widgets available in \fBrofi\fP:
Note that these path names match the default theme. Themes that provide a custom layout will have different
elements, and structure.
.SH State
.SS State
.PP
State: State of widget
@ -1401,11 +1401,11 @@ Note that a state modifies the original element, it therefore contains all the p
The scrollbar uses the \fB\fChandle\fR state when drawing the small scrollbar handle.
This allows the colors used for drawing the handle to be set independently.
.SH SUPPORTED PROPERTIES
.SH Widget properties
.PP
The following properties are currently supported:
.SS all widgets:
.SS all widgets
.RS
.IP \(bu 2
\fBenabled\fP: enable/disable rendering of the widget
@ -1436,7 +1436,7 @@ Type of mouse cursor that is set when the mouse pointer is hovered over the widg
.RE
.SS window:
.SS window
.RS
.IP \(bu 2
\fBfont\fP: string
@ -1468,7 +1468,7 @@ The offset of the window to the anchor point, allowing you to push the window le
.RE
.SS scrollbar:
.SS scrollbar
.RS
.IP \(bu 2
\fBbackground-color\fP: color
@ -1481,7 +1481,7 @@ The offset of the window to the anchor point, allowing you to push the window le
.RE
.SS box:
.SS box
.RS
.IP \(bu 2
\fBorientation\fP: orientation
@ -1492,7 +1492,7 @@ The offset of the window to the anchor point, allowing you to push the window le
.RE
.SS textbox:
.SS textbox
.RS
.IP \(bu 2
\fBbackground-color\fP: color
@ -1552,7 +1552,7 @@ The text appears to the right of the tab stop position (other alignments are not
.RE
.SS listview:
.SS listview
.RS
.IP \(bu 2
\fBcolumns\fP: integer
@ -1600,7 +1600,7 @@ hitting accept will activate the first entry.
.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\&.
.SS listview text highlight:
.SS listview text highlight
.PP
The \fB\fCelement-text\fR widget in the \fB\fClistview\fR is the one used to show the text.
On this widget set the \fB\fChighlight\fR property (only place this property is used) to change
@ -2009,7 +2009,7 @@ If both dummy widgets are set to expand, \fB\fCchild\fR will be centered. Depend
remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets
(expand disabled).
.SH DEBUGGING
.SH Debugging
.PP
To get debug information from the parser, run rofi like:
@ -2259,7 +2259,7 @@ If a filename is provided, it will try to resolve it in the following order:
.PP
A name is resolved as a filename by appending the \fB\fC\&.rasi\fR extension.
.SH EXAMPLES
.SH Examples
.PP
Several examples are installed together with \fBrofi\fP\&. These can be found in \fB\fC{datadir}/rofi/themes/\fR, where
\fB\fC{datadir}\fR is the install path of \fBrofi\fP data. When installed using a package manager, this is usually: \fB\fC/usr/share/\fR\&.

View file

@ -4,7 +4,7 @@
**rofi-theme** - Rofi theme format files
## GETTING STARTED WITH THEMING
## Getting started with theming
The easiest way to get started theming rofi is by modifying your existing theme.
@ -150,7 +150,7 @@ If you want to see the complete theme, including the modification you can run:
rofi -dump-theme
```
## DEFAULT THEME LOADING
## Default theme loading
By default, rofi loads the default theme. This theme is **always** loaded.
The default configuration contains:
@ -174,14 +174,14 @@ To see the default theme, run the following command:
rofi -no-config -dump-theme
```
## DESCRIPTION
## Description
The need for a new theme format was motivated by the fact that the way rofi handled widgets has changed. From a very
static drawing of lines and text to a nice structured form of packing widgets. This change made it possible to provide a
more flexible theme framework. The old theme format and config file are not flexible enough to expose these options in a
user-friendly way. Therefore, a new file format has been created, replacing the old one.
## FORMAT SPECIFICATION
## Format specification
## Encoding
@ -370,7 +370,7 @@ The current theme format supports different types:
Some of these types are a combination of other types.
## String
### String
* Format: `"[:print:]+"`
@ -392,7 +392,7 @@ text {
The following special characters can be escaped: `\b`, `\f`, `\n`, `\r`, `\t`, `\v`, `\` and `"`.
## Integer
### Integer
* Format: `[-+]?[:digit:]+`
@ -404,7 +404,7 @@ For examples:
lines: 12;
```
## Real
### Real
* Format: `[-+]?[:digit:]+(\.[:digit:]+)?`
@ -418,7 +418,7 @@ real: 3.4;
The following is not valid: `.3`, `3.` or scientific notation: `3.4e-3`.
## Boolean
### Boolean
* Format: `(true|false)`
@ -431,7 +431,7 @@ For example:
dynamic: false;
```
## Image
### Image
**rofi** support a limited set of background-image formats.
@ -446,7 +446,7 @@ dynamic: false;
Where the `path` is a string, and `stop` color is of type color.
## Color
### Color
**rofi** supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4)
@ -502,7 +502,7 @@ background-color: transparent;
text-color: Black;
```
## Text style
### Text style
* Format: `(bold|italic|underline|strikethrough|none)`
@ -524,7 +524,7 @@ The following options are available on pango 1.50.0 and up:
* `capitalize`: Capitalize the text.
## Line style
### Line style
* Format: `(dash|solid)`
@ -533,7 +533,7 @@ It currently supports:
* `dash`: a dashed line, where the gap is the same width as the dash
* `solid`: a solid line
## Distance
### Distance
* Format: `{Integer}px`
* Format: `{Real}em`
@ -559,7 +559,7 @@ 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.
### Calculating sizes
#### Calculating sizes
Rofi supports some maths in calculating sizes. For this it uses the CSS syntax:
@ -586,7 +586,7 @@ It supports the following operations:
It uses the C precedence ordering.
## Padding
### Padding
* Format: `{Integer}`
* Format: `{Distance}`
@ -604,7 +604,7 @@ The different number of fields in the formats are parsed like:
* 4 fields: `top`, `right`, `bottom`, `left`
## Border
### Border
* Format: `{Integer}`
* Format: `{Distance}`
@ -622,7 +622,7 @@ style property.
> When no unit is specified, pixels are assumed.
## Position
### Position
Indicate a place on the window/monitor.
@ -638,7 +638,7 @@ Indicate a place on the window/monitor.
* Format: `(center|east|north|west|south|north east|north west|south west|south east)`
## Visibility
### Visibility
It is possible to hide widgets:
@ -649,7 +649,7 @@ inputbar {
```
## Reference
### Reference
* Format: `@{PROPERTY NAME}`
@ -690,32 +690,32 @@ If the property `width` is set globally (`*{}`) that value is used, if the prope
`width` is not set, the default value is used.
## Orientation
### Orientation
* Format: `(horizontal|vertical)`
Specify the orientation of the widget.
## Cursor
### Cursor
* Format: `(default|pointer|text)`
Specify the type of mouse cursor that is set when the mouse pointer is over the widget.
## List of keywords
### List of keywords
* Format: `[ keyword, keyword ]`
A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated.
The `keyword` in the list refers to an widget name.
## List of values
### List of values
* Format: `[ value, value, ... ]`
An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated.
## Environment variable
### Environment variable
* Format: `${:alnum:}`
@ -742,7 +742,7 @@ window {
If environment WIDTH is set, then that value is parsed, otherwise the default value (`40%`).
## Inherit
### Inherit
* Format: `inherit`
@ -755,7 +755,7 @@ mainbox {
```
## ELEMENTS PATHS
## Elements paths
Element paths exists of two parts, the first part refers to the actual widget by name.
Some widgets have an extra state.
@ -780,11 +780,11 @@ element selected {
}
```
## SUPPORTED ELEMENT PATH
### Supported element paths
## Name
### Name
The current widgets available in **rofi**:
The default widgets available in **rofi** and the default hierarchic:
* `window`
* `overlay`: the overlay widget.
@ -813,7 +813,7 @@ Note that these path names match the default theme. Themes that provide a custom
elements, and structure.
## State
### State
State: State of widget
@ -821,7 +821,7 @@ Optional flag(s) indicating state of the widget, used for theming.
These are appended after the name or class of the widget.
### Example:
#### Example:
`button selected.normal { }`
@ -829,7 +829,7 @@ These are appended after the name or class of the widget.
Currently only the entrybox and scrollbar have states:
### Entrybox:
#### Entrybox:
`{visible modifier}.{state}`
@ -857,17 +857,17 @@ nametotextbox selected.active {
Sets all selected textboxes marked active to the given text and background color.
Note that a state modifies the original element, it therefore contains all the properties of that element.
### Scrollbar
#### Scrollbar
The scrollbar uses the `handle` state when drawing the small scrollbar handle.
This allows the colors used for drawing the handle to be set independently.
## SUPPORTED PROPERTIES
## Widget properties
The following properties are currently supported:
### all widgets:
### all widgets
* **enabled**: enable/disable rendering of the widget
* **padding**: padding
@ -887,7 +887,7 @@ The following properties are currently supported:
* **cursor**: cursor
Type of mouse cursor that is set when the mouse pointer is hovered over the widget.
### window:
### window
* **font**: string
The font used in the window
@ -912,21 +912,21 @@ The following properties are currently supported:
The offset of the window to the anchor point, allowing you to push the window left/right/up/down
### scrollbar:
### scrollbar
* **background-color**: color
* **handle-width**: distance
* **handle-color**: color
* **border-color**: color
### box:
### box
* **orientation**: orientation
Set the direction the elements are packed.
* **spacing**: distance
Distance between the packed elements.
### textbox:
### textbox
* **background-color**: color
* **border-color**: the color used for the border around the widget.
@ -959,7 +959,7 @@ The following properties are currently supported:
* **text-outline-width**: The width of the border around the text. (Double)
* **text-outline-color**: The color to use for the text outline. (Color)
### listview:
### listview
* **columns**: integer
Number of columns to show (at least 1)
* **fixed-height**: boolean
@ -990,7 +990,7 @@ The following properties are currently supported:
Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`.
### listview text highlight:
#### listview text highlight
The `element-text` widget in the `listview` is the one used to show the text.
On this widget set the `highlight` property (only place this property is used) to change
@ -1291,7 +1291,7 @@ If both dummy widgets are set to expand, `child` will be centered. Depending on
remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets
(expand disabled).
## DEBUGGING
## Debugging
To get debug information from the parser, run rofi like:
@ -1434,7 +1434,7 @@ A name is resolved as a filename by appending the `.rasi` extension.
## EXAMPLES
## Examples
Several examples are installed together with **rofi**. These can be found in `{datadir}/rofi/themes/`, where
`{datadir}` is the install path of **rofi** data. When installed using a package manager, this is usually: `/usr/share/`.

View file

@ -1577,11 +1577,17 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.SH SUPPORT
.PP
\fBrofi\fP support can be obtained:
* GitHub Discussions
.RS
.IP \(bu 2
GitHub Discussions
\[la]https://github.com/davatorium/rofi/discussions\[ra]
* IRC
.IP \(bu 2
IRC
\[la]irc://irc.libera.chat:6697/#rofi\[ra] (#rofi on irc.libera.chat),
.RE
.SH DEBUGGING
.PP
For more information see \fBrofi-debugging(5)\fP manpage.

View file

@ -1001,6 +1001,7 @@ been released.
## SUPPORT
**rofi** support can be obtained:
* [GitHub Discussions](https://github.com/davatorium/rofi/discussions)
* [IRC](irc://irc.libera.chat:6697/#rofi) (#rofi on irc.libera.chat),

View file

@ -0,0 +1,145 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable modi.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a list and process the result from user
actions. This provide a simple interface to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modi "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
(`\n`) (This can be changed by the script).
If the user selects an option, rofi calls the executable with the text of that option as the first argument.
If the script returns no entries, rofi quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Quentin Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,145 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable modi.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a list and process the result from user
actions. This provide a simple interface to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modi "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
(`\n`) (This can be changed by the script).
If the user selects an option, rofi calls the executable with the text of that option as the first argument.
If the script returns no entries, rofi quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Quentin Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,145 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable modi.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a list and process the result from user
actions. This provide a simple interface to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modi "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
(`\n`) (This can be changed by the script).
If the user selects an option, rofi calls the executable with the text of that option as the first argument.
If the script returns no entries, rofi quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Quentin Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,176 @@
# ROFI DEBUGGING 5 rofi debugging
## NAME
Debugging rofi.
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
to help pin-point the problem.
First try disabling your custom configuration: `-no-config`
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
## Get the relevant information for an issue
Please pastebin the output of the following commands:
```bash
rofi -help
rofi -dump-config
rofi -dump-theme
```
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
and more useful information.
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
interpretation of your configuration and theme.
Please check the output for identifiable information and remove this.
## Timing traces
To get a timing trace, enable the **Timings** debug domain.
```bash
G_MESSAGES_DEBUG=Timings rofi -show drun
```
It will show a trace with (useful) timing information at relevant points during the execution.
This will help debugging when rofi is slow to start.
Example trace:
```
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
```
## Debug domains
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
environment variable. At the time of creation of this page, the following debug domains exist:
* all: Show debug information from all domains.
* X11Helper: The X11 Helper functions.
* View: The main window view functions.
* Widgets.Box: The Box widget.
* Modes.DMenu: The dmenu mode.
* Modes.Run: The run mode.
* Modes.DRun: The desktop file run mode.
* Modes.Window: The window mode.
* Modes.Script: The script mode.
* Modes.Combi: The script mode.
* Modes.Ssh: The ssh mode.
* Rofi: The main application.
* Timings: Get timing output.
* Theme: Theme engine debug output. (warning lots of output).
* Widgets.Icon: The Icon widget.
* Widgets.Box: The box widget.
* Widgets.Container: The container widget.
* Widgets.Window: The window widget.
* Helpers.IconFetcher: Information about icon lookup.
For full list see `man rofi`.
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
To redirect the debug output to a file (`~/rofi.log`) add:
```
rofi -show drun -log ~/rofi.log
```
Specifying the logfile automatically enabled all log domains.
This can be useful when rofi is launched from a window manager.
## Creating a backtrace.
First make sure you compile **rofi** with debug symbols:
```bash
make CFLAGS="-O0 -g3" clean rofi
```
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
mouse. So if it crashes in GDB you are stuck.
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
can then load the core in GDB.
```bash
gdb rofi core
```
Then type inside gdb:
```
thread apply all bt
```
The output trace is useful when reporting crashes.
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
## SEE ALSO
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
## AUTHOR
* Qball Cow <qball@blame.services>

View file

@ -0,0 +1,227 @@
# ROFI-DMENU 5 rofi-dmenu
## NAME
**rofi dmenu mode** - Rofi dmenu emulation
## DESCRIPTION
To integrate **rofi** into scripts as simple selection dialogs,
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
## BASIC CONCEPT
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
If the user selects an row, this is printed out to standard out, allow the script to process it further.
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
**rofi** and the output of rofi into the next.
## USAGE
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
```bash
ls | rofi -dmenu
```
### DMENU DROP-IN REPLACEMENT
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/rofi /usr/bin/dmenu
### DMENU VS SCRIPT MODE
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
### DMENU SPECIFIC COMMANDLINE FLAGS
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
for more information about this syntax.
`-sep` *separator*
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
`-p` *prompt*
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
Default: *dmenu*
`-l` *number of lines to show*
Maximum number of lines the menu may show before scrolling.
rofi -dmenu -l 25
Default: *15*
`-i`
Makes `dmenu` searches case-insensitive
`-a` *X*
Active row, mark *X* as active. Where *X* 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:
* A single row: '5'
* A range of (last 3) rows: '-3:'
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
* A set of rows: '2,0,-9'
* Or any combination: '5,-3:,7:11,2,0,-9'
`-u` *X*
Urgent row, mark *X* as urgent. See `-a` option for details.
`-only-match`
Only return a selected item, do not allow custom entry.
This mode always returns an entry. It will not return if no matching entry is
selected.
`-no-custom`
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.
`-format` *format*
Allows the output of dmenu to be customized (N is the total number of input entries):
* 's' selected string
* 'i' index (0 - (N-1))
* 'd' index (1 - N)
* 'q' quote string
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
* 'f' filter string (user input)
* 'F' quoted filter string (user input)
Default: 's'
`-select` *string*
Select first line that matches the given string
`-mesg` *string*
Add a message line below the filter entry box. Supports Pango markup.
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
`-dump`
Dump the filtered list to stdout and quit.
This can be used to get the list as **rofi** would filter it.
Use together with `-filter` command.
`-input` *file*
Reads from *file* instead of stdin.
`-password`
Hide the input text. This should not be considered secure!
`-markup-rows`
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
`-multi-select`
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 the selection window. This is original dmenu behavior.
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
such as `-dump`, `-only-match` or `-auto-select`.
`-window-title` *title*
Set name used for the window title. Will be shown as Rofi - *title*
`-w` *windowid*
Position **rofi** over the window with the given X11 window ID.
`-keep-right`
Set ellipsize mode to start. So, the end of the string is visible.
`-display-columns`
A comma seperated list of columns to show.
`-display-column-separator`
The column separator. This is a regex.
*default*: '\t'
`-ballot-selected-str` *string*
When multi-select is enabled, prefix this string when element is selected.
*default*: "☑ "
`-ballot-unselected-str` *string*
When multi-select is enabled, prefix this string when element is not selected.
*default*: "☐ "
`-ellipsize-mode` (start|middle|end)
Set ellipsize mode on the listview.
*default* "end"
## PARSING ROW OPTIONS
Extra options for individual rows can be also set. See the **rofi-script(5)** manpage for details; the syntax and supported features are identical.
## RETURN VALUE
* **0**: Row has been selected accepted by user.
* **1**: User cancelled the selection.
* **10-28**: Row accepted by custom keybinding.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,471 @@
# ROFI-KEYS 5 rofi-keys
## NAME
**rofi keys** - Rofi Key and Mouse bindings
## DESCRIPTION
**rofi** supports overriding of any of it key and mouse binding.
## Setting binding
Bindings can be done on the commandline (-{bindingname}):
```bash
rofi -show run -kb-accept-entry 'Control+Shift+space'
```
or via the configuration file:
```css
configuration {
kb-accept-entry: "Control+Shift+space";
}
```
The key can be set by its name (see above) or its keycode:
```css
configuration {
kb-accept-entry: "Control+Shift+[65]";
}
```
An easy way to look up keycode is xev(1).
Multiple keys can be specified for an action as a comma separated list:
```css
configuration {
kb-accept-entry: "Control+Shift+space,Return";
}
```
By Default **rofi** reacts on pressing, to act on the release of all keys
prepend the binding with `!`:
```css
configuration {
kb-accept-entry: "!Control+Shift+space,Return";
}
```
## Unsetting a binding
To unset a binding, pass an empty string.
```css
configuration {
kb-clear-line: "";
}
```
## Keyboard Bindings
### **kb-primary-paste**:
Paste primary selection
**Default**: Control+V,Shift+Insert
### **kb-secondary-paste**
Paste clipboard
**Default**: Control+v,Insert
### **kb-secondary-copy**
Copy current selection to clipboard
**Default**: Control+c
### **kb-clear-line**
Clear input line
**Default**: Control+w
### **kb-move-front**
Beginning of line
**Default**: Control+a
### **kb-move-end**
End of line
**Default**: Control+e
### **kb-move-word-back**
Move back one word
**Default**: Alt+b,Control+Left
### **kb-move-word-forward**
Move forward one word
**Default**: Alt+f,Control+Right
### **kb-move-char-back**
Move back one char
**Default**: Left,Control+b
### **kb-move-char-forward**
Move forward one char
**Default**: Right,Control+f
### **kb-remove-word-back**
Delete previous word
**Default**: Control+Alt+h,Control+BackSpace
### **kb-remove-word-forward**
Delete next word
**Default**: Control+Alt+d
### **kb-remove-char-forward**
Delete next char
**Default**: Delete,Control+d
### **kb-remove-char-back**
Delete previous char
**Default**: BackSpace,Shift+BackSpace,Control+h
### **kb-remove-to-eol**
Delete till the end of line
**Default**: Control+k
### **kb-remove-to-sol**
Delete till the start of line
**Default**: Control+u
### **kb-accept-entry**
Accept entry
**Default**: Control+j,Control+m,Return,KP_Enter
### **kb-accept-custom**
Use entered text as command (in ssh/run modes)
**Default**: Control+Return
### **kb-accept-custom-alt**
Use entered text as command (in ssh/run modes)
**Default**: Control+Shift+Return
### **kb-accept-alt**
Use alternate accept command.
**Default**: Shift+Return
### **kb-delete-entry**
Delete entry from history
**Default**: Shift+Delete
### **kb-mode-next**
Switch to the next mode.
**Default**: Shift+Right,Control+Tab
### **kb-mode-previous**
Switch to the previous mode.
**Default**: Shift+Left,Control+ISO_Left_Tab
### **kb-mode-complete**
Start completion for mode.
**Default**: Control+l
### **kb-row-left**
Go to the previous column
**Default**: Control+Page_Up
### **kb-row-right**
Go to the next column
**Default**: Control+Page_Down
### **kb-row-up**
Select previous entry
**Default**: Up,Control+p
### **kb-row-down**
Select next entry
**Default**: Down,Control+n
### **kb-row-tab**
Go to next row, if one left, accept it, if no left next mode.
**Default**:
### **kb-element-next**
Go to next row.
**Default**: Tab
### **kb-element-prev**
Go to previous row.
**Default**: ISO_Left_Tab
### **kb-page-prev**
Go to the previous page
**Default**: Page_Up
### **kb-page-next**
Go to the next page
**Default**: Page_Down
### **kb-row-first**
Go to the first entry
**Default**: Home,KP_Home
### **kb-row-last**
Go to the last entry
**Default**: End,KP_End
### **kb-row-select**
Set selected item as input text
**Default**: Control+space
### **kb-screenshot**
Take a screenshot of the rofi window
**Default**: Alt+S
### **kb-ellipsize**
Toggle between ellipsize modes for displayed data
**Default**: Alt+period
### **kb-toggle-case-sensitivity**
Toggle case sensitivity
**Default**: grave,dead_grave
### **kb-toggle-sort**
Toggle sort
**Default**: Alt+grave
### **kb-cancel**
Quit rofi
**Default**: Escape,Control+g,Control+bracketleft
### **kb-custom-1**
Custom keybinding 1
**Default**: Alt+1
### **kb-custom-2**
Custom keybinding 2
**Default**: Alt+2
### **kb-custom-3**
Custom keybinding 3
**Default**: Alt+3
### **kb-custom-4**
Custom keybinding 4
**Default**: Alt+4
### **kb-custom-5**
Custom Keybinding 5
**Default**: Alt+5
### **kb-custom-6**
Custom keybinding 6
**Default**: Alt+6
### **kb-custom-7**
Custom Keybinding 7
**Default**: Alt+7
### **kb-custom-8**
Custom keybinding 8
**Default**: Alt+8
### **kb-custom-9**
Custom keybinding 9
**Default**: Alt+9
### **kb-custom-10**
Custom keybinding 10
**Default**: Alt+0
### **kb-custom-11**
Custom keybinding 11
**Default**: Alt+exclam
### **kb-custom-12**
Custom keybinding 12
**Default**: Alt+at
### **kb-custom-13**
Custom keybinding 13
**Default**: Alt+numbersign
### **kb-custom-14**
Custom keybinding 14
**Default**: Alt+dollar
### **kb-custom-15**
Custom keybinding 15
**Default**: Alt+percent
### **kb-custom-16**
Custom keybinding 16
**Default**: Alt+dead_circumflex
### **kb-custom-17**
Custom keybinding 17
**Default**: Alt+ampersand
### **kb-custom-18**
Custom keybinding 18
**Default**: Alt+asterisk
### **kb-custom-19**
Custom Keybinding 19
**Default**: Alt+parenleft
### **kb-select-1**
Select row 1
**Default**: Super+1
### **kb-select-2**
Select row 2
**Default**: Super+2
### **kb-select-3**
Select row 3
**Default**: Super+3
### **kb-select-4**
Select row 4
**Default**: Super+4
### **kb-select-5**
Select row 5
**Default**: Super+5
### **kb-select-6**
Select row 6
**Default**: Super+6
### **kb-select-7**
Select row 7
**Default**: Super+7
### **kb-select-8**
Select row 8
**Default**: Super+8
### **kb-select-9**
Select row 9
**Default**: Super+9
### **kb-select-10**
Select row 10
**Default**: Super+0
## Mouse Bindings
### **ml-row-left**
Go to the previous column
**Default**: ScrollLeft
### **ml-row-right**
Go to the next column
**Default**: ScrollRight
### **ml-row-up**
Select previous entry
**Default**: ScrollUp
### **ml-row-down**
Select next entry
**Default**: ScrollDown
### **me-select-entry**
Select hovered row
**Default**: MousePrimary
### **me-accept-entry**
Accept hovered row
**Default**: MouseDPrimary
### **me-accept-custom**
Accept hovered row with custom action
**Default**: Control+MouseDPrimary
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,155 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable mode.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a
list and process the result from user actions. This provide a simple interface
to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modes "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a
list of options, separated by a newline (`\n`) (This can be changed by the
script). If the user selects an option, rofi calls the executable with the text
of that option as the first argument. If the script returns no entries, rofi
quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
### `ROFI_DATA`
Environment get set when script sets `data` option in header.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
* **keep-selection**: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared.
* **new-selection**: If `keep-selection` is set, this allows you to override the selected entry (absolute position).
* **data**: Passed data to the next execution of the script via **ROFI_DATA**.
* **theme**: Small theme snippet to f.e. change the background color of a widget.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,176 @@
# ROFI DEBUGGING 5 rofi debugging
## NAME
Debugging rofi.
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
to help pin-point the problem.
First try disabling your custom configuration: `-no-config`
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
## Get the relevant information for an issue
Please pastebin the output of the following commands:
```bash
rofi -help
rofi -dump-config
rofi -dump-theme
```
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
and more useful information.
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
interpretation of your configuration and theme.
Please check the output for identifiable information and remove this.
## Timing traces
To get a timing trace, enable the **Timings** debug domain.
```bash
G_MESSAGES_DEBUG=Timings rofi -show drun
```
It will show a trace with (useful) timing information at relevant points during the execution.
This will help debugging when rofi is slow to start.
Example trace:
```
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
```
## Debug domains
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
environment variable. At the time of creation of this page, the following debug domains exist:
* all: Show debug information from all domains.
* X11Helper: The X11 Helper functions.
* View: The main window view functions.
* Widgets.Box: The Box widget.
* Modes.DMenu: The dmenu mode.
* Modes.Run: The run mode.
* Modes.DRun: The desktop file run mode.
* Modes.Window: The window mode.
* Modes.Script: The script mode.
* Modes.Combi: The script mode.
* Modes.Ssh: The ssh mode.
* Rofi: The main application.
* Timings: Get timing output.
* Theme: Theme engine debug output. (warning lots of output).
* Widgets.Icon: The Icon widget.
* Widgets.Box: The box widget.
* Widgets.Container: The container widget.
* Widgets.Window: The window widget.
* Helpers.IconFetcher: Information about icon lookup.
For full list see `man rofi`.
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
To redirect the debug output to a file (`~/rofi.log`) add:
```
rofi -show drun -log ~/rofi.log
```
Specifying the logfile automatically enabled all log domains.
This can be useful when rofi is launched from a window manager.
## Creating a backtrace.
First make sure you compile **rofi** with debug symbols:
```bash
make CFLAGS="-O0 -g3" clean rofi
```
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
mouse. So if it crashes in GDB you are stuck.
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
can then load the core in GDB.
```bash
gdb rofi core
```
Then type inside gdb:
```
thread apply all bt
```
The output trace is useful when reporting crashes.
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
## SEE ALSO
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
## AUTHOR
* Qball Cow <qball@blame.services>

View file

@ -0,0 +1,217 @@
# ROFI-DMENU 5 rofi-dmenu
## NAME
**rofi dmenu mode** - Rofi dmenu emulation
## DESCRIPTION
To integrate **rofi** into scripts as simple selection dialogs,
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
## BASIC CONCEPT
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
If the user selects an row, this is printed out to standard out, allow the script to process it further.
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
**rofi** and the output of rofi into the next.
## USAGE
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
```bash
ls | rofi -dmenu
```
### DMENU DROP-IN REPLACEMENT
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/rofi /usr/bin/dmenu
### DMENU VS SCRIPT MODE
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
### DMENU SPECIFIC COMMANDLINE FLAGS
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
for more information about this syntax.
`-sep` *separator*
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
`-p` *prompt*
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
Default: *dmenu*
`-l` *number of lines to show*
Maximum number of lines the menu may show before scrolling.
rofi -dmenu -l 25
Default: *15*
`-i`
Makes `dmenu` searches case-insensitive
`-a` *X*
Active row, mark *X* as active. Where *X* 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:
* A single row: '5'
* A range of (last 3) rows: '-3:'
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
* A set of rows: '2,0,-9'
* Or any combination: '5,-3:,7:11,2,0,-9'
`-u` *X*
Urgent row, mark *X* as urgent. See `-a` option for details.
`-only-match`
Only return a selected item, do not allow custom entry.
This mode always returns an entry. It will not return if no matching entry is
selected.
`-no-custom`
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.
`-format` *format*
Allows the output of dmenu to be customized (N is the total number of input entries):
* 's' selected string
* 'i' index (0 - (N-1))
* 'd' index (1 - N)
* 'q' quote string
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
* 'f' filter string (user input)
* 'F' quoted filter string (user input)
Default: 's'
`-select` *string*
Select first line that matches the given string
`-mesg` *string*
Add a message line below the filter entry box. Supports Pango markup.
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
`-dump`
Dump the filtered list to stdout and quit.
This can be used to get the list as **rofi** would filter it.
Use together with `-filter` command.
`-input` *file*
Reads from *file* instead of stdin.
`-password`
Hide the input text. This should not be considered secure!
`-markup-rows`
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
`-multi-select`
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 the selection window. This is original dmenu behavior.
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
such as `-dump`, `-only-match` or `-auto-select`.
`-window-title` *title*
Set name used for the window title. Will be shown as Rofi - *title*
`-w` *windowid*
Position **rofi** over the window with the given X11 window ID.
`-keep-right`
Set ellipsize mode to start. So, the end of the string is visible.
`-display-columns`
A comma seperated list of columns to show.
`-display-column-separator`
The column separator. This is a regex.
*default*: '\t'
`-ballot-selected-str` *string*
When multi-select is enabled, prefix this string when element is selected.
*default*: "☑ "
`-ballot-unselected-str` *string*
When multi-select is enabled, prefix this string when element is not selected.
*default*: "☐ "
## RETURN VALUE
* **0**: Row has been selected accepted by user.
* **1**: User cancelled the selection.
* **10-28**: Row accepted by custom keybinding.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,456 @@
# ROFI-KEYS 5 rofi-keys
## NAME
**rofi keys** - Rofi Key and Mouse bindings
## DESCRIPTION
**rofi** supports overriding of any of it key and mouse binding.
## Setting binding
Bindings can be done on the commandline (-{bindingname}):
```bash
rofi -show run -kb-accept-entry 'Control+Shift+space'
```
or via the configuration file:
```css
configuration {
kb-accept-entry: "Control+Shift+space";
}
```
The key can be set by its name (see above) or its keycode:
```css
configuration {
kb-accept-entry: "Control+Shift+[65]";
}
```
An easy way to look up keycode is xev(1).
Multiple keys can be specified for an action as a comma separated list:
```css
configuration {
kb-accept-entry: "Control+Shift+space,Return";
}
```
By Default **rofi** reacts on pressing, to act on the release of all keys
prepend the binding with `!`:
```css
configuration {
kb-accept-entry: "!Control+Shift+space,Return";
}
```
## Keyboard Bindings
### **kb-primary-paste**:
Paste primary selection
**Default**: Control+V,Shift+Insert
### **kb-secondary-paste**
Paste clipboard
**Default**: Control+v,Insert
### **kb-clear-line**
Clear input line
**Default**: Control+w
### **kb-move-front**
Beginning of line
**Default**: Control+a
### **kb-move-end**
End of line
**Default**: Control+e
### **kb-move-word-back**
Move back one word
**Default**: Alt+b,Control+Left
### **kb-move-word-forward**
Move forward one word
**Default**: Alt+f,Control+Right
### **kb-move-char-back**
Move back one char
**Default**: Left,Control+b
### **kb-move-char-forward**
Move forward one char
**Default**: Right,Control+f
### **kb-remove-word-back**
Delete previous word
**Default**: Control+Alt+h,Control+BackSpace
### **kb-remove-word-forward**
Delete next word
**Default**: Control+Alt+d
### **kb-remove-char-forward**
Delete next char
**Default**: Delete,Control+d
### **kb-remove-char-back**
Delete previous char
**Default**: BackSpace,Shift+BackSpace,Control+h
### **kb-remove-to-eol**
Delete till the end of line
**Default**: Control+k
### **kb-remove-to-sol**
Delete till the start of line
**Default**: Control+u
### **kb-accept-entry**
Accept entry
**Default**: Control+j,Control+m,Return,KP_Enter
### **kb-accept-custom**
Use entered text as command (in ssh/run modes)
**Default**: Control+Return
### **kb-accept-custom-alt**
Use entered text as command (in ssh/run modes)
**Default**: Control+Shift+Return
### **kb-accept-alt**
Use alternate accept command.
**Default**: Shift+Return
### **kb-delete-entry**
Delete entry from history
**Default**: Shift+Delete
### **kb-mode-next**
Switch to the next mode.
**Default**: Shift+Right,Control+Tab
### **kb-mode-previous**
Switch to the previous mode.
**Default**: Shift+Left,Control+ISO_Left_Tab
### **kb-mode-complete**
Start completion for mode.
**Default**: Control+l
### **kb-row-left**
Go to the previous column
**Default**: Control+Page_Up
### **kb-row-right**
Go to the next column
**Default**: Control+Page_Down
### **kb-row-up**
Select previous entry
**Default**: Up,Control+p
### **kb-row-down**
Select next entry
**Default**: Down,Control+n
### **kb-row-tab**
Go to next row, if one left, accept it, if no left next mode.
**Default**:
### **kb-element-next**
Go to next row.
**Default**: Tab
### **kb-element-prev**
Go to previous row.
**Default**: ISO_Left_Tab
### **kb-page-prev**
Go to the previous page
**Default**: Page_Up
### **kb-page-next**
Go to the next page
**Default**: Page_Down
### **kb-row-first**
Go to the first entry
**Default**: Home,KP_Home
### **kb-row-last**
Go to the last entry
**Default**: End,KP_End
### **kb-row-select**
Set selected item as input text
**Default**: Control+space
### **kb-screenshot**
Take a screenshot of the rofi window
**Default**: Alt+S
### **kb-ellipsize**
Toggle between ellipsize modes for displayed data
**Default**: Alt+period
### **kb-toggle-case-sensitivity**
Toggle case sensitivity
**Default**: grave,dead_grave
### **kb-toggle-sort**
Toggle sort
**Default**: Alt+grave
### **kb-cancel**
Quit rofi
**Default**: Escape,Control+g,Control+bracketleft
### **kb-custom-1**
Custom keybinding 1
**Default**: Alt+1
### **kb-custom-2**
Custom keybinding 2
**Default**: Alt+2
### **kb-custom-3**
Custom keybinding 3
**Default**: Alt+3
### **kb-custom-4**
Custom keybinding 4
**Default**: Alt+4
### **kb-custom-5**
Custom Keybinding 5
**Default**: Alt+5
### **kb-custom-6**
Custom keybinding 6
**Default**: Alt+6
### **kb-custom-7**
Custom Keybinding 7
**Default**: Alt+7
### **kb-custom-8**
Custom keybinding 8
**Default**: Alt+8
### **kb-custom-9**
Custom keybinding 9
**Default**: Alt+9
### **kb-custom-10**
Custom keybinding 10
**Default**: Alt+0
### **kb-custom-11**
Custom keybinding 11
**Default**: Alt+exclam
### **kb-custom-12**
Custom keybinding 12
**Default**: Alt+at
### **kb-custom-13**
Custom keybinding 13
**Default**: Alt+numbersign
### **kb-custom-14**
Custom keybinding 14
**Default**: Alt+dollar
### **kb-custom-15**
Custom keybinding 15
**Default**: Alt+percent
### **kb-custom-16**
Custom keybinding 16
**Default**: Alt+dead_circumflex
### **kb-custom-17**
Custom keybinding 17
**Default**: Alt+ampersand
### **kb-custom-18**
Custom keybinding 18
**Default**: Alt+asterisk
### **kb-custom-19**
Custom Keybinding 19
**Default**: Alt+parenleft
### **kb-select-1**
Select row 1
**Default**: Super+1
### **kb-select-2**
Select row 2
**Default**: Super+2
### **kb-select-3**
Select row 3
**Default**: Super+3
### **kb-select-4**
Select row 4
**Default**: Super+4
### **kb-select-5**
Select row 5
**Default**: Super+5
### **kb-select-6**
Select row 6
**Default**: Super+6
### **kb-select-7**
Select row 7
**Default**: Super+7
### **kb-select-8**
Select row 8
**Default**: Super+8
### **kb-select-9**
Select row 9
**Default**: Super+9
### **kb-select-10**
Select row 10
**Default**: Super+0
## Mouse Bindings
### **ml-row-left**
Go to the previous column
**Default**: ScrollLeft
### **ml-row-right**
Go to the next column
**Default**: ScrollRight
### **ml-row-up**
Select previous entry
**Default**: ScrollUp
### **ml-row-down**
Select next entry
**Default**: ScrollDown
### **me-select-entry**
Select hovered row
**Default**: MousePrimary
### **me-accept-entry**
Accept hovered row
**Default**: MouseDPrimary
### **me-accept-custom**
Accept hovered row with custom action
**Default**: Control+MouseDPrimary
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,155 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable mode.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a
list and process the result from user actions. This provide a simple interface
to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modes "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a
list of options, separated by a newline (`\n`) (This can be changed by the
script). If the user selects an option, rofi calls the executable with the text
of that option as the first argument. If the script returns no entries, rofi
quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
### `ROFI_DATA`
Environment get set when script sets `data` option in header.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
* **keep-selection**: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared.
* **new-selection**: If `keep-selection` is set, this allows you to override the selected entry (absolute position).
* **data**: Passed data to the next execution of the script via **ROFI_DATA**.
* **theme**: Small theme snippet to f.e. change the background color of a widget.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,176 @@
# ROFI DEBUGGING 5 rofi debugging
## NAME
Debugging rofi.
When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test
to help pin-point the problem.
First try disabling your custom configuration: `-no-config`
This disables the parsing of the configuration files. This runs rofi in *stock* mode.
If you run custom C plugins, you can disable the plugins using: `-no-plugins`
## Get the relevant information for an issue
Please pastebin the output of the following commands:
```bash
rofi -help
rofi -dump-config
rofi -dump-theme
```
`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout
and more useful information.
The `rofi -dump-config` and `rofi -dump-theme` output gives us `rofi`
interpretation of your configuration and theme.
Please check the output for identifiable information and remove this.
## Timing traces
To get a timing trace, enable the **Timings** debug domain.
```bash
G_MESSAGES_DEBUG=Timings rofi -show drun
```
It will show a trace with (useful) timing information at relevant points during the execution.
This will help debugging when rofi is slow to start.
Example trace:
```
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000000 (0.000000): Started
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000126 (0.000126): ../source/rofi.c:main:786
(process:14942): Timings-DEBUG: 13:47:39.335: 0.000163 (0.000037): ../source/rofi.c:main:819
(process:14942): Timings-DEBUG: 13:47:39.336: 0.000219 (0.000056): ../source/rofi.c:main:826 Setup Locale
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001235 (0.001016): ../source/rofi.c:main:828 Collect MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001264 (0.000029): ../source/rofi.c:main:830 Setup MODI
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001283 (0.000019): ../source/rofi.c:main:834 Setup mainloop
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001369 (0.000086): ../source/rofi.c:main:837 NK Bindings
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001512 (0.000143): ../source/xcb.c:display_setup:1177 Open Display
(process:14942): Timings-DEBUG: 13:47:39.337: 0.001829 (0.000317): ../source/xcb.c:display_setup:1192 Setup XCB
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010650 (0.008821): ../source/rofi.c:main:844 Setup Display
(process:14942): Timings-DEBUG: 13:47:39.346: 0.010715 (0.000065): ../source/rofi.c:main:848 Setup abe
(process:14942): Timings-DEBUG: 13:47:39.350: 0.015101 (0.004386): ../source/rofi.c:main:883 Load cmd config
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015275 (0.000174): ../source/rofi.c:main:907 Setup Modi
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015291 (0.000016): ../source/view.c:rofi_view_workers_initialize:1922 Setup Threadpool, start
(process:14942): Timings-DEBUG: 13:47:39.351: 0.015349 (0.000058): ../source/view.c:rofi_view_workers_initialize:1945 Setup Threadpool, done
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032018 (0.016669): ../source/rofi.c:main:1000 Setup late Display
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032080 (0.000062): ../source/rofi.c:main:1003 Theme setup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032109 (0.000029): ../source/rofi.c:startup:668 Startup
(process:14942): Timings-DEBUG: 13:47:39.367: 0.032121 (0.000012): ../source/rofi.c:startup:677 Grab keyboard
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032214 (0.000093): ../source/view.c:__create_window:701 xcb create window
(process:14942): Timings-DEBUG: 13:47:39.368: 0.032235 (0.000021): ../source/view.c:__create_window:705 xcb create gc
(process:14942): Timings-DEBUG: 13:47:39.368: 0.033136 (0.000901): ../source/view.c:__create_window:714 create cairo surface
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033286 (0.000150): ../source/view.c:__create_window:723 pango cairo font setup
(process:14942): Timings-DEBUG: 13:47:39.369: 0.033351 (0.000065): ../source/view.c:__create_window:761 configure font
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045896 (0.012545): ../source/view.c:__create_window:769 textbox setup
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045944 (0.000048): ../source/view.c:__create_window:781 setup window attributes
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045955 (0.000011): ../source/view.c:__create_window:791 setup window fullscreen
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045966 (0.000011): ../source/view.c:__create_window:797 setup window name and class
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045974 (0.000008): ../source/view.c:__create_window:808 setup startup notification
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045981 (0.000007): ../source/view.c:__create_window:810 done
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045992 (0.000011): ../source/rofi.c:startup:679 Create Window
(process:14942): Timings-DEBUG: 13:47:39.381: 0.045999 (0.000007): ../source/rofi.c:startup:681 Parse ABE
(process:14942): Timings-DEBUG: 13:47:39.381: 0.046113 (0.000114): ../source/rofi.c:startup:684 Config sanity check
(process:14942): Timings-DEBUG: 13:47:39.384: 0.048229 (0.002116): ../source/dialogs/run.c:get_apps:216 start
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054626 (0.006397): ../source/dialogs/run.c:get_apps:336 stop
(process:14942): Timings-DEBUG: 13:47:39.390: 0.054781 (0.000155): ../source/dialogs/drun.c:get_apps:634 Get Desktop apps (start)
(process:14942): Timings-DEBUG: 13:47:39.391: 0.055264 (0.000483): ../source/dialogs/drun.c:get_apps:641 Get Desktop apps (user dir)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082884 (0.027620): ../source/dialogs/drun.c:get_apps:659 Get Desktop apps (system dirs)
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082944 (0.000060): ../source/dialogs/drun.c:get_apps_history:597 Start drun history
(process:14942): Timings-DEBUG: 13:47:39.418: 0.082977 (0.000033): ../source/dialogs/drun.c:get_apps_history:617 Stop drun history
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083638 (0.000661): ../source/dialogs/drun.c:get_apps:664 Sorting done.
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083685 (0.000047): ../source/view.c:rofi_view_create:1759
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083700 (0.000015): ../source/view.c:rofi_view_create:1783 Startup notification
(process:14942): Timings-DEBUG: 13:47:39.419: 0.083711 (0.000011): ../source/view.c:rofi_view_create:1786 Get active monitor
(process:14942): Timings-DEBUG: 13:47:39.420: 0.084693 (0.000982): ../source/view.c:rofi_view_refilter:1028 Filter start
(process:14942): Timings-DEBUG: 13:47:39.421: 0.085992 (0.001299): ../source/view.c:rofi_view_refilter:1132 Filter done
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086090 (0.000098): ../source/view.c:rofi_view_update:982
(process:14942): Timings-DEBUG: 13:47:39.421: 0.086123 (0.000033): ../source/view.c:rofi_view_update:1002 Background
(process:14942): Timings-DEBUG: 13:47:39.428: 0.092864 (0.006741): ../source/view.c:rofi_view_update:1008 widgets
```
## Debug domains
To further debug the plugin, you can get a trace with (lots of) debug information. This debug output can be enabled for
multiple parts in rofi using the glib debug framework. Debug domains can be enabled by setting the G\_MESSAGES\_DEBUG
environment variable. At the time of creation of this page, the following debug domains exist:
* all: Show debug information from all domains.
* X11Helper: The X11 Helper functions.
* View: The main window view functions.
* Widgets.Box: The Box widget.
* Modes.DMenu: The dmenu mode.
* Modes.Run: The run mode.
* Modes.DRun: The desktop file run mode.
* Modes.Window: The window mode.
* Modes.Script: The script mode.
* Modes.Combi: The script mode.
* Modes.Ssh: The ssh mode.
* Rofi: The main application.
* Timings: Get timing output.
* Theme: Theme engine debug output. (warning lots of output).
* Widgets.Icon: The Icon widget.
* Widgets.Box: The box widget.
* Widgets.Container: The container widget.
* Widgets.Window: The window widget.
* Helpers.IconFetcher: Information about icon lookup.
For full list see `man rofi`.
Example: `G_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun` To get specific output from the Desktop file run dialog.
To redirect the debug output to a file (`~/rofi.log`) add:
```
rofi -show drun -log ~/rofi.log
```
Specifying the logfile automatically enabled all log domains.
This can be useful when rofi is launched from a window manager.
## Creating a backtrace.
First make sure you compile **rofi** with debug symbols:
```bash
make CFLAGS="-O0 -g3" clean rofi
```
Getting a backtrace using GDB is not very handy. Because if rofi get stuck, it grabs keyboard and
mouse. So if it crashes in GDB you are stuck.
The best way to go is to enable core file. (ulimit -c unlimited in bash) then make rofi crash. You
can then load the core in GDB.
```bash
gdb rofi core
```
Then type inside gdb:
```
thread apply all bt
```
The output trace is useful when reporting crashes.
Some distribution have `systemd-coredump`, this way you can easily get a backtrace via `coredumpctl`.
## SEE ALSO
**rofi-sensible-terminal(1)**, **dmenu(1)**, **rofi-debugging(5)**, **rofi-theme(5)**, **rofi-script(5)**, **rofi-keys(5)**,**rofi-theme-selector(1)**
## AUTHOR
* Qball Cow <qball@blame.services>

View file

@ -0,0 +1,217 @@
# ROFI-DMENU 5 rofi-dmenu
## NAME
**rofi dmenu mode** - Rofi dmenu emulation
## DESCRIPTION
To integrate **rofi** into scripts as simple selection dialogs,
**rofi** supports emulating **dmenu(1)** (A dynamic menu for X11).
The website for `dmenu` can be found [here](http://tools.suckless.org/dmenu/).
**rofi** does not aim to be 100% compatible with `dmenu`. There are simply too many flavors of `dmenu`.
The idea is that the basic usage command-line flags are obeyed, theme-related flags are not.
Besides, **rofi** offers some extended features (like multi-select, highlighting, message bar, extra key bindings).
## BASIC CONCEPT
In `dmenu` mode, **rofi** reads data from standard in, splits them into separate entries and displays them.
If the user selects an row, this is printed out to standard out, allow the script to process it further.
By default separation of rows is done on new lines, making it easy to pipe the output a one application into
**rofi** and the output of rofi into the next.
## USAGE
By launching **rofi** with the `-dmenu` flag it will go into dmenu emulation mode.
```bash
ls | rofi -dmenu
```
### DMENU DROP-IN REPLACEMENT
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/rofi /usr/bin/dmenu
### DMENU VS SCRIPT MODE
Script mode is used to extend **rofi**, dmenu mode is used to extend a script.
The two do share much of the same input format. Please see the **rofi-script(5)** manpage for more information.
### DMENU SPECIFIC COMMANDLINE FLAGS
A lot of these options can also be modified by the script using special input. See the **rofi-script(5)** manpage
for more information about this syntax.
`-sep` *separator*
Separator for `dmenu`. Example: To show a list of 'a' to 'e' with '|' as a separator:
echo "a|b|c|d|e" | rofi -sep '|' -dmenu
`-p` *prompt*
Specify the prompt to show in `dmenu` mode. For example, select 'monkey', a,b,c,d, or e.
echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey"
Default: *dmenu*
`-l` *number of lines to show*
Maximum number of lines the menu may show before scrolling.
rofi -dmenu -l 25
Default: *15*
`-i`
Makes `dmenu` searches case-insensitive
`-a` *X*
Active row, mark *X* as active. Where *X* 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:
* A single row: '5'
* A range of (last 3) rows: '-3:'
* 4 rows starting from row 7: '7:11' (or in legacy notation: '7-10')
* A set of rows: '2,0,-9'
* Or any combination: '5,-3:,7:11,2,0,-9'
`-u` *X*
Urgent row, mark *X* as urgent. See `-a` option for details.
`-only-match`
Only return a selected item, do not allow custom entry.
This mode always returns an entry. It will not return if no matching entry is
selected.
`-no-custom`
Only return a selected item, do not allow custom entry.
This mode returns directly when no entries given.
`-format` *format*
Allows the output of dmenu to be customized (N is the total number of input entries):
* 's' selected string
* 'i' index (0 - (N-1))
* 'd' index (1 - N)
* 'q' quote string
* 'p' Selected string stripped from Pango markup (Needs to be a valid string)
* 'f' filter string (user input)
* 'F' quoted filter string (user input)
Default: 's'
`-select` *string*
Select first line that matches the given string
`-mesg` *string*
Add a message line below the filter entry box. Supports Pango markup.
For more information on supported markup, see [here](https://docs.gtk.org/Pango/pango_markup.html)
`-dump`
Dump the filtered list to stdout and quit.
This can be used to get the list as **rofi** would filter it.
Use together with `-filter` command.
`-input` *file*
Reads from *file* instead of stdin.
`-password`
Hide the input text. This should not be considered secure!
`-markup-rows`
Tell **rofi** that DMenu input is Pango markup encoded, and should be rendered.
See [here](https://developer.gnome.org/pygtk/stable/pango-markup-language.html) for details about Pango markup.
`-multi-select`
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 the selection window. This is original dmenu behavior.
Note: the default asynchronous mode will also be automatically disabled if used with conflicting options,
such as `-dump`, `-only-match` or `-auto-select`.
`-window-title` *title*
Set name used for the window title. Will be shown as Rofi - *title*
`-w` *windowid*
Position **rofi** over the window with the given X11 window ID.
`-keep-right`
Set ellipsize mode to start. So, the end of the string is visible.
`-display-columns`
A comma seperated list of columns to show.
`-display-column-separator`
The column separator. This is a regex.
*default*: '\t'
`-ballot-selected-str` *string*
When multi-select is enabled, prefix this string when element is selected.
*default*: "☑ "
`-ballot-unselected-str` *string*
When multi-select is enabled, prefix this string when element is not selected.
*default*: "☐ "
## RETURN VALUE
* **0**: Row has been selected accepted by user.
* **1**: User cancelled the selection.
* **10-28**: Row accepted by custom keybinding.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,456 @@
# ROFI-KEYS 5 rofi-keys
## NAME
**rofi keys** - Rofi Key and Mouse bindings
## DESCRIPTION
**rofi** supports overriding of any of it key and mouse binding.
## Setting binding
Bindings can be done on the commandline (-{bindingname}):
```bash
rofi -show run -kb-accept-entry 'Control+Shift+space'
```
or via the configuration file:
```css
configuration {
kb-accept-entry: "Control+Shift+space";
}
```
The key can be set by its name (see above) or its keycode:
```css
configuration {
kb-accept-entry: "Control+Shift+[65]";
}
```
An easy way to look up keycode is xev(1).
Multiple keys can be specified for an action as a comma separated list:
```css
configuration {
kb-accept-entry: "Control+Shift+space,Return";
}
```
By Default **rofi** reacts on pressing, to act on the release of all keys
prepend the binding with `!`:
```css
configuration {
kb-accept-entry: "!Control+Shift+space,Return";
}
```
## Keyboard Bindings
### **kb-primary-paste**:
Paste primary selection
**Default**: Control+V,Shift+Insert
### **kb-secondary-paste**
Paste clipboard
**Default**: Control+v,Insert
### **kb-clear-line**
Clear input line
**Default**: Control+w
### **kb-move-front**
Beginning of line
**Default**: Control+a
### **kb-move-end**
End of line
**Default**: Control+e
### **kb-move-word-back**
Move back one word
**Default**: Alt+b,Control+Left
### **kb-move-word-forward**
Move forward one word
**Default**: Alt+f,Control+Right
### **kb-move-char-back**
Move back one char
**Default**: Left,Control+b
### **kb-move-char-forward**
Move forward one char
**Default**: Right,Control+f
### **kb-remove-word-back**
Delete previous word
**Default**: Control+Alt+h,Control+BackSpace
### **kb-remove-word-forward**
Delete next word
**Default**: Control+Alt+d
### **kb-remove-char-forward**
Delete next char
**Default**: Delete,Control+d
### **kb-remove-char-back**
Delete previous char
**Default**: BackSpace,Shift+BackSpace,Control+h
### **kb-remove-to-eol**
Delete till the end of line
**Default**: Control+k
### **kb-remove-to-sol**
Delete till the start of line
**Default**: Control+u
### **kb-accept-entry**
Accept entry
**Default**: Control+j,Control+m,Return,KP_Enter
### **kb-accept-custom**
Use entered text as command (in ssh/run modes)
**Default**: Control+Return
### **kb-accept-custom-alt**
Use entered text as command (in ssh/run modes)
**Default**: Control+Shift+Return
### **kb-accept-alt**
Use alternate accept command.
**Default**: Shift+Return
### **kb-delete-entry**
Delete entry from history
**Default**: Shift+Delete
### **kb-mode-next**
Switch to the next mode.
**Default**: Shift+Right,Control+Tab
### **kb-mode-previous**
Switch to the previous mode.
**Default**: Shift+Left,Control+ISO_Left_Tab
### **kb-mode-complete**
Start completion for mode.
**Default**: Control+l
### **kb-row-left**
Go to the previous column
**Default**: Control+Page_Up
### **kb-row-right**
Go to the next column
**Default**: Control+Page_Down
### **kb-row-up**
Select previous entry
**Default**: Up,Control+p
### **kb-row-down**
Select next entry
**Default**: Down,Control+n
### **kb-row-tab**
Go to next row, if one left, accept it, if no left next mode.
**Default**:
### **kb-element-next**
Go to next row.
**Default**: Tab
### **kb-element-prev**
Go to previous row.
**Default**: ISO_Left_Tab
### **kb-page-prev**
Go to the previous page
**Default**: Page_Up
### **kb-page-next**
Go to the next page
**Default**: Page_Down
### **kb-row-first**
Go to the first entry
**Default**: Home,KP_Home
### **kb-row-last**
Go to the last entry
**Default**: End,KP_End
### **kb-row-select**
Set selected item as input text
**Default**: Control+space
### **kb-screenshot**
Take a screenshot of the rofi window
**Default**: Alt+S
### **kb-ellipsize**
Toggle between ellipsize modes for displayed data
**Default**: Alt+period
### **kb-toggle-case-sensitivity**
Toggle case sensitivity
**Default**: grave,dead_grave
### **kb-toggle-sort**
Toggle sort
**Default**: Alt+grave
### **kb-cancel**
Quit rofi
**Default**: Escape,Control+g,Control+bracketleft
### **kb-custom-1**
Custom keybinding 1
**Default**: Alt+1
### **kb-custom-2**
Custom keybinding 2
**Default**: Alt+2
### **kb-custom-3**
Custom keybinding 3
**Default**: Alt+3
### **kb-custom-4**
Custom keybinding 4
**Default**: Alt+4
### **kb-custom-5**
Custom Keybinding 5
**Default**: Alt+5
### **kb-custom-6**
Custom keybinding 6
**Default**: Alt+6
### **kb-custom-7**
Custom Keybinding 7
**Default**: Alt+7
### **kb-custom-8**
Custom keybinding 8
**Default**: Alt+8
### **kb-custom-9**
Custom keybinding 9
**Default**: Alt+9
### **kb-custom-10**
Custom keybinding 10
**Default**: Alt+0
### **kb-custom-11**
Custom keybinding 11
**Default**: Alt+exclam
### **kb-custom-12**
Custom keybinding 12
**Default**: Alt+at
### **kb-custom-13**
Custom keybinding 13
**Default**: Alt+numbersign
### **kb-custom-14**
Custom keybinding 14
**Default**: Alt+dollar
### **kb-custom-15**
Custom keybinding 15
**Default**: Alt+percent
### **kb-custom-16**
Custom keybinding 16
**Default**: Alt+dead_circumflex
### **kb-custom-17**
Custom keybinding 17
**Default**: Alt+ampersand
### **kb-custom-18**
Custom keybinding 18
**Default**: Alt+asterisk
### **kb-custom-19**
Custom Keybinding 19
**Default**: Alt+parenleft
### **kb-select-1**
Select row 1
**Default**: Super+1
### **kb-select-2**
Select row 2
**Default**: Super+2
### **kb-select-3**
Select row 3
**Default**: Super+3
### **kb-select-4**
Select row 4
**Default**: Super+4
### **kb-select-5**
Select row 5
**Default**: Super+5
### **kb-select-6**
Select row 6
**Default**: Super+6
### **kb-select-7**
Select row 7
**Default**: Super+7
### **kb-select-8**
Select row 8
**Default**: Super+8
### **kb-select-9**
Select row 9
**Default**: Super+9
### **kb-select-10**
Select row 10
**Default**: Super+0
## Mouse Bindings
### **ml-row-left**
Go to the previous column
**Default**: ScrollLeft
### **ml-row-right**
Go to the next column
**Default**: ScrollRight
### **ml-row-up**
Select previous entry
**Default**: ScrollUp
### **ml-row-down**
Select next entry
**Default**: ScrollDown
### **me-select-entry**
Select hovered row
**Default**: MousePrimary
### **me-accept-entry**
Accept hovered row
**Default**: MouseDPrimary
### **me-accept-custom**
Accept hovered row with custom action
**Default**: Control+MouseDPrimary
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), rofi-theme(5), rofi-script(5)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

View file

@ -0,0 +1,155 @@
# ROFI-SCRIPT 5 rofi-script
## NAME
**rofi script mode** - Rofi format for scriptable mode.
## DESCRIPTION
**rofi** supports modes that use simple scripts in the background to generate a
list and process the result from user actions. This provide a simple interface
to make simple extensions to rofi.
## USAGE
To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
For example:
```
rofi -show fb -modes "fb:file_browser.sh"
```
The name should be unique.
## API
Rofi calls the executable without arguments on startup. This should generate a
list of options, separated by a newline (`\n`) (This can be changed by the
script). If the user selects an option, rofi calls the executable with the text
of that option as the first argument. If the script returns no entries, rofi
quits.
A simple script would be:
```bash
#!/usr/bin/env bash
if [ x"$@" = x"quit" ]
then
exit 0
fi
echo "reload"
echo "quit"
```
This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
## Environment
Rofi sets the following environment variable when executing the script:
### `ROFI_RETV`
An integer number with the current state:
* **0**: Initial call of script.
* **1**: Selected an entry.
* **2**: Selected a custom entry.
* **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ).
### `ROFI_INFO`
Environment get set when selected entry get set with the property value of the 'info' row option, if set.
### `ROFI_DATA`
Environment get set when script sets `data` option in header.
## Passing mode options
Extra options, like setting the prompt, can be set by the script.
Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
For example to set the prompt:
```bash
echo -en "\0prompt\x1fChange prompt\n"
```
The following extra options exists:
* **prompt**: Update the prompt text.
* **message**: Update the message text.
* **markup-rows**: If 'true' renders markup in the row.
* **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**: If set to 'true'; only accept listed entries, ignore custom input.
* **use-hot-keys**: If set to true, it enabled the Custom keybindings for script. Warning this breaks the normal rofi flow.
* **keep-selection**: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared.
* **new-selection**: If `keep-selection` is set, this allows you to override the selected entry (absolute position).
* **data**: Passed data to the next execution of the script via **ROFI_DATA**.
* **theme**: Small theme snippet to f.e. change the background color of a widget.
## Parsing row options
Extra options for individual rows can be set.
The extra option can be specified following the same syntax as mode option, but following the entry.
For example:
```bash
echo -en "aap\0icon\x1ffolder\n"
```
The following options are supported:
* **icon**: Set the icon for that row.
* **meta**: Specify invisible search terms.
* **nonselectable**: If true the row cannot activated.
* **info**: Info that, on selection, gets placed in the `ROFI_INFO` environment variable. This entry does not get searched.
multiple entries can be passed using the `\x1f` separator.
```bash
echo -en "aap\0icon\x1ffolder\x1finfo\x1ftest\n"
```
## Executing external program
If you want to launch an external program from the script, you need to make sure it is launched in the background.
If not rofi will wait for its output (to display).
In bash the best way to do this is using `coproc`.
```bash
coproc ( myApp > /dev/null 2>&1 )
```
## DASH shell
If you use the `dash` shell for your script, take special care with how dash handles escaped values for the separators.
See issue #1201 on github.
## SEE ALSO
rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
## AUTHOR
Qball Cow <qball@gmpclient.org>
Rasmus Steinke <rasi@xssn.at>
Morgane Glidic <sardemff7+rofi@sardemff7.net>
Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
For a full list of authors, check the AUTHORS file.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1
mkdocs/docs/CONFIG.md Symbolic link
View file

@ -0,0 +1 @@
../../CONFIG.md

1
mkdocs/docs/COPYING.md Symbolic link
View file

@ -0,0 +1 @@
../../COPYING

1
mkdocs/docs/INSTALL.md Symbolic link
View file

@ -0,0 +1 @@
../../INSTALL.md

View file

@ -0,0 +1 @@
../../../doc/rofi-debugging.5.markdown

View file

@ -0,0 +1 @@
../../../doc/rofi-dmenu.5.markdown

View file

@ -0,0 +1 @@
../../../doc/rofi-keys.5.markdown

View file

@ -0,0 +1 @@
../../../doc/rofi-script.5.markdown

View file

@ -0,0 +1 @@
../../../doc/rofi-theme.5.markdown

View file

@ -0,0 +1 @@
../../../doc/rofi.1.markdown

View file

@ -0,0 +1,695 @@
> This guide is taken from the 1.4.0 release preview posts. The information might
> be outdated, but in general should still be correct and a good starting point
> for writing a plugin. Links have been updated.
> A recent plugin that can be used as example can be found
> [here](https://git.sr.ht/~qball/rofi-ntfy).
## Build system
**Rofi** uses [autotools](https://en.wikipedia.org/wiki/GNU_build_system) as
build system. While there are many opinions about the pre/cons off all the
different options out there (to many to go into in this blog post), we will
stick to [autotools](https://en.wikipedia.org/wiki/GNU_build_system) for now.
To make life easier I create a template project
[here](https://github.com/davatorium/rofi-plugin-template)
This includes the 2 files for the build system and the C template.
### Configure.ac
First we are going to update the `configure.ac` file:
```
AC_INIT([rofi-plugin-template], [0.0.1], [https://my-neat-plugin.org//],[],[https://support.my-neat-plugin.org/])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects dist-xz])
AM_SILENT_RULES([yes])
AC_PROG_CC([clang gcc cc])
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_USE_SYSTEM_EXTENSIONS
AM_PROG_AR
AM_CFLAGS="-Wall -Wextra -Wparentheses -Winline -pedantic -Wunreachable-code"
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.40 gio-unix-2.0 gmodule-2.0 ])
PKG_CHECK_MODULES([rofi], [rofi])
[rofi_PLUGIN_INSTALL_DIR]="`$PKG_CONFIG --variable=pluginsdir rofi`"
AC_SUBST([rofi_PLUGIN_INSTALL_DIR])
LT_INIT([disable-static])
AC_SUBST([AM_CFLAGS])
AC_CONFIG_FILES([Makefile ])
AC_OUTPUT
```
Basically the only thing here we need to change is the name of the plugin, the
website and the support site.
```diff
AC_INIT([rofi-file-browser], [0.0.1], [https://davedavenport.github.io/rofi/],[],[https://reddit.org/r/qtools/])
```
### Makefile.am
We need to make a similar change in the `Makefile.am` file, this is important so
each plugin has a unique name. (if they are all called myplugin, it would be
hard to install more then one plugin.)
```
ACLOCAL_AMFLAGS=-I m4
plugindir=@rofi_PLUGIN_INSTALL_DIR@
plugin_LTLIBRARIES = myplugin.la
myplugin_la_SOURCES=\
src/myplugin.c
myplugin_la_CFLAGS= @glib_CFLAGS@ @rofi_CFLAGS@
myplugin_la_LIBADD= @glib_LIBS@ @rofi_LIBS@
myplugin_la_LDFLAGS= -module -avoid-version
```
So we do a search and replace from `myplugin` to `file_browser`:
```
ACLOCAL_AMFLAGS=-I m4
plugindir=${libdir}/rofi/
plugin_LTLIBRARIES = file_browser.la
file_browser_la_SOURCES=\
src/file_browser.c
file_browser_la_CFLAGS= @glib_CFLAGS@ @rofi_CFLAGS@
file_browser_la_LIBADD= @glib_LIBS@ @rofi_LIBS@
file_browser_la_LDFLAGS= -module -avoid-version
```
As you noticed I also changed the name of the c template file. This is not
needed.
## Building the system
Now that we have this setup, it is easy to build:
* Generate the build system:
```bash
autoreconf -i
```
* Create a `build` directory.
```bash
mkdir build
cd build
```
* Run `configure`
```bash
../configure
```
* build
```bash
make
```
* install
```bash
make install
```
You can now test the plugin by calling:
```bash
rofi -show myplugin -modi myplugin
```
If we start changing the template, the name to use will change.
## Edit the C template
The first thing todo is personalize the template. Below I have modified it so it
is called file-browser:
```c
/**
* rofi-file-browser
*
* MIT/X11 License
* Copyright (c) 2017 Qball Cow <qball@gmpclient.org>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <gmodule.h>
#include <rofi/mode.h>
#include <rofi/helper.h>
#include <rofi/mode-private.h>
#include <stdint.h>
G_MODULE_EXPORT Mode mode;
/**
* The internal data structure holding the private data of the TEST Mode.
*/
typedef struct
{
char **array;
unsigned int array_length;
} FileBrowserModePrivateData;
static void get_file_browser ( Mode *sw )
{
/**
* Get the entries to display.
* this gets called on plugin initialization.
*/
}
static int file_browser_mode_init ( Mode *sw )
{
/**
* Called on startup when enabled (in modi list)
*/
if ( mode_get_private_data ( sw ) == NULL ) {
FileBrowserModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) );
mode_set_private_data ( sw, (void *) pd );
// Load content.
get_file_browser ( sw );
}
return TRUE;
}
static unsigned int file_browser_mode_get_num_entries ( const Mode *sw )
{
const FileBrowserModePrivateData *pd = (const FileBrowserModePrivateData *) mode_get_private_data ( sw );
return pd->array_length;
}
static ModeMode file_browser_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line )
{
ModeMode retv = MODE_EXIT;
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
if ( mretv & MENU_NEXT ) {
retv = NEXT_DIALOG;
} else if ( mretv & MENU_PREVIOUS ) {
retv = PREVIOUS_DIALOG;
} else if ( mretv & MENU_QUICK_SWITCH ) {
retv = ( mretv & MENU_LOWER_MASK );
} else if ( ( mretv & MENU_OK ) ) {
retv = RELOAD_DIALOG;
} else if ( ( mretv & MENU_ENTRY_DELETE ) == MENU_ENTRY_DELETE ) {
retv = RELOAD_DIALOG;
}
return retv;
}
static void file_browser_mode_destroy ( Mode *sw )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
if ( pd != NULL ) {
g_free ( pd );
mode_set_private_data ( sw, NULL );
}
}
static char *_get_display_value ( const Mode *sw, unsigned int selected_line, G_GNUC_UNUSED int *state, G_GNUC_UNUSED GList **attr_list, int get_entry )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
// Only return the string if requested, otherwise only set state.
return get_entry ? g_strdup("n/a"): NULL;
}
static int file_browser_token_match ( const Mode *sw, GRegex **tokens, unsigned int index )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
// Call default matching function.
return helper_token_match ( tokens, pd->array[index]);
}
Mode mode =
{
.abi_version = ABI_VERSION,
.name = "file_browser",
.cfg_name_key = "display-file_browser",
._init = file_browser_mode_init,
._get_num_entries = file_browser_mode_get_num_entries,
._result = file_browser_mode_result,
._destroy = file_browser_mode_destroy,
._token_match = file_browser_token_match,
._get_display_value = _get_display_value,
._get_message = NULL,
._get_completion = NULL,
._preprocess_input = NULL,
.private_data = NULL,
.free = NULL,
};
```
If we now rebuild the plugin, we need to run the following command:
```bash
rofi -show file_browser -modi file_browser
```
### The mode description
The mode is defined by the `Mode` structure, every mode in rofi has one of the
plugins.
```c
Mode mode =
{
.abi_version = ABI_VERSION,
.name = "file_browser",
.cfg_name_key = "display-file_browser",
._init = file_browser_mode_init,
._get_num_entries = file_browser_mode_get_num_entries,
._result = file_browser_mode_result,
._destroy = file_browser_mode_destroy,
._token_match = file_browser_token_match,
._get_display_value = _get_display_value,
._get_message = NULL,
._get_completion = NULL,
._preprocess_input = NULL,
.private_data = NULL,
.free = NULL,
};
```
The ABI_VERSION is defined in **rofi** header file, so that **rofi** can detect what
ABI the plugin was compiled against.
Not every function needs to be implemented, in the plugin we show the minimum
set.
Lets modify each of the above functions to implement something useful.
### FileBrowserModePrivateData
This is a structure that holds all the private data of this mode.
We are going to extend this so it can hold the state of information we want to
view.
We want to differentiate between 3 different rows:
* Go one level up
* Directory
* Regular file
So we add an enum:
```c
enum FBFileType {
UP,
DIRECTORY,
RFILE,
};
```
We need a structure that hold each entry.
* It should have a **name** we are going to show the user. This will hold an
`utf-8` string. (rofi will only display utf-8).
* It should hold the **path** to the entry. This will be in the file-systems
encoding.
* The type it holds.
```c
typedef struct {
char *name;
char *path;
enum FBFileType type;
} FBFile;
```
Then in the *private* data we hold all the relevant information.
* The current directory to show.
* Array of all the *FBFile* we want to show.
* The length of the array.
```c
typedef struct
{
GFile *current_dir;
FBFile *array;
unsigned int array_length;
} FileBrowserModePrivateData;
```
### Initialization
Now that we have the data structure to hold our information, we need to
initialize it and fill it.
```c
static int file_browser_mode_init ( Mode *sw )
{
if ( mode_get_private_data ( sw ) == NULL ) {
FileBrowserModePrivateData *pd = g_malloc0 ( sizeof ( *pd ) );
mode_set_private_data ( sw, (void *) pd );
pd->current_dir = g_file_new_for_path(g_get_home_dir () );
get_file_browser ( sw );
}
return TRUE;
}
```
The function first checked if we already initialized the private data. You can
include a mode multiple times, and we normally don't want it initialized
multiple times.
We then create a, zero initialized, `FileBrowserModePrivateData` structure and
set this on the mode. Set the current directory to the users home directory and
call `get_file_browser` that will load in the entries. We will discuss this one
later.
### Destroying
On shutdown we want to cleanup, so there is also a destroy function.
```c
static void file_browser_mode_destroy ( Mode *sw )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
if ( pd != NULL ) {
g_object_unref ( pd->current_dir );
free_list ( pd );
g_free ( pd );
mode_set_private_data ( sw, NULL );
}
}
```
This does the exact opposite.
For completeness:
```c
static void free_list ( FileBrowserModePrivateData *pd )
{
for ( unsigned int i = 0; i < pd->array_length; i++ ) {
FBFile *fb = & ( pd->array[i] );
g_free ( fb->name );
g_free ( fb->path );
}
g_free (pd->array);
pd->array = NULL;
pd->array_length = 0;
}
```
### Loading the entries
Lets dive deeper into the `get_file_browser` function.
```c
static void get_file_browser ( Mode *sw )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
```
We want to get access to the private data structure.
```c
char *cdir = g_file_get_path ( pd->current_dir );
DIR *dir = opendir ( cdir );
if ( dir ) {
struct dirent *rd = NULL;
while ((rd = readdir (dir)) != NULL )
{
```
We open the directory and we iterate over each entry. We then want to skip over
hidden files (starting with a .) and insert a special up node for going up one
directory. For this we do not need a path, and we show ".." to the user.
```c
if ( g_strcmp0 ( rd->d_name, ".." ) == 0 ){
pd->array = g_realloc ( pd->array, (pd->array_length+1)*sizeof(FBFile));
pd->array[pd->array_length].name = g_strdup ( ".." );
pd->array[pd->array_length].path = NULL;
pd->array[pd->array_length].type = UP;
pd->array_length++;
continue;
} else if ( rd->d_name[0] == '.' ) {
continue;
}
```
We do a similar filtering act for the rest of the files, we skip `fifo`, `blk`,`character` and `socket` files.
```c
switch ( rd->d_type )
{
case DT_BLK:
case DT_CHR:
case DT_FIFO:
case DT_UNKNOWN:
case DT_SOCK:
break;
case DT_REG:
case DT_DIR:
pd->array = g_realloc ( pd->array, (pd->array_length+1)*sizeof(FBFile));
pd->array[pd->array_length].name = g_strdup ( rd->d_name );
pd->array[pd->array_length].path = g_build_filename ( pd->current_dir, rd->d_name, NULL );
pd->array[pd->array_length].type = (rd->d_type == DT_DIR)? DIRECTORY: RFILE;
pd->array_length++;
}
}
closedir ( dir );
}
```
We then sort the list in a way the user expects this.
```c
g_qsort_with_data ( pd->array, pd->array_length, sizeof (FBFile ), compare, NULL );
}
```
Qsort here uses the following sort function:
```c
static gint compare ( gconstpointer a, gconstpointer b, gpointer data )
{
FBFile *fa = (FBFile*)a;
FBFile *fb = (FBFile*)b;
if ( fa->type != fb->type ){
return (fa->type - fb->type);
}
return g_strcmp0 ( fa->name, fb->name );
}
```
## Showing the entries
When showing each entry, rofi calls the `_get_display_value` function. It calls
them in two situations, to get the state and the display string. Or just to get
the new state. If you need to return a string (should always be malloced), the
`get_entry` parameter is set to 1.
We currently show the name, and prepend an icon using the Awesome Font.
```c
static char *_get_display_value ( const Mode *sw, unsigned int selected_line, G_GNUC_UNUSED int *state, G_GNUC_UNUSED GList **attr_list, int get_entry )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
// Only return the string if requested, otherwise only set state.
if ( !get_entry ) return NULL;
if ( pd->array[selected_line].type == DIRECTORY ){
return g_strdup_printf ( " %s", pd->array[selected_line].name);
} else if ( pd->array[selected_line].type == UP ){
return g_strdup( " ..");
} else {
return g_strdup_printf ( " %s", pd->array[selected_line].name);
}
return g_strdup("n/a");
}
```
The `selected_line` setting will always be within range 0 and the result of
`.get_num_entries`.
```c
static unsigned int file_browser_mode_get_num_entries ( const Mode *sw )
{
const FileBrowserModePrivateData *pd = (const FileBrowserModePrivateData *) mode_get_private_data ( sw );
return pd->array_length;
}
```
> The `attr_list` argument is there for more advanced markup of the string.
## Filtering the entries
When filtering we want to filter on the file name, we luckily store this entry
in `FBFile::name`.
To use **rofi**'s matching algorithm we can use the `helper_token_match` function.
```c
static int file_browser_token_match ( const Mode *sw, GRegex **tokens, unsigned int index )
{
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
// Call default matching function.
return helper_token_match ( tokens, pd->array[index].name);
}
```
The `index` setting will always be within range 0 and the result of
`.get_num_entries`.
## Running it
Now we should be able to build it, install it and run it and see the result.
```bash
rofi -show file_browser -modi file_browser
```
![rofi file browser](rofi-file-browser.png)
## Handling selected entries
This is just an example and can probably be implemented nicer.
Here it also shows some rudimentary parts in **rofi**, that show some of the
ugly details, that will be cleaned up in the future.
```c
static ModeMode file_browser_mode_result ( Mode *sw, int mretv, char **input, unsigned int selected_line )
{
ModeMode retv = MODE_EXIT;
FileBrowserModePrivateData *pd = (FileBrowserModePrivateData *) mode_get_private_data ( sw );
if ( mretv & MENU_NEXT ) {
retv = NEXT_DIALOG;
} else if ( mretv & MENU_PREVIOUS ) {
retv = PREVIOUS_DIALOG;
} else if ( mretv & MENU_QUICK_SWITCH ) {
retv = ( mretv & MENU_LOWER_MASK );
```
This is the user pressing `enter` on the entry. We handle it differently for
each type.
```c
} else if ( ( mretv & MENU_OK ) ) {
if ( selected_line < pd->array_length )
{
if ( pd->array[selected_line].type == UP ) {
GFile *new = g_file_get_parent ( pd->current_dir );
if ( new ){
g_object_unref ( pd->current_dir );
pd->current_dir = new;
free_list (pd);
get_file_browser ( sw );
return RESET_DIALOG;
}
} else if ( pd->array[selected_line].type == DIRECTORY ) {
GFile *new = g_file_new_for_path ( pd->array[selected_line].path );
g_object_unref ( pd->current_dir );
pd->current_dir = new;
free_list (pd);
get_file_browser ( sw );
return RESET_DIALOG;
} else if ( pd->array[selected_line].type == RFILE ) {
char *d = g_strescape ( pd->array[selected_line].path,NULL );
char *cmd = g_strdup_printf("xdg-open '%s'", d );
g_free(d);
char *cdir = g_file_get_path ( pd->current_dir );
helper_execute_command ( cdir,cmd, FALSE );
g_free ( cdir );
g_free ( cmd );
return MODE_EXIT;
}
}
retv = RELOAD_DIALOG;
```
Handle custom entry that does not match an entry:
```c
} else if ( (mretv&MENU_CUSTOM_INPUT) && *input ) {
char *p = rofi_expand_path ( *input );
char *dir = g_filename_from_utf8 ( p, -1, NULL, NULL, NULL );
g_free (p);
if ( g_file_test ( dir, G_FILE_TEST_EXISTS ) )
{
if ( g_file_test ( dir, G_FILE_TEST_IS_DIR ) ){
g_object_unref ( pd->current_dir );
pd->current_dir = g_file_new_for_path ( dir );
g_free ( dir );
free_list (pd);
get_file_browser ( sw );
return RESET_DIALOG;
}
}
g_free ( dir );
retv = RELOAD_DIALOG;
```
We do not support `delete`, just reload.
```c
} else if ( ( mretv & MENU_ENTRY_DELETE ) == MENU_ENTRY_DELETE ) {
retv = RELOAD_DIALOG;
}
return retv;
}
```
The `RESET_DIALOG` will clear the input bar and reload the view, `RELOAD_DIALOG`
will reload the view and re-filter based on the current text.
> Note: `rofi_expand_path` will expand `~` and `~me/` into it full absolute path.
> Note: `helper_execute_command` will spawn command.

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 523 KiB

After

Width:  |  Height:  |  Size: 523 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

Before

Width:  |  Height:  |  Size: 764 KiB

After

Width:  |  Height:  |  Size: 764 KiB

View file

Before

Width:  |  Height:  |  Size: 137 KiB

After

Width:  |  Height:  |  Size: 137 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
mkdocs/docs/images/rofi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

35
mkdocs/docs/index.md Normal file
View file

@ -0,0 +1,35 @@
# Welcome to Rofi Documentation
This website holds the web-version of the manpages for rofi and several guides
that have been published over the past years.
The manpages are grouped on rofi version.
![rofi](images/rofi.png)
* [Installation](INSTALL.md)
* [Themes](themes/themes.md)
## Development version
* [Rofi manpage](current/rofi.1.markdown)
* [Themes](current/rofi-theme.5.markdown)
* [Dmenu](current/rofi-dmenu.5.markdown)
* [Script](current/rofi-script.5.markdown)
* [Debugging](current/rofi-debugging.5.markdown)
* [Keys](current/rofi-keys.5.markdown)
## Stable
* [Rofi manpage](1.7.5/rofi.1.markdown)
* [Themes](1.7.5/rofi-theme.5.markdown)
* [Dmenu](1.7.5/rofi-dmenu.5.markdown)
* [Script](1.7.5/rofi-script.5.markdown)
* [Debugging](1.7.5/rofi-debugging.5.markdown)
* [Keys](1.7.5/rofi-keys.5.markdown)
## Guides
* [Transparency](guides/Transparency/theme3-transparency)
* [Positioning](guides/Positioning/theme3-positioning)
* [Plugins](guides/Plugins/2017-04-19-rofi-140-sneak-preview-plugins.md)

BIN
mkdocs/docs/themes/Adapta-Nokto.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/Arc-Dark.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
mkdocs/docs/themes/Arc.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/DarkBlue.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
mkdocs/docs/themes/Indego.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/Monokai.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
mkdocs/docs/themes/Paper.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/arthur.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
mkdocs/docs/themes/blue.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
mkdocs/docs/themes/c64.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

51
mkdocs/docs/themes/capture.sh vendored Executable file
View file

@ -0,0 +1,51 @@
#!/usr/bin/env bash
THEMES=../../../themes/*.rasi
ROFI_BIN=../../../build/rofi
function generate_options()
{
echo -en "rofi\0icon\x1frofi\n"
echo -en "help browser\0icon\x1fhelp-browser\n"
echo -en "thunderbird\0icon\x1fthunderbird\n"
echo -en "Urgent\0icon\x1femblem-urgent\n"
echo -en "Active\0icon\x1fface-wink\n"
echo -en "folder\0icon\x1ffolder\n"
echo -en "Icon font 🐢 🥳\n"
echo -en "Font icon\0icon\x1f<span size='x-large' color='red'>:-)</span>\n"
echo -en "Quit\0icon\x1fapplication-exit\n"
}
function run_theme
{
theme=$1
BASE=$(basename ${theme})
NAME=${BASE%.rasi}
export ROFI_PNG_OUTPUT="${NAME}.png"
echo "# ${NAME}" >> themes.md
echo "" >> themes.md
generate_options | ${ROFI_BIN} -theme-str "@theme \"${theme}\"" \
-no-config -dmenu -p "mode" -show-icons \
-u 3 -a 4 -mesg "Message box for extra information" \
-take-screenshot-quit 1500
echo "![${NAME}](${NAME}.png)" >> themes.md
echo "" >> themes.md
}
echo "# Included Themes" > themes.md
echo "Below is a list of themes shipped with rofi." >> themes.md
echo "Use \`rofi-theme-selector\` to select and use one of these themes." >> themes.md
Xvfb :1234 -screen 0 1920x1080x24 &
XEPHYR_PID=$!
export DISPLAY=:1234
run_theme "default"
for theme in ${THEMES}
do
run_theme ${theme}
done
kill ${XEPHYR_PID}

BIN
mkdocs/docs/themes/default.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
mkdocs/docs/themes/dmenu.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
mkdocs/docs/themes/docu.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
mkdocs/docs/themes/fancy.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
mkdocs/docs/themes/glue_pro_blue.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
mkdocs/docs/themes/gruvbox-dark-hard.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/gruvbox-dark-soft.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
mkdocs/docs/themes/gruvbox-dark.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
mkdocs/docs/themes/gruvbox-light.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
mkdocs/docs/themes/iggy.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

BIN
mkdocs/docs/themes/lb.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
mkdocs/docs/themes/paper-float.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
mkdocs/docs/themes/purple.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
mkdocs/docs/themes/sidebar-v2.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
mkdocs/docs/themes/sidebar.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
mkdocs/docs/themes/solarized.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

123
mkdocs/docs/themes/themes.md vendored Normal file
View file

@ -0,0 +1,123 @@
# Included Themes
Below is a list of themes shipped with rofi.
Use `rofi-theme-selector` to select and use one of these themes.
# default
![default](default.png)
# Adapta-Nokto
![Adapta-Nokto](Adapta-Nokto.png)
# android_notification
![android_notification](android_notification.png)
# Arc-Dark
![Arc-Dark](Arc-Dark.png)
# Arc
![Arc](Arc.png)
# arthur
![arthur](arthur.png)
# blue
![blue](blue.png)
# c64
![c64](c64.png)
# DarkBlue
![DarkBlue](DarkBlue.png)
# dmenu
![dmenu](dmenu.png)
# docu
![docu](docu.png)
# fancy
![fancy](fancy.png)
# glue_pro_blue
![glue_pro_blue](glue_pro_blue.png)
# gruvbox-dark-hard
![gruvbox-dark-hard](gruvbox-dark-hard.png)
# gruvbox-dark
![gruvbox-dark](gruvbox-dark.png)
# gruvbox-dark-soft
![gruvbox-dark-soft](gruvbox-dark-soft.png)
# gruvbox-light-hard
![gruvbox-light-hard](gruvbox-light-hard.png)
# gruvbox-light
![gruvbox-light](gruvbox-light.png)
# gruvbox-light-soft
![gruvbox-light-soft](gruvbox-light-soft.png)
# iggy
![iggy](iggy.png)
# Indego
![Indego](Indego.png)
# lb
![lb](lb.png)
# Monokai
![Monokai](Monokai.png)
# paper-float
![paper-float](paper-float.png)
# Paper
![Paper](Paper.png)
# purple
![purple](purple.png)
# sidebar
![sidebar](sidebar.png)
# sidebar-v2
![sidebar-v2](sidebar-v2.png)
# solarized_alternate
![solarized_alternate](solarized_alternate.png)
# solarized
![solarized](solarized.png)

59
mkdocs/mkdocs.yml Normal file
View file

@ -0,0 +1,59 @@
site_name: Rofi Documentation
repo_url: https://github.com/davatorium/rofi/
edit_uri: mkdocs/docs/
theme: readthedocs
nav:
- License: COPYING.md
- Issue Tracker: https://github.com/davatorium/rofi/issues
- Discussions Forum: https://github.com/davatorium/rofi/discussions
- Installation: INSTALL.md
- Configuration: CONFIG.md
- Themes: themes/themes.md
- Guides:
- Transparency: guides/Transparency/theme3-transparency.markdown
- Positioning: guides/Positioning/theme3-positioning.markdown
- Plugins: guides/Plugins/2017-04-19-rofi-140-sneak-preview-plugins.md
- Current:
- Rofi: current/rofi.1.markdown
- Themes: current/rofi-theme.5.markdown
- Dmenu: current/rofi-dmenu.5.markdown
- Script: current/rofi-script.5.markdown
- Debugging: current/rofi-debugging.5.markdown
- Keys: current/rofi-keys.5.markdown
- 1.7.5:
- Rofi: 1.7.5/rofi.1.markdown
- Themes: 1.7.5/rofi-theme.5.markdown
- Dmenu: 1.7.5/rofi-dmenu.5.markdown
- Script: 1.7.5/rofi-script.5.markdown
- Debugging: 1.7.5/rofi-debugging.5.markdown
- Keys: 1.7.5/rofi-keys.5.markdown
- 1.7.4:
- Rofi: 1.7.4/rofi.1.markdown
- Themes: 1.7.4/rofi-theme.5.markdown
- Dmenu: 1.7.4/rofi-dmenu.5.markdown
- Script: 1.7.4/rofi-script.5.markdown
- Debugging: 1.7.4/rofi-debugging.5.markdown
- Keys: 1.7.4/rofi-keys.5.markdown
- 1.7.3:
- Rofi: 1.7.3/rofi.1.markdown
- Themes: 1.7.3/rofi-theme.5.markdown
- Dmenu: 1.7.3/rofi-dmenu.5.markdown
- Script: 1.7.3/rofi-script.5.markdown
- Debugging: 1.7.3/rofi-debugging.5.markdown
- Keys: 1.7.3/rofi-keys.5.markdown
- 1.7.2:
- Rofi: 1.7.2/rofi.1.markdown
- Themes: 1.7.2/rofi-theme.5.markdown
- Script: 1.7.2/rofi-script.5.markdown
- 1.7.1:
- Rofi: 1.7.1/rofi.1.markdown
- Themes: 1.7.1/rofi-theme.5.markdown
- Script: 1.7.1/rofi-script.5.markdown
- 1.7.0:
- Rofi: 1.7.0/rofi.1.markdown
- Themes: 1.7.0/rofi-theme.5.markdown
- Script: 1.7.0/rofi-script.5.markdown
plugins:
- search:
indexing: full