mirror of
https://github.com/lbonn/rofi
synced 2024-11-22 20:03:03 +00:00
[DOC] Add some remark markdown fixes.
This commit is contained in:
parent
c1f63350f4
commit
9482f3c508
1 changed files with 49 additions and 40 deletions
89
CONFIG.md
89
CONFIG.md
|
@ -1,17 +1,19 @@
|
||||||
> 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 />
|
<br />
|
||||||
|
|
||||||
|
## Where does the configuration live
|
||||||
|
|
||||||
# Where does the configuration live
|
Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on
|
||||||
|
most systems this is `~/.config/rofi/`.
|
||||||
Rofi's configurations, custom themes live in `${XDG_CONFIG_HOME}/rofi/`, on most systems this is `~/.config/rofi/`.
|
|
||||||
|
|
||||||
The name of the main configuration file is `config.rasi`. (`~/.config/rofi/config.rasi`).
|
The name of the main configuration file is `config.rasi`. (`~/.config/rofi/config.rasi`).
|
||||||
|
|
||||||
# Create an empty configuration file
|
## Create an empty configuration file
|
||||||
|
|
||||||
Open `~/.config/rofi/config.rasi` in your favorite text editor and add the following block:
|
Open `~/.config/rofi/config.rasi` in your favorite text editor and add the
|
||||||
|
following block:
|
||||||
|
|
||||||
```css
|
```css
|
||||||
configuration {
|
configuration {
|
||||||
|
@ -20,9 +22,10 @@ configuration {
|
||||||
```
|
```
|
||||||
You can now set the options in the `configuration` block.
|
You can now set the options in the `configuration` block.
|
||||||
|
|
||||||
# Create a configuration file from current setup
|
## Create a configuration file from current setup
|
||||||
|
|
||||||
If you do not want to start from scratch, or want to migrate from older configuration format, you can get tell rofi to dumps it configuration:
|
If you do not want to start from scratch, or want to migrate from older
|
||||||
|
configuration format, you can get tell rofi to dumps it configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rofi -dump-config > ~/.config/rofi/config.rasi
|
rofi -dump-config > ~/.config/rofi/config.rasi
|
||||||
|
@ -54,60 +57,62 @@ To create a copy of the current theme, you can run:
|
||||||
rofi -dump-theme > ~/.config/rofi/current.rasi
|
rofi -dump-theme > ~/.config/rofi/current.rasi
|
||||||
```
|
```
|
||||||
|
|
||||||
# Configuration file format
|
## Configuration file format
|
||||||
|
|
||||||
## Encoding
|
### Encoding
|
||||||
|
|
||||||
The encoding of the file is utf-8. Both Unix (`\n`) and windows (`\r\n`) newlines format are supported. But Unix is preferred.
|
The encoding of the file is utf-8. Both Unix (`\n`) and windows (`\r\n`)
|
||||||
|
newlines format are supported. But Unix is preferred.
|
||||||
|
|
||||||
## Comments
|
### Comments
|
||||||
|
|
||||||
C and C++ file comments are supported.
|
C and C++ file comments are supported.
|
||||||
|
|
||||||
* Anything after `// ` and before a newline is considered a comment.
|
- Anything after `// ` and before a newline is considered a comment.
|
||||||
* Everything between `/*` and `*/` is a comment.
|
- Everything between `/*` and `*/` is a comment.
|
||||||
|
|
||||||
Comments can be nested and the C comments can be inline.
|
Comments can be nested and the C comments can be inline.
|
||||||
|
|
||||||
The following is valid:
|
The following is valid:
|
||||||
|
|
||||||
```
|
```css
|
||||||
// Magic comment.
|
// Magic comment.
|
||||||
property: /* comment */ value;
|
property: /* comment */ value;
|
||||||
```
|
```
|
||||||
|
|
||||||
However, this is not:
|
However, this is not:
|
||||||
|
|
||||||
```
|
```css
|
||||||
prop/*comment*/erty: value;
|
prop/*comment*/erty: value;
|
||||||
```
|
```
|
||||||
|
|
||||||
## White space
|
### White space
|
||||||
|
|
||||||
White space and newlines, like comments, are ignored by the parser.
|
White space and newlines, like comments, are ignored by the parser.
|
||||||
|
|
||||||
This:
|
This:
|
||||||
|
|
||||||
```
|
```css
|
||||||
property: name;
|
property: name;
|
||||||
```
|
```
|
||||||
|
|
||||||
Is identical to:
|
Is identical to:
|
||||||
|
|
||||||
```
|
```css
|
||||||
property :
|
property :
|
||||||
name
|
name
|
||||||
|
|
||||||
;
|
;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Data types
|
### Data types
|
||||||
|
|
||||||
**ROFI**'s configuration supports several data formats:
|
**ROFI**'s configuration supports several data formats:
|
||||||
|
|
||||||
### String
|
#### String
|
||||||
|
|
||||||
A string is always surrounded by double quotes (`"`). Between the quotes there can be any printable character.
|
A string is always surrounded by double quotes (`"`). Between the quotes there
|
||||||
|
can be any printable character.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -116,17 +121,17 @@ For example:
|
||||||
ml-row-down: "ScrollDown";
|
ml-row-down: "ScrollDown";
|
||||||
```
|
```
|
||||||
|
|
||||||
### Number
|
#### Number
|
||||||
|
|
||||||
An integer may contain any full number.
|
An integer may contain any full number.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```css
|
||||||
eh: 2;
|
eh: 2;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Boolean
|
#### Boolean
|
||||||
|
|
||||||
Boolean value is either `true` or `false`. This is case-sensitive.
|
Boolean value is either `true` or `false`. This is case-sensitive.
|
||||||
|
|
||||||
|
@ -136,23 +141,25 @@ For example:
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
```
|
```
|
||||||
|
|
||||||
This is equal to the `-show-icons` option on the commandline, and `show-icons: false;` is equal to `-no-show-icons`.
|
This is equal to the `-show-icons` option on the commandline, and `show-icons:
|
||||||
|
false;` is equal to `-no-show-icons`.
|
||||||
|
|
||||||
### Character
|
#### Character
|
||||||
|
|
||||||
Character value is always surrounded by single quotes (') and should contain a single character.
|
Character value is always surrounded by single quotes (') and should contain a
|
||||||
It supports escaping.
|
single character. It supports escaping.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
matching-negate-char: '-';
|
matching-negate-char: '-';
|
||||||
```
|
```
|
||||||
|
|
||||||
### List
|
#### List
|
||||||
|
|
||||||
This is not supported by the old configuration system, but can be used in the **rasi** format.
|
This is not supported by the old configuration system, but can be used in the
|
||||||
|
**rasi** format.
|
||||||
|
|
||||||
A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated.
|
A list starts with a '[' and ends with a ']'. The entries in the list are
|
||||||
The entry in the list single ASCII words.
|
comma-separated. The entry in the list single ASCII words.
|
||||||
|
|
||||||
```css
|
```css
|
||||||
combi-modes: [window,drun];
|
combi-modes: [window,drun];
|
||||||
|
@ -163,21 +170,23 @@ For older versions you have :
|
||||||
combi-modes: "window,drun";
|
combi-modes: "window,drun";
|
||||||
```
|
```
|
||||||
|
|
||||||
# Get a list of all possible options
|
## Get a list of all possible options
|
||||||
|
|
||||||
There are 2 ways to get a list of all options:
|
There are 2 ways to get a list of all options:
|
||||||
|
|
||||||
1. Dump the configuration file explained above. (`rofi -dump-config`)
|
1. Dump the configuration file explained above. (`rofi -dump-config`)
|
||||||
2. Look at output of `rofi -h`.
|
1. Look at output of `rofi -h`.
|
||||||
|
|
||||||
To see what values an option support check the manpage, it describes most of them.
|
To see what values an option support check the manpage, it describes most of
|
||||||
|
them.
|
||||||
|
|
||||||
NOTE: not all options might be in the manpage, as options can be added at run-time. (f.e. by plugins).
|
NOTE: not all options might be in the manpage, as options can be added at
|
||||||
|
run-time. (f.e. by plugins).
|
||||||
|
|
||||||
|
## Splitting configuration over multiple files
|
||||||
|
|
||||||
# Splitting configuration over multiple files
|
It is possible to split configuration over multiple files using imports. For
|
||||||
|
example in `~/.config/rofi/config.rasi`
|
||||||
It is possible to split configuration over multiple files using imports. For example in `~/.config/rofi/config.rasi`
|
|
||||||
|
|
||||||
```css
|
```css
|
||||||
configuration {
|
configuration {
|
||||||
|
|
Loading…
Reference in a new issue