From 9482f3c50807e5c2d853bb6ab76bb7b65eac20d4 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 27 Mar 2023 00:09:25 +0200 Subject: [PATCH] [DOC] Add some remark markdown fixes. --- CONFIG.md | 89 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 40 deletions(-) diff --git a/CONFIG.md b/CONFIG.md index 76a62d06..44cf8f00 100644 --- a/CONFIG.md +++ b/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.
- -# 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`). -# 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 configuration { @@ -20,9 +22,10 @@ configuration { ``` 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 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 ``` -# 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. - * Anything after `// ` and before a newline is considered a comment. - * Everything between `/*` and `*/` is a comment. + - Anything after `// ` and before a newline is considered a comment. + - Everything between `/*` and `*/` is a comment. Comments can be nested and the C comments can be inline. The following is valid: -``` +```css // Magic comment. property: /* comment */ value; ``` However, this is not: -``` +```css prop/*comment*/erty: value; ``` -## White space +### White space White space and newlines, like comments, are ignored by the parser. This: -``` +```css property: name; ``` Is identical to: -``` +```css property : name ; ``` -## Data types +### Data types **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: @@ -116,17 +121,17 @@ For example: ml-row-down: "ScrollDown"; ``` -### Number +#### Number An integer may contain any full number. For example: -``` +```css eh: 2; ``` -### Boolean +#### Boolean Boolean value is either `true` or `false`. This is case-sensitive. @@ -136,23 +141,25 @@ For example: 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. -It supports escaping. +Character value is always surrounded by single quotes (') and should contain a +single character. It supports escaping. ```css 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. -The entry in the list single ASCII words. +A list starts with a '[' and ends with a ']'. The entries in the list are +comma-separated. The entry in the list single ASCII words. ```css combi-modes: [window,drun]; @@ -163,21 +170,23 @@ For older versions you have : 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: 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 configuration {