From 0133697fd2c3c5ca77c7a32f0b30ae750949a027 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Mon, 27 Mar 2023 18:45:44 +0200 Subject: [PATCH] [Doc] Update theme manpage with remark-lint hints. --- doc/rofi-debugging.5 | 42 +- doc/rofi-debugging.5.markdown | 91 +-- doc/rofi-dmenu.5 | 66 +- doc/rofi-dmenu.5.markdown | 120 ++-- doc/rofi-theme-selector.1 | 13 +- doc/rofi-theme-selector.1.markdown | 20 +- doc/rofi-theme.5 | 468 ++++++++------ doc/rofi-theme.5.markdown | 976 ++++++++++++++++------------- 8 files changed, 1014 insertions(+), 782 deletions(-) diff --git a/doc/rofi-debugging.5 b/doc/rofi-debugging.5 index dc0eb01b..73a934b9 100644 --- a/doc/rofi-debugging.5 +++ b/doc/rofi-debugging.5 @@ -5,14 +5,15 @@ Debugging rofi. .PP -When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test -to help pin-point the problem. +When reporting an issue with rofi crashing, or misbehaving. It helps to do some +small test to help pin-point the problem. .PP First try disabling your custom configuration: \fB\fC-no-config\fR .PP -This disables the parsing of the configuration files. This runs rofi in \fIstock\fP mode. +This disables the parsing of the configuration files. This runs rofi in \fIstock\fP +mode. .PP If you run custom C plugins, you can disable the plugins using: \fB\fC-no-plugins\fR @@ -33,8 +34,8 @@ rofi -dump-theme .RE .PP -\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact version, monitor layout -and more useful information. +\fB\fCrofi -help\fR provides us with the configuration files parsed, the exact +version, monitor layout and more useful information. .PP The \fB\fCrofi -dump-config\fR and \fB\fCrofi -dump-theme\fR output gives us \fB\fCrofi\fR @@ -57,8 +58,8 @@ G_MESSAGES_DEBUG=Timings rofi -show drun .RE .PP -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. +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. .PP Example trace: @@ -123,9 +124,11 @@ Example trace: .SH Debug domains .PP -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: +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: .RS .IP \(bu 2 @@ -173,7 +176,8 @@ Helpers.IconFetcher: Information about icon lookup. For full list see \fB\fCman rofi\fR\&. .PP -Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output from the Desktop file run dialog. +Example: \fB\fCG_MESSAGES_DEBUG=Dialogs.DRun rofi -show drun\fR To get specific output +from the Desktop file run dialog. .PP To redirect the debug output to a file (\fB\fC~/rofi.log\fR) add: @@ -191,7 +195,7 @@ 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. -.SH Creating a backtrace. +.SH Creating a backtrace .PP First make sure you compile \fBrofi\fP with debug symbols: @@ -205,10 +209,10 @@ make CFLAGS="-O0 -g3" clean rofi .RE .PP -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. +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. .PP .RS @@ -235,11 +239,13 @@ thread apply all bt The output trace is useful when reporting crashes. .PP -Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a backtrace via \fB\fCcoredumpctl\fR\&. +Some distribution have \fB\fCsystemd-coredump\fR, this way you can easily get a +backtrace via \fB\fCcoredumpctl\fR\&. .SH SEE ALSO .PP -\fBrofi-sensible-terminal(1)\fP, \fBdmenu(1)\fP, \fBrofi-debugging(5)\fP, \fBrofi-theme(5)\fP, \fBrofi-script(5)\fP, \fBrofi-keys(5)\fP,\fBrofi-theme-selector(1)\fP +rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5), +rofi-script(5), rofi-keys(5),rofi-theme-selector(1) .SH AUTHOR .RS diff --git a/doc/rofi-debugging.5.markdown b/doc/rofi-debugging.5.markdown index 643c68b1..229fe773 100644 --- a/doc/rofi-debugging.5.markdown +++ b/doc/rofi-debugging.5.markdown @@ -4,16 +4,16 @@ Debugging rofi. -When reporting an issue with rofi crashing, or misbehaving. It helps to do some small test -to help pin-point the problem. +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. +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: @@ -24,15 +24,14 @@ rofi -dump-config rofi -dump-theme ``` -`rofi -help` provides us with the configuration files parsed, the exact version, monitor layout -and more useful information. +`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. @@ -40,13 +39,12 @@ 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. +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: -``` +```text (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 @@ -99,48 +97,49 @@ Example trace: (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: +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. +- 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. +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: -``` +```bash 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. +## Creating a backtrace First make sure you compile **rofi** with debug symbols: @@ -148,10 +147,10 @@ First make sure you compile **rofi** with debug symbols: 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. +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 @@ -159,17 +158,19 @@ gdb rofi core Then type inside gdb: -``` +```bash 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`. +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)** +rofi-sensible-terminal(1), dmenu(1), rofi-debugging(5), rofi-theme(5), +rofi-script(5), rofi-keys(5),rofi-theme-selector(1) ## AUTHOR diff --git a/doc/rofi-dmenu.5 b/doc/rofi-dmenu.5 index c11dc96c..21482ab7 100644 --- a/doc/rofi-dmenu.5 +++ b/doc/rofi-dmenu.5 @@ -14,22 +14,25 @@ The website for \fB\fCdmenu\fR can be found here \[la]http://tools.suckless.org/dmenu/\[ra]\&. .PP -\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too many flavors of \fB\fCdmenu\fR\&. -The idea is that the basic usage command-line flags are obeyed, theme-related flags are not. -Besides, \fBrofi\fP offers some extended features (like multi-select, highlighting, message bar, extra key bindings). +\fBrofi\fP does not aim to be 100% compatible with \fB\fCdmenu\fR\&. There are simply too +many flavors of \fB\fCdmenu\fR\&. The idea is that the basic usage command-line flags +are obeyed, theme-related flags are not. Besides, \fBrofi\fP offers some extended +features (like multi-select, highlighting, message bar, extra key bindings). .SH BASIC CONCEPT .PP -In \fB\fCdmenu\fR mode, \fBrofi\fP 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. +In \fB\fCdmenu\fR mode, \fBrofi\fP 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. .PP -By default separation of rows is done on new lines, making it easy to pipe the output a one application into -\fBrofi\fP and the output of rofi into the next. +By default separation of rows is done on new lines, making it easy to pipe the +output a one application into \fBrofi\fP and the output of rofi into the next. .SH USAGE .PP -By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation mode. +By launching \fBrofi\fP with the \fB\fC-dmenu\fR flag it will go into dmenu emulation +mode. .PP .RS @@ -43,7 +46,8 @@ ls | rofi -dmenu .SS DMENU DROP-IN REPLACEMENT .PP If \fB\fCargv[0]\fR (calling command) is dmenu, \fBrofi\fP will start in dmenu mode. -This way, it can be used as a drop-in replacement for dmenu. Just copy or symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. +This way, it can be used as a drop-in replacement for dmenu. Just copy or +symlink \fBrofi\fP to dmenu in \fB\fC$PATH\fR\&. .PP .RS @@ -57,18 +61,20 @@ ln -s /usr/bin/rofi /usr/bin/dmenu .SS DMENU VS SCRIPT MODE .PP Script mode is used to extend \fBrofi\fP, dmenu mode is used to extend a script. -The two do share much of the same input format. Please see the \fBrofi-script(5)\fP manpage for more information. +The two do share much of the same input format. Please see the +\fBrofi-script(5)\fP manpage for more information. .SS DMENU SPECIFIC COMMANDLINE FLAGS .PP -A lot of these options can also be modified by the script using special input. See the \fBrofi-script(5)\fP manpage -for more information about this syntax. +A lot of these options can also be modified by the script using special input. +See the \fBrofi-script(5)\fP manpage for more information about this syntax. .PP \fB\fC-sep\fR \fIseparator\fP .PP -Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a separator: +Separator for \fB\fCdmenu\fR\&. Example: To show a list of 'a' to 'e' with '|' as a +separator: .PP .RS @@ -83,7 +89,8 @@ echo "a|b|c|d|e" | rofi -sep '|' -dmenu \fB\fC-p\fR \fIprompt\fP .PP -Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', a,b,c,d, or e. +Specify the prompt to show in \fB\fCdmenu\fR mode. For example, select 'monkey', +a,b,c,d, or e. .PP .RS @@ -125,7 +132,10 @@ Makes \fB\fCdmenu\fR searches case-insensitive \fB\fC-a\fR \fIX\fP .PP -Active row, mark \fIX\fP as active. Where \fIX\fP is a comma-separated list of python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the last row with -2 preceding it, ranges are left-open and right-close, and so on. You can specify: +Active row, mark \fIX\fP as active. Where \fIX\fP is a comma-separated list of +python(1)-style indices and ranges, e.g. indices start at 0, -1 refers to the +last row with -2 preceding it, ranges are left-open and right-close, and so on. +You can specify: .RS .IP \(bu 2 @@ -166,7 +176,8 @@ This mode returns directly when no entries given. \fB\fC-format\fR \fIformat\fP .PP -Allows the output of dmenu to be customized (N is the total number of input entries): +Allows the output of dmenu to be customized (N is the total number of input +entries): .RS .IP \(bu 2 @@ -199,8 +210,9 @@ Select first line that matches the given string \fB\fC-mesg\fR \fIstring\fP .PP -Add a message line below the filter entry box. Supports Pango markup. -For more information on supported markup, see here +Add a message line below the filter entry box. Supports Pango markup. For more +information on supported markup, see +here \[la]https://docs.gtk.org/Pango/pango_markup.html\[ra] .PP @@ -229,22 +241,26 @@ Hide the input text. This should not be considered secure! .PP Tell \fBrofi\fP that DMenu input is Pango markup encoded, and should be rendered. See here -\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] for details about Pango markup. +\[la]https://developer.gnome.org/pygtk/stable/pango-markup-language.html\[ra] +for details about Pango markup. .PP \fB\fC-multi-select\fR .PP -Allow multiple lines to be selected. Adds a small selection indicator to the left of each entry. +Allow multiple lines to be selected. Adds a small selection indicator to the +left of each entry. .PP \fB\fC-sync\fR .PP -Force \fBrofi\fP mode to first read all data from stdin before showing the selection window. This is original dmenu behavior. +Force \fBrofi\fP mode to first read all data from stdin before showing the +selection window. This is original dmenu behavior. .PP -Note: the default asynchronous mode will also be automatically disabled if used with conflicting options, +Note: the default asynchronous mode will also be automatically disabled if used +with conflicting options, such as \fB\fC-dump\fR, \fB\fC-only-match\fR or \fB\fC-auto-select\fR\&. .PP @@ -309,7 +325,8 @@ Set ellipsize mode on the listview. .SH PARSING ROW OPTIONS .PP -Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP manpage for details; the syntax and supported features are identical. +Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP +manpage for details; the syntax and supported features are identical. .SH RETURN VALUE .RS @@ -324,7 +341,8 @@ Extra options for individual rows can be also set. See the \fBrofi-script(5)\fP .SH SEE ALSO .PP -rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), rofi-theme-selector(1), ascii(7) +rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), +rofi-theme-selector(1), ascii(7) .SH AUTHOR .PP diff --git a/doc/rofi-dmenu.5.markdown b/doc/rofi-dmenu.5.markdown index ff2f0203..b1dd8ab3 100644 --- a/doc/rofi-dmenu.5.markdown +++ b/doc/rofi-dmenu.5.markdown @@ -4,7 +4,6 @@ **rofi dmenu mode** - Rofi dmenu emulation - ## DESCRIPTION To integrate **rofi** into scripts as simple selection dialogs, @@ -12,58 +11,67 @@ To integrate **rofi** into scripts as simple selection dialogs, 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). - +**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. +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. +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. +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 +This way, it can be used as a drop-in replacement for dmenu. Just copy or +symlink **rofi** to dmenu in `$PATH`. +```bash +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. - +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. +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: +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 +```bash +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. +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" +```bash +echo "a|b|c|d|e" | rofi -sep '|' -dmenu -p "monkey" +``` Default: *dmenu* @@ -71,7 +79,9 @@ Default: *dmenu* Maximum number of lines the menu may show before scrolling. - rofi -dmenu -l 25 +```bash +rofi -dmenu -l 25 +``` Default: *15* @@ -81,13 +91,16 @@ 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: +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' +- 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* @@ -106,15 +119,16 @@ 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): +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) +- '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' @@ -124,8 +138,9 @@ 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) +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` @@ -144,18 +159,21 @@ 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. - +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. +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. +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, +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* @@ -200,18 +218,19 @@ Set ellipsize mode on the listview. ## 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. +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. - +- **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) +rofi(1), rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-script(5), +rofi-theme-selector(1), ascii(7) ## AUTHOR @@ -221,7 +240,6 @@ Rasmus Steinke Morgane Glidic - Original code based on work by: Sean Pringle For a full list of authors, check the AUTHORS file. diff --git a/doc/rofi-theme-selector.1 b/doc/rofi-theme-selector.1 index 96df43df..f0d31d6e 100644 --- a/doc/rofi-theme-selector.1 +++ b/doc/rofi-theme-selector.1 @@ -6,15 +6,15 @@ .SH DESCRIPTION .PP -\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for \fBrofi\fP\&. -It's part of any installation of \fBrofi\fP\&. +\fBrofi-theme-selector\fP is a bash/rofi script to preview and apply themes for +\fBrofi\fP\&. It's part of any installation of \fBrofi\fP\&. .SH USAGE .SS Running rofi-theme-selector .PP -\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP window. -It lets you preview each theme with the Enter key and apply the theme to your -\fBrofi\fP configuration file with Alt+a. +\fBrofi-theme-selector\fP shows a list of all available themes in a \fBrofi\fP +window. It lets you preview each theme with the Enter key and apply the theme +to your \fBrofi\fP configuration file with Alt+a. .SH Theme directories .PP @@ -31,7 +31,8 @@ $XDG_DATA_HOME/share/rofi/themes .RE .PP -${PREFIX} reflects the install location of rofi. In most cases this will be "/usr". +${PREFIX} reflects the install location of rofi. In most cases this will be +"/usr". $XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config". $XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share". diff --git a/doc/rofi-theme-selector.1.markdown b/doc/rofi-theme-selector.1.markdown index e5c401ce..f52f31c7 100644 --- a/doc/rofi-theme-selector.1.markdown +++ b/doc/rofi-theme-selector.1.markdown @@ -6,27 +6,27 @@ ## DESCRIPTION -**rofi-theme-selector** is a bash/rofi script to preview and apply themes for **rofi**. -It's part of any installation of **rofi**. +**rofi-theme-selector** is a bash/rofi script to preview and apply themes for +**rofi**. It's part of any installation of **rofi**. ## USAGE ### Running rofi-theme-selector -**rofi-theme-selector** shows a list of all available themes in a **rofi** window. -It lets you preview each theme with the Enter key and apply the theme to your -**rofi** configuration file with Alt+a. - +**rofi-theme-selector** shows a list of all available themes in a **rofi** +window. It lets you preview each theme with the Enter key and apply the theme +to your **rofi** configuration file with Alt+a. ## Theme directories **rofi-theme-selector** searches the following directories for themes: -* ${PREFIX}/share/rofi/themes -* $XDG_CONFIG_HOME/rofi/themes -* $XDG_DATA_HOME/share/rofi/themes +- ${PREFIX}/share/rofi/themes +- $XDG_CONFIG_HOME/rofi/themes +- $XDG_DATA_HOME/share/rofi/themes -${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".
+${PREFIX} reflects the install location of rofi. In most cases this will be +"/usr".
$XDG_CONFIG_HOME is normally unset. Default path is "$HOME/.config".
$XDG_DATA_HOME is normally unset. Default path is "$HOME/.local/share". diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5 index 306687bc..45fec34e 100644 --- a/doc/rofi-theme.5 +++ b/doc/rofi-theme.5 @@ -9,8 +9,7 @@ The easiest way to get started theming rofi is by modifying your existing theme. .PP -Themes can be modified/tweaked by adding theming elements to the end of the -.br +Themes can be modified/tweaked by adding theming elements to the end of the\\ config file. The default location of this file is \fB\fC~/.config/rofi/config.rasi\fR, if the file does not exists, you can create it. @@ -50,8 +49,8 @@ entry { .PP In the above section, \fB\fCentry\fR indicates the widget, \fB\fCplaceholder\fR is the -property we want to modify and we set it to the string \fB\fC"Type here"\fR\&. -To find the commonly available widgets in rofi, see the 'Basic structure' section. +property we want to modify and we set it to the string \fB\fC"Type here"\fR\&. To find +the commonly available widgets in rofi, see the 'Basic structure' section. .PP To change the mouse over cursor to a pointer, add: @@ -146,7 +145,8 @@ In this example we specify the size in the em \[la]https://www.w3.org/Style/LieBos3e/em\[ra] unit. .PP -Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement-text\fR widget to red and background to blue. +Now lets change the text color of both the \fB\fCentry\fR and the \fB\fCelement-text\fR +widget to red and background to blue. .PP .RS @@ -213,7 +213,8 @@ entry { .RE .PP -By default, the \fB\fCcursor-color\fR will be the same as the \fB\fCtext-color\fR\&. The \fB\fCcursor-width\fR will always default to 2 pixels. +By default, the \fB\fCcursor-color\fR will be the same as the \fB\fCtext-color\fR\&. The +\fB\fCcursor-width\fR will always default to 2 pixels. .PP If you want to see the complete theme, including the modification you can run: @@ -267,16 +268,18 @@ rofi -no-config -dump-theme .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. +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 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 -preferred. +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 preferred. .SH Comments .PP @@ -286,7 +289,8 @@ C and C++ file comments are supported. .IP \(bu 2 Anything after \fB\fC//\fR and before a newline is considered a comment. .IP \(bu 2 -Everything between \fB\fC/*\fR and \fB\fC*/\fR is a comment, this comment can span multiple lines. +Everything between \fB\fC/*\fR and \fB\fC*/\fR is a comment, this comment can span +multiple lines. .RE @@ -352,13 +356,15 @@ name .SH File extension .PP The preferred file extension for the new theme format is \fBrasi\fP\&. This is an -abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. -If a theme file is split over multiple files, include files can have the: \fBrasinc\fP extension. +abbreviation for \fBr\fPofi \fBa\fPdvanced \fBs\fPtyle \fBi\fPnformation. If a theme +file is split over multiple files, include files can have the: \fBrasinc\fP +extension. .SH Basic Structure .PP -Each element has a section with defined properties. Global properties can be defined in section \fB\fC* { }\fR\&. -Sub-section names begin with an optional hash symbol \fB\fC#\fR\&. +Each element has a section with defined properties. Global properties can be +defined in section \fB\fC* { }\fR\&. Sub-section names begin with an optional hash +symbol \fB\fC#\fR\&. .PP It is advised to define the \fIglobal properties section\fP on top of the file to @@ -385,13 +391,13 @@ make inheritance of properties clearer. .RE .PP -If there are multiple sections with the same name, they are merged. Duplicate properties are overwritten and the last -parsed entry kept. +If there are multiple sections with the same name, they are merged. Duplicate +properties are overwritten and the last parsed entry kept. .SH Global properties section .PP -A theme can have one or more global properties sections. If there is more than one, -they will be merged. +A theme can have one or more global properties sections. If there is more than +one, they will be merged. .PP The global properties section denotes the defaults for each element. @@ -564,7 +570,8 @@ Format: \fB\fC"[:print:]+"\fR .RE .PP -A string is always surrounded by double quotes (\fB\fC"\fR). Between the quotes there can be any printable character. +A string is always surrounded by double quotes (\fB\fC"\fR). Between the quotes there +can be any printable character. .PP For example: @@ -677,8 +684,8 @@ where scale is: none, both, width, height .IP \(bu 2 Format: linear-gradient(stop color,stop1, color, stop2 color, ...); .IP \(bu 2 -Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); -where direction is: top,left,right,bottom. +Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, +...); where direction is: top,left,right,bottom. .IP \(bu 2 Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); Angle in deg,rad,grad (as used in color). @@ -690,7 +697,8 @@ Where the \fB\fCpath\fR is a string, and \fB\fCstop\fR color is of type color. .SS Color .PP -\fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) +\fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and +some of CSS 4) .RS .IP \(bu 2 @@ -710,7 +718,8 @@ Format: \fB\fChsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 Format: \fB\fChwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR .IP \(bu 2 -Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])\fR +Format: \fB\fCcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, +{PERCENTAGE} ])\fR .IP \(bu 2 Format: \fB\fC{named-color} [ / {PERCENTAGE} ]\fR @@ -726,26 +735,38 @@ The different values are: .IP \(bu 2 \fB\fC{HEX}\fR is a hexadecimal number ('0-9a-f' case insensitive). .IP \(bu 2 -\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0-100 when representing percentage. +\fB\fC{INTEGER}\fR value can be between 0 and 255 or 0-100 when representing +percentage. .IP \(bu 2 -\fB\fC{ANGLE}\fR is the angle on the color wheel, can be in \fB\fCdeg\fR, \fB\fCrad\fR, \fB\fCgrad\fR or \fB\fCturn\fR\&. When no unit is specified, degrees is assumed. +\fB\fC{ANGLE}\fR is the angle on the color wheel, can be in \fB\fCdeg\fR, \fB\fCrad\fR, \fB\fCgrad\fR +or \fB\fCturn\fR\&. When no unit is specified, degrees is assumed. .IP \(bu 2 \fB\fC{PERCENTAGE}\fR can be between 0-1.0, or 0%-100% .IP \(bu 2 -\fB\fC{named-color}\fR is one of the following colors:AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, -BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, -DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, -DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, -DimGray, DimGrey, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, -Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, -LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, LightGreen, LightPink, -LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, LimeGreen, -Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, -MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, -OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, PaleTurquoise, PaleVioletRed, -PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, -Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen, -SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent +\fB\fC{named-color}\fR is one of the following colors:AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, +BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, +Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, +DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, +DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, +DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, +DarkViolet, DeepPink, DeepSkyBlue, DimGray, DimGrey, DodgerBlue, FireBrick, +FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, +Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, +Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, +LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, +LightGreen, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, +LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, +LimeGreen, Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, +MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, +MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, +MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, +OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, +PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, +PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, +Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, +SlateGray, SlateGrey, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, +Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, +YellowGreen,transparent .RE @@ -784,8 +805,8 @@ Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR .RE .PP -Text style indicates how the highlighted text is emphasized. \fB\fCNone\fR indicates that no emphasis -should be applied. +Text style indicates how the highlighted text is emphasized. \fB\fCNone\fR indicates +that no emphasis should be applied. .RS .IP \(bu 2 @@ -812,7 +833,7 @@ The following options are available on pango 1.50.0 and up: .PP The following option is disabled as pango crashes on this if there is eel - upsizing or wrapping. This will be re-enabled once fixed: +upsizing or wrapping. This will be re-enabled once fixed: .RS .IP \(bu 2 @@ -830,8 +851,8 @@ Format: \fB\fC(dash|solid)\fR .PP Indicates how a line should be drawn. It currently supports: - * \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash - * \fB\fCsolid\fR: a solid line +- \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash +- \fB\fCsolid\fR: a solid line .SS Distance .RS @@ -916,7 +937,7 @@ It supports the following operations: .IP \(bu 2 \fB\fC/\fR : Divide .IP \(bu 2 -\fB\fC*\fR : Multiply +\fB\fC-\fR : Multiply .IP \(bu 2 \fB\fCmodulo\fR : Modulo .IP \(bu 2 @@ -985,9 +1006,11 @@ Format: \fB\fC{Distance} {Line style}\fR .IP \(bu 2 Format: \fB\fC{Distance} {Line style} {Distance} {Line style}\fR .IP \(bu 2 -Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line style}\fR +Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line +style}\fR .IP \(bu 2 -Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}\fR +Format: \fB\fC{Distance} {Line style} {Distance} {Line style} {Distance} {Line +style} {Distance} {Line style}\fR .RE @@ -1024,7 +1047,8 @@ Indicate a place on the window/monitor. .RS .IP \(bu 2 -Format: \fB\fC(center|east|north|west|south|north east|north west|south west|south east)\fR +Format: \fB\fC(center|east|north|west|south|north east|north west|south west|south +east)\fR .RE @@ -1051,9 +1075,9 @@ Format: \fB\fC@{PROPERTY NAME}\fR .RE .PP -A reference can point to another reference. Currently, the maximum number of redirects is 20. -A property always refers to another property. It cannot be used for a subpart of the property. -For example, this is not valid: +A reference can point to another reference. Currently, the maximum number of +redirects is 20. A property always refers to another property. It cannot be +used for a subpart of the property. For example, this is not valid: .PP .RS @@ -1089,8 +1113,9 @@ Format: \fB\fCvar(PROPERTY NAME, DEFAULT)\fR .RE .PP -A reference can point to another reference. Currently, the maximum number of redirects is 20. -A property always refers to another property. It cannot be used for a subpart of the property. +A reference can point to another reference. Currently, the maximum number of +redirects is 20. A property always refers to another property. It cannot be +used for a subpart of the property. .PP Example: @@ -1107,8 +1132,8 @@ window { .RE .PP -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. +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. .SS Orientation .RS @@ -1128,7 +1153,8 @@ Format: \fB\fC(default|pointer|text)\fR .RE .PP -Specify the type of mouse cursor that is set when the mouse pointer is over the widget. +Specify the type of mouse cursor that is set when the mouse pointer is over the +widget. .SS List of keywords .RS @@ -1138,8 +1164,8 @@ Format: \fB\fC[ keyword, keyword ]\fR .RE .PP -A list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. -The \fB\fCkeyword\fR in the list refers to an widget name. +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. .SS List of values .RS @@ -1149,7 +1175,8 @@ Format: \fB\fC[ value, value, ... ]\fR .RE .PP -An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. +An list starts with a '[' and ends with a ']'. The entries in the list are +comma-separated. .SS Environment variable .RS @@ -1159,8 +1186,9 @@ Format: \fB\fC${:alnum:}\fR .RE .PP -This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. +This will parse the environment variable as the property value. (that then can +be any of the above types). The environment variable should be an alphanumeric +string without white-space. .PP .RS @@ -1180,9 +1208,10 @@ Format: \fB\fCenv(ENVIRONMENT, default)\fR .RE .PP -This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. -If the environment value is not found, the default value is used. +This will parse the environment variable as the property value. (that then can +be any of the above types). The environment variable should be an alphanumeric +string without white-space. If the environment value is not found, the default +value is used. .PP .RS @@ -1196,7 +1225,8 @@ window { .RE .PP -If environment WIDTH is set, then that value is parsed, otherwise the default value (\fB\fC40%\fR). +If environment WIDTH is set, then that value is parsed, otherwise the default +value (\fB\fC40%\fR). .SS Inherit .RS @@ -1221,8 +1251,8 @@ mainbox { .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. +Element paths exists of two parts, the first part refers to the actual widget +by name. Some widgets have an extra state. .PP For example: @@ -1238,10 +1268,12 @@ element selected { .RE .PP -Here \fB\fCelement selected\fR is the name of the widget, \fB\fCselected\fR is the state of the widget. +Here \fB\fCelement selected\fR is the name of the widget, \fB\fCselected\fR is the state of +the widget. .PP -The difference between dots and spaces is purely cosmetic. These are all the same: +The difference between dots and spaces is purely cosmetic. These are all the +same: .PP .RS @@ -1258,7 +1290,7 @@ element selected { .RE .SS Supported element paths -.SS Name +.SS Base widgets .PP The default widgets available in \fBrofi\fP and the default hierarchic: @@ -1275,6 +1307,7 @@ The default widgets available in \fBrofi\fP and the default hierarchic: .RS .IP \(bu 2 \fB\fCbox\fR: the horizontal @box packing the widgets +.RS .IP \(bu 2 \fB\fCcase-indicator\fR: the case/sort indicator @textbox .IP \(bu 2 @@ -1284,11 +1317,17 @@ The default widgets available in \fBrofi\fP and the default hierarchic: .IP \(bu 2 \fB\fCnum-rows\fR: Shows the total number of rows. .IP \(bu 2 -\fB\fCnum-filtered-rows\fR: Shows the total number of rows after filtering. +\fB\fCnum-filtered-rows\fR: Shows the total number of rows after +filtering. .IP \(bu 2 -\fB\fCtextbox-current-entry\fR: Shows the text of the currently selected entry. +\fB\fCtextbox-current-entry\fR: Shows the text of the currently selected +entry. .IP \(bu 2 -\fB\fCicon-current-entry\fR: Shows the icon of the currently selected entry. +\fB\fCicon-current-entry\fR: Shows the icon of the currently selected +entry. + +.RE + .RE @@ -1301,11 +1340,14 @@ The default widgets available in \fBrofi\fP and the default hierarchic: \fB\fCelement\fR: a box in the listview holding the entries .RS .IP \(bu 2 -\fB\fCelement-icon\fR: the widget in the listview's entry showing the (optional) icon +\fB\fCelement-icon\fR: the widget in the listview's entry showing the +(optional) icon .IP \(bu 2 -\fB\fCelement-index\fR: the widget in the listview's entry keybindable index (1,2,3..0) +\fB\fCelement-index\fR: the widget in the listview's entry +keybindable index (1,2,3..0) .IP \(bu 2 -\fB\fCelement-text\fR: the widget in the listview's entry showing the text. +\fB\fCelement-text\fR: the widget in the listview's entry showing the +text. .RE @@ -1335,8 +1377,8 @@ The default widgets available in \fBrofi\fP and the default hierarchic: .RE .PP -Note that these path names match the default theme. Themes that provide a custom layout will have different -elements, and structure. +Note that these path names match the default theme. Themes that provide a +custom layout will have different elements, and structure. .SS State .PP @@ -1348,7 +1390,7 @@ Optional flag(s) indicating state of the widget, used for theming. .PP These are appended after the name or class of the widget. -.SS Example: +.SS Example .PP \fB\fCbutton selected.normal { }\fR @@ -1358,21 +1400,21 @@ These are appended after the name or class of the widget. .PP Currently only the entrybox and scrollbar have states: -.SS Entrybox: +.SS Entrybox .PP \fB\fC{visible modifier}.{state}\fR .PP Where \fB\fCvisible modifier\fR can be: - * normal: no modification - * selected: the entry is selected/highlighted by user - * alternate: the entry is at an alternating row (uneven row) +- normal: no modification +- selected: the entry is selected/highlighted by user +- alternate: the entry is at an alternating row (uneven row) .PP Where \fB\fCstate\fR is: - * normal: no modification - * urgent: this entry is marked urgent - * active: this entry is marked active +- normal: no modification +- urgent: this entry is marked urgent +- active: this entry is marked active .PP These can be mixed. @@ -1393,8 +1435,9 @@ nametotextbox selected.active { .RE .PP -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. +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. .SS Scrollbar .PP @@ -1432,7 +1475,8 @@ Background image Color of the border .IP \(bu 2 \fBcursor\fP: cursor -Type of mouse cursor that is set when the mouse pointer is hovered over the widget. +Type of mouse cursor that is set when the mouse pointer is hovered over the +widget. .RE @@ -1444,31 +1488,37 @@ The font used in the window .IP \(bu 2 \fBtransparency\fP: string Indicating if transparency should be used and what type: +.RS +.IP \(bu 2 \fBreal\fP - True transparency. Only works with a compositor. +.IP \(bu 2 \fBbackground\fP - Take a screenshot of the background image and use that. +.IP \(bu 2 \fBscreenshot\fP - Take a screenshot of the screen and use that. +.IP \(bu 2 \fBPath\fP to png file - Use an image. -.IP \(bu 2 -\fBlocation\fP: position -The place of the anchor on the monitor -.IP \(bu 2 -\fBanchor\fP: anchor -The anchor position on the window -.IP \(bu 2 -\fBfullscreen\fP: boolean -Window is fullscreen. -.IP \(bu 2 -\fBwidth\fP: distance -The width of the window -.IP \(bu 2 -\fBx-offset\fP: distance -.IP \(bu 2 -\fBy-offset\fP: distance -The offset of the window to the anchor point, allowing you to push the window left/right/up/down .RE -.SS scrollbar +.IP \(bu 2 +\fBlocation\fP: position + The place of the anchor on the monitor +.IP \(bu 2 +\fBanchor\fP: anchor + The anchor position on the window +.IP \(bu 2 +\fBfullscreen\fP: boolean Window is fullscreen. +.IP \(bu 2 +\fBwidth\fP: distance The width of the window +.IP \(bu 2 +\fBx-offset\fP: distance +.IP \(bu 2 +\fBy-offset\fP: distance The offset of the window to the anchor point, +allowing you to push the window left/right/up/down + +.RE + +.SS scrollbar Properties .RS .IP \(bu 2 \fBbackground-color\fP: color @@ -1484,11 +1534,9 @@ The offset of the window to the anchor point, allowing you to push the window le .SS box .RS .IP \(bu 2 -\fBorientation\fP: orientation - Set the direction the elements are packed. +\fBorientation\fP: orientation Set the direction the elements are packed. .IP \(bu 2 -\fBspacing\fP: distance - Distance between the packed elements. +\fBspacing\fP: distance Distance between the packed elements. .RE @@ -1503,46 +1551,55 @@ The offset of the window to the anchor point, allowing you to push the window le .IP \(bu 2 \fBstr\fP/\fBcontent\fP: the string to display by this textbox (string). .IP \(bu 2 -\fBvertical-align\fP: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). +\fBvertical-align\fP: Vertical alignment of the text. A number between 0 +(top) and 1 (bottom). .IP \(bu 2 -\fBhorizontal-align\fP: Horizontal alignment of the text. A number between 0 (left) and 1 (right). +\fBhorizontal-align\fP: Horizontal alignment of the text. A number between 0 +(left) and 1 (right). .IP \(bu 2 \fBtext-color\fP: the text color to use. .IP \(bu 2 \fBtext-transform\fP: text style {color} for the whole text. .IP \(bu 2 -\fBhighlight\fP: text style {color}. -color is optional, multiple highlight styles can be added like: bold underline italic #000000; -This option is only available on the \fB\fCelement-text\fR widget. +\fBhighlight\fP: text style {color}. color is optional, multiple +highlight styles can be added like: bold underline italic #000000; This +option is only available on the \fB\fCelement-text\fR widget. .IP \(bu 2 \fBwidth\fP: override the desired width for the textbox. .IP \(bu 2 \fBcontent\fP: Set the displayed text (String). .IP \(bu 2 -\fBplaceholder\fP: Set the displayed text (String) when nothing is entered. +\fBplaceholder\fP: Set the displayed text (String) when nothing is +entered. .IP \(bu 2 -\fBplaceholder-markup\fP: If true, placeholder text supports pango markup for stylizing. +\fBplaceholder-markup\fP: If true, placeholder text supports pango +markup for stylizing. .IP \(bu 2 \fBplaceholder-color\fP: Color of the placeholder text. .IP \(bu 2 -\fBblink\fP: Enable/Disable blinking on an input textbox (Boolean). +\fBblink\fP: Enable/Disable blinking on an input textbox +(Boolean). .IP \(bu 2 -\fBmarkup\fP: Force markup on, beware that only valid pango markup strings are shown. +\fBmarkup\fP: Force markup on, beware that only valid pango markup +strings are shown. .IP \(bu 2 -\fBtab-stops\fP: array of distances -Set the location of tab stops by their distance from the beginning of the line. -Each distance should be greater than the previous one. -The text appears to the right of the tab stop position (other alignments are not supported yet). +\fBtab-stops\fP: array of distances. Set the location of tab stops by +their distance from the beginning of the line. Each distance should be +greater than the previous one. The text appears to the right of the tab +stop position (other alignments are not supported yet). .IP \(bu 2 \fBcursor-width\fP: The width of the cursor. .IP \(bu 2 \fBcursor-color\fP: The color used to draw the cursor. .IP \(bu 2 -\fBcursor-outline\fP: Enable a border (outline) around the cursor. (Boolean) +\fBcursor-outline\fP: Enable a border (outline) around the cursor. +(Boolean) .IP \(bu 2 -\fBcursor-outline-width\fP: The width of the border around the cursor. (Double) +\fBcursor-outline-width\fP: The width of the border around the cursor. +(Double) .IP \(bu 2 -\fBcursor-outline-color\fP: The color to use for the cursor outline. (Color) +\fBcursor-outline-color\fP: The color to use for the cursor outline. +(Color) .IP \(bu 2 \fBtext-outline\fP: Enable a border (outline) around the text. (Boolean) .IP \(bu 2 @@ -1555,45 +1612,38 @@ The text appears to the right of the tab stop position (other alignments are not .SS listview .RS .IP \(bu 2 -\fBcolumns\fP: integer -Number of columns to show (at least 1) +\fBcolumns\fP: integer Number of columns to show (at least 1) .IP \(bu 2 -\fBfixed-height\fP: boolean -Always show \fB\fClines\fR rows, even if fewer elements are available. +\fBfixed-height\fP: boolean Always show \fB\fClines\fR rows, even if fewer +elements are available. .IP \(bu 2 -\fBdynamic\fP: boolean -\fB\fCTrue\fR if the size should change when filtering the list, \fB\fCFalse\fR if it should keep the original height. +\fBdynamic\fP: boolean \fB\fCTrue\fR if the size should change when filtering +the list, \fB\fCFalse\fR if it should keep the original height. .IP \(bu 2 -\fBscrollbar\fP: boolean -If the scrollbar should be enabled/disabled. +\fBscrollbar\fP: boolean If the scrollbar should be enabled/disabled. .IP \(bu 2 -\fBscrollbar-width\fP: distance -Width of the scrollbar +\fBscrollbar-width\fP: distance Width of the scrollbar .IP \(bu 2 -\fBcycle\fP: boolean -When navigating, it should wrap around +\fBcycle\fP: boolean When navigating, it should wrap around .IP \(bu 2 -\fBspacing\fP: distance -Spacing between the elements (both vertical and horizontal) +\fBspacing\fP: distance Spacing between the elements (both vertical +and horizontal) .IP \(bu 2 -\fBlines\fP: integer -Number of rows to show in the list view. +\fBlines\fP: integer Number of rows to show in the list view. .IP \(bu 2 -\fBlayout\fP: orientation -Indicate how elements are stacked. Horizontal implements the dmenu style. +\fBlayout\fP: orientation Indicate how elements are stacked. +Horizontal implements the dmenu style. .IP \(bu 2 -\fBreverse\fP: boolean -Reverse the ordering (top down to bottom up). +\fBreverse\fP: boolean Reverse the ordering (top down to bottom up). .IP \(bu 2 -\fBflow\fP: orientation -The order the elements are layed out. Vertical is the original 'column' view. +\fBflow\fP: orientation The order the elements are layed out. +Vertical is the original 'column' view. .IP \(bu 2 -\fBfixed-columns\fP: boolean -Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. +\fBfixed-columns\fP: boolean Do not reduce the number of columns shown when +number of visible elements is not enough to fill them all. .IP \(bu 2 -\fBrequire-input\fP: boolean -Listview requires user input to be unhidden. The list is still present and -hitting accept will activate the first entry. +\fBrequire-input\fP: boolean Listview requires user input to be unhidden. +The list is still present and hitting accept will activate the first entry. .RE @@ -1634,16 +1684,16 @@ By default the \fB\fCelement-icon\fR and \fB\fCelement-text\fR child widgets are \fB\fC[no]-show-icons\fR option. .PP -A child added with another name is treated the same as the special widget described -in the advanced layout +A child added with another name is treated the same as the special widget +described in the advanced layout \[la]#advanced-layout\[ra] section. .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 -the style of highlighting. -The \fB\fChighlight\fR property consist of the \fB\fCtext-style\fR property and a color. +On this widget set the \fB\fChighlight\fR property (only place this property is used) +to change the style of highlighting. The \fB\fChighlight\fR property consist of the +\fB\fCtext-style\fR property and a color. .PP To disable highlighting: @@ -1675,11 +1725,12 @@ To set to red underlined: .SH Layout .PP -The new format allows the layout of the \fBrofi\fP window to be tweaked extensively. -For each widget, the themer can specify padding, margin, border, font, and more. -It even allows, as an advanced feature, to pack widgets in a custom structure. +The new format allows the layout of the \fBrofi\fP window to be tweaked +extensively. For each widget, the themer can specify padding, margin, border, +font, and more. It even allows, as an advanced feature, to pack widgets in a +custom structure. -.SS Basic structure +.SS Basic layout structure .PP The whole view is made out of boxes that pack other boxes or widgets. The box can be vertical or horizontal. This is loosely inspired by GTK @@ -1770,7 +1821,8 @@ ns is the num-rows .SS Advanced layout .PP -The layout of \fBrofi\fP can be tweaked by packing the 'fixed' widgets in a custom structure. +The layout of \fBrofi\fP can be tweaked by packing the 'fixed' widgets in a +custom structure. .PP The following widgets are fixed, as they provide core \fBrofi\fP functionality: @@ -1798,26 +1850,27 @@ num-filtered-rows .RE .PP -The following keywords are defined and can be used to automatically pack a subset of the widgets. -These are used in the default theme as depicted in the figure above. +The following keywords are defined and can be used to automatically pack a +subset of the widgets. These are used in the default theme as depicted in the +figure above. .RS .IP \(bu 2 -mainbox -Packs: \fB\fCinputbar, message, listview, mode-switcher\fR +mainbox Packs: \fB\fCinputbar, message, listview, mode-switcher\fR .IP \(bu 2 -inputbar -Packs: \fB\fCprompt,entry,case-indicator\fR +inputbar Packs: \fB\fCprompt,entry,case-indicator\fR .RE .PP -Any widget name starting with \fB\fCtextbox\fR is a textbox widget, others are box widgets and can pack other widgets. +Any widget name starting with \fB\fCtextbox\fR is a textbox widget, others are box +widgets and can pack other widgets. .PP -There are several special widgets that can be used by prefixing the name of the widget: +There are several special widgets that can be used by prefixing the name of the +widget: -.SS textbox +.SS Textbox widget .PP This is a read-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&. @@ -1838,12 +1891,14 @@ textbox-custom { .SS Icon .PP -This is an icon widget. The displayed icon can be set with \fB\fCfilename\fR and size with \fB\fCsize\fR\&. -If the property \fB\fCaction\fR is set, it acts as a button. -\fB\fCaction\fR can be set to a keybinding name and completes that action. (see rofi -show keys for a list). +This is an icon widget. The displayed icon can be set with \fB\fCfilename\fR and size +with \fB\fCsize\fR\&. If the property \fB\fCaction\fR is set, it acts as a button. \fB\fCaction\fR can +be set to a keybinding name and completes that action. (see rofi -show keys for +a list). .PP -If the \fB\fCsquared\fR property is set to \fBfalse\fP the widget height and width are not forced to be equal. +If the \fB\fCsquared\fR property is set to \fBfalse\fP the widget height and width are +not forced to be equal. .PP Example: @@ -1865,9 +1920,9 @@ icon-paste { .SS button .PP -This is a textbox widget that can have a 'clickable' action. -The \fB\fCaction\fR can be set to: -\fB\fCkeybinding\fR: accepts a keybinding name and completes that action. (see rofi -show keys for a list). +This is a textbox widget that can have a 'clickable' action. The \fB\fCaction\fR can +be set to: \fB\fCkeybinding\fR: accepts a keybinding name and completes that action. +(see rofi -show keys for a list). .PP .RS @@ -1981,19 +2036,19 @@ Explanation of the different parts: .IP \(bu 2 Content - The content of the widget. .IP \(bu 2 -Padding - Clears an area around the widget. -The padding shows the background color of the widget. +Padding - Clears an area around the widget. The padding shows the +background color of the widget. .IP \(bu 2 -Border - A border that goes around the padding and content. -The border use the border-color of the widget. +Border - A border that goes around the padding and content. The border use +the border-color of the widget. .IP \(bu 2 -Margin - Clears an area outside the border. -The margin is transparent. +Margin - Clears an area outside the border. The margin is transparent. .RE .PP -The box model allows us to add a border around elements, and to define space between elements. +The box model allows us to add a border around elements, and to define space +between elements. .PP The size of each margin, border, and padding can be set. @@ -2001,8 +2056,9 @@ For the border, a linestyle and radius can be set. .SS Spacing .PP -Widgets that can pack more then one child widget (currently box and listview) have the \fB\fCspacing\fR property. -This property sets the distance between the packed widgets (both horizontally and vertically). +Widgets that can pack more then one child widget (currently box and listview) +have the \fB\fCspacing\fR property. This property sets the distance between the packed +widgets (both horizontally and vertically). .PP .RS @@ -2023,7 +2079,8 @@ This property sets the distance between the packed widgets (both horizontally an .SS Advanced box packing .PP -More dynamic spacing can be achieved by adding dummy widgets, for example to make one widget centered: +More dynamic spacing can be achieved by adding dummy widgets, for example to +make one widget centered: .PP .RS @@ -2043,9 +2100,10 @@ More dynamic spacing can be achieved by adding dummy widgets, for example to mak .RE .PP -If both dummy widgets are set to expand, \fB\fCchild\fR will be centered. Depending on the \fB\fCexpand\fR flag of child the -remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets -(expand disabled). +If both dummy widgets are set to expand, \fB\fCchild\fR will be centered. Depending on +the \fB\fCexpand\fR flag of child the remaining space will be equally divided between +both dummy and child widget (expand enabled), or both dummy widgets (expand +disabled). .SH Debugging .PP @@ -2061,7 +2119,8 @@ G_MESSAGES_DEBUG=Parser rofi -show run .RE .PP -Syntax errors are shown in a popup and printed out to command line with the above command. +Syntax errors are shown in a popup and printed out to command line with the +above command. .PP To see the elements queried during running, run: @@ -2076,7 +2135,8 @@ G_MESSAGES_DEBUG=Theme rofi -show run .RE .PP -To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: +To test minor changes, part of the theme can be passed on the command line, for +example to set it to full-screen: .PP .RS @@ -2150,7 +2210,8 @@ It supports the following keys as constraint: .RE .PP -@media takes an integer number or a fraction, for integer number \fB\fCpx\fR can be added. +@media takes an integer number or a fraction, for integer number \fB\fCpx\fR can be +added. .PP .RS @@ -2315,8 +2376,8 @@ extensions. .SH Multiple file handling .PP -The rasi file format offers two methods of including other files. -This can be used to modify existing themes, or have multiple variations on a theme. +The rasi file format offers two methods of including other files. This can be +used to modify existing themes, or have multiple variations on a theme. .RS .IP \(bu 2 @@ -2362,8 +2423,9 @@ A name is resolved as a filename by appending the \fB\fC\&.rasi\fR extension. .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\&. +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\&. .SH SEE ALSO .PP diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown index 015ad433..1a56cce2 100644 --- a/doc/rofi-theme.5.markdown +++ b/doc/rofi-theme.5.markdown @@ -4,11 +4,11 @@ **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. -Themes can be modified/tweaked by adding theming elements to the end of the +Themes can be modified/tweaked by adding theming elements to the end of the\ config file. The default location of this file is `~/.config/rofi/config.rasi`, if the file does not exists, you can create it. @@ -25,7 +25,6 @@ configuration { /* Insert theme modifications after this */ ``` - For example if we want to change the `Type to filter` text in the entry box we append the following: @@ -36,8 +35,8 @@ entry { ``` In the above section, `entry` indicates the widget, `placeholder` is the -property we want to modify and we set it to the string `"Type here"`. -To find the commonly available widgets in rofi, see the 'Basic structure' section. +property we want to modify and we set it to the string `"Type here"`. To find +the commonly available widgets in rofi, see the 'Basic structure' section. To change the mouse over cursor to a pointer, add: @@ -63,7 +62,7 @@ element { Resulting in the following packing: -``` +```text ┌─────────────────────────────────────────────────────────────────────┐ │ element │ │ ┌─────────────────────────────────────────────┐ ┌─────────────────┐ │ @@ -86,7 +85,7 @@ element-icon { } ``` -``` +```text ┌─────────────────────────────────────────────────────────────────────┐ │ element │ │ ┌─────────────────────────────────────────────┐ ┌─────────────────┐ │ @@ -99,7 +98,8 @@ element-icon { In this example we specify the size in the [em](https://www.w3.org/Style/LieBos3e/em) unit. -Now lets change the text color of both the `entry` and the `element-text` widget to red and background to blue. +Now lets change the text color of both the `entry` and the `element-text` +widget to red and background to blue. ```css entry, element-text { @@ -121,7 +121,7 @@ element-text { } ``` -``` +```text ┌─────────────────────────────────────────────────────────────────────┐ │ element │ │ ┌─────────────────────────────────────────────┐ ┌─────────────────┐ │ @@ -142,7 +142,8 @@ entry { } ``` -By default, the `cursor-color` will be the same as the `text-color`. The `cursor-width` will always default to 2 pixels. +By default, the `cursor-color` will be the same as the `text-color`. The +`cursor-width` will always default to 2 pixels. If you want to see the complete theme, including the modification you can run: @@ -159,7 +160,7 @@ The default configuration contains: @theme "default" ``` -To unload the default theme, and load another theme, add the `@theme` statement +To unload the default theme, and load another theme, add the `@theme` statement to your `config.rasi` file. If you have a theme loaded via `@theme` or use the default theme, you can tweak @@ -176,24 +177,28 @@ rofi -no-config -dump-theme ## 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. +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 ## 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 C and C++ file comments are supported. -* Anything after `// ` and before a newline is considered a comment. -* Everything between `/*` and `*/` is a comment, this comment can span multiple lines. +- Anything after `// ` and before a newline is considered a comment. + +- Everything between `/*` and `*/` is a comment, this comment can span + multiple lines. Comments can be nested and the C comments can be inline. @@ -232,13 +237,15 @@ name ## File extension The preferred file extension for the new theme format is **rasi**. This is an -abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation. -If a theme file is split over multiple files, include files can have the: **rasinc** extension. +abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation. If a theme +file is split over multiple files, include files can have the: **rasinc** +extension. ## Basic Structure -Each element has a section with defined properties. Global properties can be defined in section `* { }`. -Sub-section names begin with an optional hash symbol `#`. +Each element has a section with defined properties. Global properties can be +defined in section `* { }`. Sub-section names begin with an optional hash +symbol `#`. It is advised to define the *global properties section* on top of the file to make inheritance of properties clearer. @@ -258,13 +265,13 @@ make inheritance of properties clearer. } ``` -If there are multiple sections with the same name, they are merged. Duplicate properties are overwritten and the last -parsed entry kept. +If there are multiple sections with the same name, they are merged. Duplicate +properties are overwritten and the last parsed entry kept. ## Global properties section -A theme can have one or more global properties sections. If there is more than one, -they will be merged. +A theme can have one or more global properties sections. If there is more than +one, they will be merged. The global properties section denotes the defaults for each element. Each property of this section can be referenced with `@{identifier}` @@ -348,33 +355,34 @@ When used, values with the wrong type that cannot be converted are ignored. The current theme format supports different types: - * a string - * an integer number - * a fractional number - * a boolean value - * a color - * image - * text style - * line style - * a distance - * a padding - * a border - * a position - * a reference - * an orientation - * a cursor - * a list of keywords - * an array of values - * an environment variable - * Inherit +- a string +- an integer number +- a fractional number +- a boolean value +- a color +- image +- text style +- line style +- a distance +- a padding +- a border +- a position +- a reference +- an orientation +- a cursor +- a list of keywords +- an array of values +- an environment variable +- Inherit Some of these types are a combination of other types. ### String -* Format: `"[:print:]+"` +- Format: `"[:print:]+"` -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: @@ -394,7 +402,7 @@ The following special characters can be escaped: `\b`, `\f`, `\n`, `\r`, `\t`, ` ### Integer -* Format: `[-+]?[:digit:]+` +- Format: `[-+]?[:digit:]+` An integer may contain any number. @@ -406,7 +414,7 @@ lines: 12; ### Real -* Format: `[-+]?[:digit:]+(\.[:digit:]+)?` +- Format: `[-+]?[:digit:]+(\.[:digit:]+)?` A real is an integer with an optional fraction. @@ -420,11 +428,10 @@ The following is not valid: `.3`, `3.` or scientific notation: `3.4e-3`. ### Boolean -* Format: `(true|false)` +- Format: `(true|false)` Boolean value is either `true` or `false`. This is case-sensitive. - For example: ```css @@ -435,58 +442,87 @@ dynamic: false; **rofi** support a limited set of background-image formats. -* Format: url("path to image"); -* Format: url("path to image", scale); - where scale is: none, both, width, height -* Format: linear-gradient(stop color,stop1, color, stop2 color, ...); -* Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, ...); - where direction is: top,left,right,bottom. -* Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); - Angle in deg,rad,grad (as used in color). +- Format: url("path to image"); + +- Format: url("path to image", scale); + where scale is: none, both, width, height + +- Format: linear-gradient(stop color,stop1, color, stop2 color, ...); + +- Format: linear-gradient(to direction, stop color,stop1, color, stop2 color, + ...); where direction is: top,left,right,bottom. + +- Format: linear-gradient(angle, stop color,stop1, color, stop2 color, ...); + Angle in deg,rad,grad (as used in color). Where the `path` is a string, and `stop` color is of type color. ### Color -**rofi** supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4) +**rofi** supports the color formats as specified in the CSS standard (1,2,3 and +some of CSS 4) -* Format: `#{HEX}{3}` (rgb) -* Format: `#{HEX}{4}` (rgba) -* Format: `#{HEX}{6}` (rrggbb) -* Format: `#{HEX}{8}` (rrggbbaa) -* Format: `rgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])` -* Format: `rgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])` -* Format: `hsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` -* Format: `hwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` -* Format: `cmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])` -* Format: `{named-color} [ / {PERCENTAGE} ]` +- Format: `#{HEX}{3}` (rgb) + +- Format: `#{HEX}{4}` (rgba) + +- Format: `#{HEX}{6}` (rrggbb) + +- Format: `#{HEX}{8}` (rrggbbaa) + +- Format: `rgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])` + +- Format: `rgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])` + +- Format: `hsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` + +- Format: `hwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])` + +- Format: `cmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, + {PERCENTAGE} ])` + +- Format: `{named-color} [ / {PERCENTAGE} ]` The white-space format proposed in CSS4 is also supported. The different values are: - * `{HEX}` is a hexadecimal number ('0-9a-f' case insensitive). - * `{INTEGER}` value can be between 0 and 255 or 0-100 when representing percentage. - * `{ANGLE}` is the angle on the color wheel, can be in `deg`, `rad`, `grad` or `turn`. When no unit is specified, degrees is assumed. - * `{PERCENTAGE}` can be between 0-1.0, or 0%-100% - * `{named-color}` is one of the following colors: +- `{HEX}` is a hexadecimal number ('0-9a-f' case insensitive). - AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, - BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, - DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, - DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, - DimGray, DimGrey, DodgerBlue, FireBrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, - Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, - LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, LightGreen, LightPink, - LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, LimeGreen, - Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, - MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, - OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, PaleTurquoise, PaleVioletRed, - PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, - Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, SlateGrey, Snow, SpringGreen, - SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen,transparent +- `{INTEGER}` value can be between 0 and 255 or 0-100 when representing + percentage. +- `{ANGLE}` is the angle on the color wheel, can be in `deg`, `rad`, `grad` + or `turn`. When no unit is specified, degrees is assumed. +- `{PERCENTAGE}` can be between 0-1.0, or 0%-100% + +- `{named-color}` is one of the following colors: + + AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, + BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, + Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, + DarkCyan, DarkGoldenRod, DarkGray, DarkGrey, DarkGreen, DarkKhaki, + DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, + DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkSlateGrey, DarkTurquoise, + DarkViolet, DeepPink, DeepSkyBlue, DimGray, DimGrey, DodgerBlue, FireBrick, + FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, GoldenRod, + Gray, Grey, Green, GreenYellow, HoneyDew, HotPink, IndianRed, Indigo, + Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, + LightCoral, LightCyan, LightGoldenRodYellow, LightGray, LightGrey, + LightGreen, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, + LightSlateGray, LightSlateGrey, LightSteelBlue, LightYellow, Lime, + LimeGreen, Linen, Magenta, Maroon, MediumAquaMarine, MediumBlue, + MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, + MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, + MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, + OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenRod, PaleGreen, + PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, + PowderBlue, Purple, RebeccaPurple, Red, RosyBrown, RoyalBlue, SaddleBrown, + Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, + SlateGray, SlateGrey, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, + Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, + YellowGreen,transparent For example: @@ -504,50 +540,50 @@ text-color: Black; ### Text style -* Format: `(bold|italic|underline|strikethrough|none)` +- Format: `(bold|italic|underline|strikethrough|none)` -Text style indicates how the highlighted text is emphasized. `None` indicates that no emphasis -should be applied. +Text style indicates how the highlighted text is emphasized. `None` indicates +that no emphasis should be applied. - * `bold`: make the text thicker then the surrounding text. - * `italic`: put the highlighted text in script type (slanted). - * `underline`: put a line under the text. - * `strikethrough`: put a line through the text. +- `bold`: make the text thicker then the surrounding text. +- `italic`: put the highlighted text in script type (slanted). +- `underline`: put a line under the text. +- `strikethrough`: put a line through the text. The following options are available on pango 1.50.0 and up: - * `uppercase`: Uppercase the text. - * `lowercase`: Lowercase the text. +- `uppercase`: Uppercase the text. +- `lowercase`: Lowercase the text. - The following option is disabled as pango crashes on this if there is eel - upsizing or wrapping. This will be re-enabled once fixed: +The following option is disabled as pango crashes on this if there is eel +upsizing or wrapping. This will be re-enabled once fixed: - * `capitalize`: Capitalize the text. +- `capitalize`: Capitalize the text. ### Line style -* Format: `(dash|solid)` +- Format: `(dash|solid)` Indicates how a line should be drawn. It currently supports: - * `dash`: a dashed line, where the gap is the same width as the dash - * `solid`: a solid line +- `dash`: a dashed line, where the gap is the same width as the dash +- `solid`: a solid line ### Distance -* Format: `{Integer}px` -* Format: `{Real}em` -* Format: `{Real}ch` -* Format: `{Real}%` -* Format: `{Integer}mm` +- Format: `{Integer}px` +- Format: `{Real}em` +- Format: `{Real}ch` +- Format: `{Real}%` +- Format: `{Integer}mm` A distance can be specified in 3 different units: -* `px`: Screen pixels. -* `em`: Relative to text height. -* `ch`: Relative to width of a single number. -* `mm`: Actual size in millimeters (based on dpi). -* `%`: Percentage of the **monitor** size. +- `px`: Screen pixels. +- `em`: Relative to text height. +- `ch`: Relative to width of a single number. +- `mm`: Actual size in millimeters (based on dpi). +- `%`: Percentage of the **monitor** size. Distances used in the horizontal direction use the monitor width. Distances in the vertical direction use the monitor height. @@ -573,60 +609,68 @@ width: calc( 20% min 512 ); It supports the following operations: -* `+` : Add -* `-` : Subtract -* `/` : Divide -* `*` : Multiply -* `modulo` : Modulo -* `min` : Minimum of lvalue or rvalue; -* `max` : Maximum of lvalue or rvalue; -* `floor` : Round down lvalue to the next multiple of rvalue -* `ceil` : Round up lvalue to the next multiple of rvalue -* `round` : Round lvalue to the next multiple of rvalue +- `+` : Add +- `-` : Subtract +- `/` : Divide +- `-` : Multiply +- `modulo` : Modulo +- `min` : Minimum of lvalue or rvalue; +- `max` : Maximum of lvalue or rvalue; +- `floor` : Round down lvalue to the next multiple of rvalue +- `ceil` : Round up lvalue to the next multiple of rvalue +- `round` : Round lvalue to the next multiple of rvalue It uses the C precedence ordering. ### Padding -* Format: `{Integer}` -* Format: `{Distance}` -* Format: `{Distance} {Distance}` -* Format: `{Distance} {Distance} {Distance}` -* Format: `{Distance} {Distance} {Distance} {Distance}` +- Format: `{Integer}` +- Format: `{Distance}` +- Format: `{Distance} {Distance}` +- Format: `{Distance} {Distance} {Distance}` +- Format: `{Distance} {Distance} {Distance} {Distance}` If no unit is specified, pixels are assumed. The different number of fields in the formats are parsed like: -* 1 field: `all` -* 2 fields: `top&bottom` `left&right` -* 3 fields: `top`, `left&right`, `bottom` -* 4 fields: `top`, `right`, `bottom`, `left` - +- 1 field: `all` +- 2 fields: `top&bottom` `left&right` +- 3 fields: `top`, `left&right`, `bottom` +- 4 fields: `top`, `right`, `bottom`, `left` ### Border -* Format: `{Integer}` -* Format: `{Distance}` -* Format: `{Distance} {Distance}` -* Format: `{Distance} {Distance} {Distance}` -* Format: `{Distance} {Distance} {Distance} {Distance}` -* Format: `{Distance} {Line style}` -* Format: `{Distance} {Line style} {Distance} {Line style}` -* Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` -* Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line style} {Distance} {Line style}` +- Format: `{Integer}` + +- Format: `{Distance}` + +- Format: `{Distance} {Distance}` + +- Format: `{Distance} {Distance} {Distance}` + +- Format: `{Distance} {Distance} {Distance} {Distance}` + +- Format: `{Distance} {Line style}` + +- Format: `{Distance} {Line style} {Distance} {Line style}` + +- Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line + style}` + +- Format: `{Distance} {Line style} {Distance} {Line style} {Distance} {Line + style} {Distance} {Line style}` Borders are identical to padding, except that each distance field has a line style property. > When no unit is specified, pixels are assumed. - ### Position Indicate a place on the window/monitor. -``` +```text ┌─────────────┬─────────────┬─────────────┐ │ north west │ north │ north east │ ├─────────────┼─────────────┼─────────────┤ @@ -636,7 +680,8 @@ Indicate a place on the window/monitor. └─────────────┴─────────────┴─────────────┘ ``` -* Format: `(center|east|north|west|south|north east|north west|south west|south east)` +- Format: `(center|east|north|west|south|north east|north west|south west|south + east)` ### Visibility @@ -648,14 +693,13 @@ inputbar { } ``` - ### Reference -* Format: `@{PROPERTY NAME}` +- Format: `@{PROPERTY NAME}` -A reference can point to another reference. Currently, the maximum number of redirects is 20. -A property always refers to another property. It cannot be used for a subpart of the property. -For example, this is not valid: +A reference can point to another reference. Currently, the maximum number of +redirects is 20. A property always refers to another property. It cannot be +used for a subpart of the property. For example, this is not valid: ```css highlight: bold @pink; @@ -673,10 +717,11 @@ window { } ``` -* Format: `var(PROPERTY NAME, DEFAULT)` +- Format: `var(PROPERTY NAME, DEFAULT)` -A reference can point to another reference. Currently, the maximum number of redirects is 20. -A property always refers to another property. It cannot be used for a subpart of the property. +A reference can point to another reference. Currently, the maximum number of +redirects is 20. A property always refers to another property. It cannot be +used for a subpart of the property. Example: @@ -686,41 +731,43 @@ window { } ``` -If the property `width` is set globally (`*{}`) that value is used, if the property -`width` is not set, the default value is used. - +If the property `width` is set globally (`*{}`) that value is used, if the +property `width` is not set, the default value is used. ### Orientation - * Format: `(horizontal|vertical)` +- Format: `(horizontal|vertical)` Specify the orientation of the widget. ### Cursor - * Format: `(default|pointer|text)` +- Format: `(default|pointer|text)` -Specify the type of mouse cursor that is set when the mouse pointer is over the widget. +Specify the type of mouse cursor that is set when the mouse pointer is over the +widget. ### List of keywords -* Format: `[ keyword, keyword ]` +- 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. +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 -* Format: `[ value, value, ... ]` +- Format: `[ value, value, ... ]` -An list starts with a '[' and ends with a ']'. The entries in the list are comma-separated. +An list starts with a '[' and ends with a ']'. The entries in the list are +comma-separated. ### Environment variable -* Format: `${:alnum:}` +- Format: `${:alnum:}` -This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. +This will parse the environment variable as the property value. (that then can +be any of the above types). The environment variable should be an alphanumeric +string without white-space. ```css * { @@ -728,11 +775,12 @@ The environment variable should be an alphanumeric string without white-space. } ``` -* Format: `env(ENVIRONMENT, default)` +- Format: `env(ENVIRONMENT, default)` -This will parse the environment variable as the property value. (that then can be any of the above types). -The environment variable should be an alphanumeric string without white-space. -If the environment value is not found, the default value is used. +This will parse the environment variable as the property value. (that then can +be any of the above types). The environment variable should be an alphanumeric +string without white-space. If the environment value is not found, the default +value is used. ```css window { @@ -740,11 +788,12 @@ window { } ``` -If environment WIDTH is set, then that value is parsed, otherwise the default value (`40%`). +If environment WIDTH is set, then that value is parsed, otherwise the default +value (`40%`). ### Inherit - * Format: `inherit` +- Format: `inherit` Inherits the property from its parent widget. @@ -754,11 +803,10 @@ mainbox { } ``` - ## Elements paths -Element paths exists of two parts, the first part refers to the actual widget by name. -Some widgets have an extra state. +Element paths exists of two parts, the first part refers to the actual widget +by name. Some widgets have an extra state. For example: @@ -767,9 +815,11 @@ element selected { } ``` -Here `element selected` is the name of the widget, `selected` is the state of the widget. +Here `element selected` is the name of the widget, `selected` is the state of +the widget. -The difference between dots and spaces is purely cosmetic. These are all the same: +The difference between dots and spaces is purely cosmetic. These are all the +same: ```css element .selected { @@ -782,36 +832,58 @@ element selected { ### Supported element paths -### Name +### Base widgets The default widgets available in **rofi** and the default hierarchic: -* `window` - * `overlay`: the overlay widget. - * `mainbox`: The mainbox box. - * `inputbar`: The input bar box. - * `box`: the horizontal @box packing the widgets - * `case-indicator`: the case/sort indicator @textbox - * `prompt`: the prompt @textbox - * `entry`: the main entry @textbox - * `num-rows`: Shows the total number of rows. - * `num-filtered-rows`: Shows the total number of rows after filtering. - * `textbox-current-entry`: Shows the text of the currently selected entry. - * `icon-current-entry`: Shows the icon of the currently selected entry. - * `listview`: The listview. - * `scrollbar`: the listview scrollbar - * `element`: a box in the listview holding the entries - * `element-icon`: the widget in the listview's entry showing the (optional) icon - * `element-index`: the widget in the listview's entry keybindable index (1,2,3..0) - * `element-text`: the widget in the listview's entry showing the text. - * `mode-switcher`: the main horizontal @box packing the buttons. - * `button`: the buttons @textbox for each mode - * `message`: The container holding the textbox. - * `textbox`: the message textbox +- `window` + - `overlay`: the overlay widget. -Note that these path names match the default theme. Themes that provide a custom layout will have different -elements, and structure. + - `mainbox`: The mainbox box. + - `inputbar`: The input bar box. + - `box`: the horizontal @box packing the widgets + + - `case-indicator`: the case/sort indicator @textbox + + - `prompt`: the prompt @textbox + + - `entry`: the main entry @textbox + + - `num-rows`: Shows the total number of rows. + + - `num-filtered-rows`: Shows the total number of rows after + filtering. + + - `textbox-current-entry`: Shows the text of the currently selected + entry. + + - `icon-current-entry`: Shows the icon of the currently selected + entry. + + - `listview`: The listview. + + - `scrollbar`: the listview scrollbar + + - `element`: a box in the listview holding the entries + + - `element-icon`: the widget in the listview's entry showing the + (optional) icon + + - `element-index`: the widget in the listview's entry + keybindable index (1,2,3..0) + + - `element-text`: the widget in the listview's entry showing the + text. + + - `mode-switcher`: the main horizontal @box packing the buttons. + - `button`: the buttons @textbox for each mode + + - `message`: The container holding the textbox. + - `textbox`: the message textbox + +Note that these path names match the default theme. Themes that provide a +custom layout will have different elements, and structure. ### State @@ -821,7 +893,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,19 +901,19 @@ These are appended after the name or class of the widget. Currently only the entrybox and scrollbar have states: -#### Entrybox: +#### Entrybox `{visible modifier}.{state}` Where `visible modifier` can be: - * normal: no modification - * selected: the entry is selected/highlighted by user - * alternate: the entry is at an alternating row (uneven row) +- normal: no modification +- selected: the entry is selected/highlighted by user +- alternate: the entry is at an alternating row (uneven row) Where `state` is: - * normal: no modification - * urgent: this entry is marked urgent - * active: this entry is marked active +- normal: no modification +- urgent: this entry is marked urgent +- active: this entry is marked active These can be mixed. @@ -854,171 +926,219 @@ 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. +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 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. - ## Widget properties The following properties are currently supported: ### all widgets -* **enabled**: enable/disable rendering of the widget -* **padding**: padding - Padding on the inside of the widget -* **margin**: padding - Margin on the outside of the widget -* **border**: border - Border around the widget (between padding and margin)/ -* **border-radius**: padding - Sets a radius on the corners of the borders. -* **background-color**: color - Background color -* **background-image**: image - Background image -* **border-color**: color - Color of the border -* **cursor**: cursor - Type of mouse cursor that is set when the mouse pointer is hovered over the widget. +- **enabled**: enable/disable rendering of the widget + +- **padding**: padding + Padding on the inside of the widget + +- **margin**: padding + Margin on the outside of the widget + +- **border**: border + Border around the widget (between padding and margin)/ + +- **border-radius**: padding + Sets a radius on the corners of the borders. + +- **background-color**: color + Background color + +- **background-image**: image + Background image + +- **border-color**: color + Color of the border + +- **cursor**: cursor + Type of mouse cursor that is set when the mouse pointer is hovered over the + widget. ### window -* **font**: string - The font used in the window +- **font**: string + The font used in the window -* **transparency**: string - Indicating if transparency should be used and what type: - **real** - True transparency. Only works with a compositor. - **background** - Take a screenshot of the background image and use that. - **screenshot** - Take a screenshot of the screen and use that. - **Path** to png file - Use an image. +- **transparency**: string + Indicating if transparency should be used and what type: + - **real** - True transparency. Only works with a compositor. + - **background** - Take a screenshot of the background image and use that. + - **screenshot** - Take a screenshot of the screen and use that. + - **Path** to png file - Use an image. -* **location**: position - The place of the anchor on the monitor -* **anchor**: anchor - The anchor position on the window -* **fullscreen**: boolean - Window is fullscreen. -* **width**: distance - The width of the window -* **x-offset**: distance -* **y-offset**: distance - The offset of the window to the anchor point, allowing you to push the window left/right/up/down +- **location**: position + The place of the anchor on the monitor +- **anchor**: anchor + The anchor position on the window -### scrollbar +- **fullscreen**: boolean Window is fullscreen. -* **background-color**: color -* **handle-width**: distance -* **handle-color**: color -* **border-color**: color +- **width**: distance The width of the window + +- **x-offset**: distance + +- **y-offset**: distance The offset of the window to the anchor point, + allowing you to push the window left/right/up/down + +### scrollbar Properties + +- **background-color**: color +- **handle-width**: distance +- **handle-color**: color +- **border-color**: color ### box -* **orientation**: orientation - Set the direction the elements are packed. -* **spacing**: distance - Distance between the packed elements. +- **orientation**: orientation Set the direction the elements are packed. +- **spacing**: distance Distance between the packed elements. ### textbox -* **background-color**: color -* **border-color**: the color used for the border around the widget. -* **font**: the font used by this textbox (string). -* **str**/**content**: the string to display by this textbox (string). -* **vertical-align**: Vertical alignment of the text. A number between 0 (top) and 1 (bottom). -* **horizontal-align**: Horizontal alignment of the text. A number between 0 (left) and 1 (right). -* **text-color**: the text color to use. -* **text-transform**: text style {color} for the whole text. -* **highlight**: text style {color}. - color is optional, multiple highlight styles can be added like: bold underline italic #000000; - This option is only available on the `element-text` widget. -* **width**: override the desired width for the textbox. -* **content**: Set the displayed text (String). -* **placeholder**: Set the displayed text (String) when nothing is entered. -* **placeholder-markup**: If true, placeholder text supports pango markup for stylizing. -* **placeholder-color**: Color of the placeholder text. -* **blink**: Enable/Disable blinking on an input textbox (Boolean). -* **markup**: Force markup on, beware that only valid pango markup strings are shown. -* **tab-stops**: array of distances - Set the location of tab stops by their distance from the beginning of the line. - Each distance should be greater than the previous one. - The text appears to the right of the tab stop position (other alignments are not supported yet). -* **cursor-width**: The width of the cursor. -* **cursor-color**: The color used to draw the cursor. -* **cursor-outline**: Enable a border (outline) around the cursor. (Boolean) -* **cursor-outline-width**: The width of the border around the cursor. (Double) -* **cursor-outline-color**: The color to use for the cursor outline. (Color) -* **text-outline**: Enable a border (outline) around the text. (Boolean) -* **text-outline-width**: The width of the border around the text. (Double) -* **text-outline-color**: The color to use for the text outline. (Color) +- **background-color**: color + +- **border-color**: the color used for the border around the widget. + +- **font**: the font used by this textbox (string). + +- **str**/**content**: the string to display by this textbox (string). + +- **vertical-align**: Vertical alignment of the text. A number between 0 + (top) and 1 (bottom). + +- **horizontal-align**: Horizontal alignment of the text. A number between 0 + (left) and 1 (right). + +- **text-color**: the text color to use. + +- **text-transform**: text style {color} for the whole text. + +- **highlight**: text style {color}. color is optional, multiple + highlight styles can be added like: bold underline italic #000000; This + option is only available on the `element-text` widget. + +- **width**: override the desired width for the textbox. + +- **content**: Set the displayed text (String). + +- **placeholder**: Set the displayed text (String) when nothing is + entered. + +- **placeholder-markup**: If true, placeholder text supports pango + markup for stylizing. + +- **placeholder-color**: Color of the placeholder text. + +- **blink**: Enable/Disable blinking on an input textbox + (Boolean). + +- **markup**: Force markup on, beware that only valid pango markup + strings are shown. + +- **tab-stops**: array of distances. Set the location of tab stops by + their distance from the beginning of the line. Each distance should be + greater than the previous one. The text appears to the right of the tab + stop position (other alignments are not supported yet). + +- **cursor-width**: The width of the cursor. + +- **cursor-color**: The color used to draw the cursor. + +- **cursor-outline**: Enable a border (outline) around the cursor. + (Boolean) + +- **cursor-outline-width**: The width of the border around the cursor. + (Double) + +- **cursor-outline-color**: The color to use for the cursor outline. + (Color) + +- **text-outline**: Enable a border (outline) around the text. (Boolean) + +- **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 -* **columns**: integer - Number of columns to show (at least 1) -* **fixed-height**: boolean - Always show `lines` rows, even if fewer elements are available. -* **dynamic**: boolean - `True` if the size should change when filtering the list, `False` if it should keep the original height. -* **scrollbar**: boolean - If the scrollbar should be enabled/disabled. -* **scrollbar-width**: distance - Width of the scrollbar -* **cycle**: boolean - When navigating, it should wrap around -* **spacing**: distance - Spacing between the elements (both vertical and horizontal) -* **lines**: integer - Number of rows to show in the list view. -* **layout**: orientation - Indicate how elements are stacked. Horizontal implements the dmenu style. -* **reverse**: boolean - Reverse the ordering (top down to bottom up). -* **flow**: orientation - The order the elements are layed out. Vertical is the original 'column' view. -* **fixed-columns**: boolean - Do not reduce the number of columns shown when number of visible elements is not enough to fill them all. -* **require-input**: boolean - Listview requires user input to be unhidden. The list is still present and - hitting accept will activate the first entry. +- **columns**: integer Number of columns to show (at least 1) + +- **fixed-height**: boolean Always show `lines` rows, even if fewer + elements are available. + +- **dynamic**: boolean `True` if the size should change when filtering + the list, `False` if it should keep the original height. + +- **scrollbar**: boolean If the scrollbar should be enabled/disabled. + +- **scrollbar-width**: distance Width of the scrollbar + +- **cycle**: boolean When navigating, it should wrap around + +- **spacing**: distance Spacing between the elements (both vertical + and horizontal) + +- **lines**: integer Number of rows to show in the list view. + +- **layout**: orientation Indicate how elements are stacked. + Horizontal implements the dmenu style. + +- **reverse**: boolean Reverse the ordering (top down to bottom up). + +- **flow**: orientation The order the elements are layed out. + Vertical is the original 'column' view. + +- **fixed-columns**: boolean Do not reduce the number of columns shown when + number of visible elements is not enough to fill them all. + +- **require-input**: boolean Listview requires user input to be unhidden. + The list is still present and hitting accept will activate the first entry. ## Listview widget The listview widget is special container widget. It has the following fixed children widgets: -* 0 or more `element` widgets of the type box. -* An optional `scrollbar` widget. This can be enabled using the scrollbar - property. +- 0 or more `element` widgets of the type box. + +- An optional `scrollbar` widget. This can be enabled using the scrollbar + property. These cannot be changed using the `children` property. Each Entry displayed by listview is captured by a `box` called `element`. An `element` widget can contain the following special child widgets: -* `element-icon`: An icon widget showing the icon associated to the entry. -* `element-text`: A textbox widget showing the text associated to the entry. -* `element-index`: A textbox widget that shows the shortcut keybinding number. +- `element-icon`: An icon widget showing the icon associated to the entry. +- `element-text`: A textbox widget showing the text associated to the entry. +- `element-index`: A textbox widget that shows the shortcut keybinding number. By default the `element-icon` and `element-text` child widgets are added to the `element`. This can be modified using the `children` property or the `[no]-show-icons` option. -A child added with another name is treated the same as the special widget described -in the [advanced layout](#advanced-layout) section. +A child added with another name is treated the same as the special widget +described in the [advanced layout](#advanced-layout) section. -#### 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 -the style of highlighting. -The `highlight` property consist of the `text-style` property and a color. +On this widget set the `highlight` property (only place this property is used) +to change the style of highlighting. The `highlight` property consist of the +`text-style` property and a color. To disable highlighting: @@ -1038,18 +1158,19 @@ To set to red underlined: ## Layout -The new format allows the layout of the **rofi** window to be tweaked extensively. -For each widget, the themer can specify padding, margin, border, font, and more. -It even allows, as an advanced feature, to pack widgets in a custom structure. +The new format allows the layout of the **rofi** window to be tweaked +extensively. For each widget, the themer can specify padding, margin, border, +font, and more. It even allows, as an advanced feature, to pack widgets in a +custom structure. -### Basic structure +### Basic layout structure The whole view is made out of boxes that pack other boxes or widgets. The box can be vertical or horizontal. This is loosely inspired by [GTK](http://gtk.org/). The current layout of **rofi** is structured as follows: -``` +```text ┌────────────────────────────────────────────────────────────────────────────────────┐ │ window {BOX:vertical} │ │ ┌───────────────────────────────────────────────────────────────────────────────┐ │ @@ -1089,13 +1210,13 @@ The current layout of **rofi** is structured as follows: ``` -> * ci is the case-indicator -> * fr is the num-filtered-rows -> * ns is the num-rows +> - ci is the case-indicator +> - fr is the num-filtered-rows +> - ns is the num-rows ### Error message structure -``` +```text ┌──────────────────────────────────────────────────────────────────────────────────┐ │ window {BOX:vertical} │ │ ┌─────────────────────────────────────────────────────────────────────────────┐ │ @@ -1110,37 +1231,38 @@ The current layout of **rofi** is structured as follows: ### Advanced layout -The layout of **rofi** can be tweaked by packing the 'fixed' widgets in a custom structure. +The layout of **rofi** can be tweaked by packing the 'fixed' widgets in a +custom structure. The following widgets are fixed, as they provide core **rofi** functionality: - * prompt - * entry - * overlay - * case-indicator - * message - * listview - * mode-switcher - * num-rows - * num-filtered-rows +- prompt +- entry +- overlay +- case-indicator +- message +- listview +- mode-switcher +- num-rows +- num-filtered-rows -The following keywords are defined and can be used to automatically pack a subset of the widgets. -These are used in the default theme as depicted in the figure above. +The following keywords are defined and can be used to automatically pack a +subset of the widgets. These are used in the default theme as depicted in the +figure above. - * mainbox - Packs: `inputbar, message, listview, mode-switcher` - * inputbar - Packs: `prompt,entry,case-indicator` +- mainbox Packs: `inputbar, message, listview, mode-switcher` +- inputbar Packs: `prompt,entry,case-indicator` -Any widget name starting with `textbox` is a textbox widget, others are box widgets and can pack other widgets. +Any widget name starting with `textbox` is a textbox widget, others are box +widgets and can pack other widgets. -There are several special widgets that can be used by prefixing the name of the widget: +There are several special widgets that can be used by prefixing the name of the +widget: -#### textbox +#### Textbox widget This is a read-only textbox widget. The displayed string can be set with `content`. - Example: ```css @@ -1152,11 +1274,13 @@ textbox-custom { #### Icon -This is an icon widget. The displayed icon can be set with `filename` and size with `size`. -If the property `action` is set, it acts as a button. -`action` can be set to a keybinding name and completes that action. (see rofi -show keys for a list). +This is an icon widget. The displayed icon can be set with `filename` and size +with `size`. If the property `action` is set, it acts as a button. `action` can +be set to a keybinding name and completes that action. (see rofi -show keys for +a list). -If the `squared` property is set to **false** the widget height and width are not forced to be equal. +If the `squared` property is set to **false** the widget height and width are +not forced to be equal. Example: @@ -1170,12 +1294,11 @@ icon-paste { } ``` - #### button -This is a textbox widget that can have a 'clickable' action. -The `action` can be set to: -`keybinding`: accepts a keybinding name and completes that action. (see rofi -show keys for a list). +This is a textbox widget that can have a 'clickable' action. The `action` can +be set to: `keybinding`: accepts a keybinding name and completes that action. +(see rofi -show keys for a list). ```css button-paste { @@ -1186,7 +1309,6 @@ button-paste { } ``` - #### Children To specify children, set the `children` @@ -1242,12 +1364,11 @@ element selected { } ``` - ### Padding and margin Just like CSS, **rofi** uses the box model for each widget. -``` +```text ┌──────────────────────────────────────────────────────────────────┐ │ margin │ │ ┌────────────────────────────────────────────────────────────┐ │ @@ -1264,25 +1385,29 @@ Just like CSS, **rofi** uses the box model for each widget. Explanation of the different parts: - * Content - The content of the widget. - * Padding - Clears an area around the widget. - The padding shows the background color of the widget. - * Border - A border that goes around the padding and content. - The border use the border-color of the widget. - * Margin - Clears an area outside the border. - The margin is transparent. +- Content - The content of the widget. -The box model allows us to add a border around elements, and to define space between elements. +- Padding - Clears an area around the widget. The padding shows the + background color of the widget. + +- Border - A border that goes around the padding and content. The border use + the border-color of the widget. + +- Margin - Clears an area outside the border. The margin is transparent. + +The box model allows us to add a border around elements, and to define space +between elements. The size of each margin, border, and padding can be set. For the border, a linestyle and radius can be set. ### Spacing -Widgets that can pack more then one child widget (currently box and listview) have the `spacing` property. -This property sets the distance between the packed widgets (both horizontally and vertically). +Widgets that can pack more then one child widget (currently box and listview) +have the `spacing` property. This property sets the distance between the packed +widgets (both horizontally and vertically). -``` +```text ┌───────────────────────────────────────┐ │ ┌────────┐ s ┌────────┐ s ┌────────┐ │ │ │ child │ p │ child │ p │ child │ │ @@ -1296,9 +1421,10 @@ This property sets the distance between the packed widgets (both horizontally an ### Advanced box packing -More dynamic spacing can be achieved by adding dummy widgets, for example to make one widget centered: +More dynamic spacing can be achieved by adding dummy widgets, for example to +make one widget centered: -``` +```text ┌────────────────────────────────────────────────────┐ │ ┌───────────────┐ ┌────────┐ ┌───────────────┐ │ │ │ dummy │ │ child │ │ dummy │ │ @@ -1310,29 +1436,32 @@ More dynamic spacing can be achieved by adding dummy widgets, for example to mak └────────────────────────────────────────────────────┘ ``` -If both dummy widgets are set to expand, `child` will be centered. Depending on the `expand` flag of child the -remaining space will be equally divided between both dummy and child widget (expand enabled), or both dummy widgets -(expand disabled). +If both dummy widgets are set to expand, `child` will be centered. Depending on +the `expand` flag of child the remaining space will be equally divided between +both dummy and child widget (expand enabled), or both dummy widgets (expand +disabled). ## Debugging To get debug information from the parser, run rofi like: -``` +```bash G_MESSAGES_DEBUG=Parser rofi -show run ``` -Syntax errors are shown in a popup and printed out to command line with the above command. +Syntax errors are shown in a popup and printed out to command line with the +above command. To see the elements queried during running, run: -``` +```bash G_MESSAGES_DEBUG=Theme rofi -show run ``` -To test minor changes, part of the theme can be passed on the command line, for example to set it to full-screen: +To test minor changes, part of the theme can be passed on the command line, for +example to set it to full-screen: -``` +```bash rofi -theme-str 'window { fullscreen:true;}' -show run ``` @@ -1344,7 +1473,7 @@ rofi -theme+window+fullscreen true -show run To print the current theme, run: -``` +```bash rofi -dump-theme ``` @@ -1352,7 +1481,7 @@ rofi -dump-theme Parts of the theme can be conditionally loaded, like the CSS `@media` option. -``` +```css @media ( min-width: 120 ) { } @@ -1360,25 +1489,25 @@ Parts of the theme can be conditionally loaded, like the CSS `@media` option. It supports the following keys as constraint: - * `min-width`: load when width is bigger or equal then value. - * `max-width`: load when width is smaller then value. - * `min-height`: load when height is bigger or equal then value. - * `max-height`: load when height is smaller then value. - * `min-aspect-ratio` load when aspect ratio is over value. - * `max-aspect-ratio`: load when aspect ratio is under value. - * `monitor-id`: The monitor id, see rofi -help for id's. - * `enabled`: Boolean option to enable. Supports environment variable. +- `min-width`: load when width is bigger or equal then value. +- `max-width`: load when width is smaller then value. +- `min-height`: load when height is bigger or equal then value. +- `max-height`: load when height is smaller then value. +- `min-aspect-ratio` load when aspect ratio is over value. +- `max-aspect-ratio`: load when aspect ratio is under value. +- `monitor-id`: The monitor id, see rofi -help for id's. +- `enabled`: Boolean option to enable. Supports environment variable. -@media takes an integer number or a fraction, for integer number `px` can be added. +@media takes an integer number or a fraction, for integer number `px` can be +added. - -``` +```css @media ( min-width: 120 px ) { } ``` -``` +```css @media ( enabled: env(DO_LIGHT, false ) { } @@ -1400,13 +1529,13 @@ Rofi uses [pango](https://pango.gnome.org/) for font rendering. The font should be specified in a format that pango understands. This normally is the font name followed by the font size. For example: -``` +```text mono 18 ``` Or -``` +```text FontAwesome 22 ``` @@ -1451,15 +1580,13 @@ A typical example: "Cantarell Italic Light 15 \`wght`=200" - ## Icon Handling Rofi supports 3 ways of specifying an icon: -* Filename -* icon-name, this is looked up via the icon-theme. -* Markup String. It renders a string as an icon. - +- Filename +- icon-name, this is looked up via the icon-theme. +- Markup String. It renders a string as an icon. For the first two options, GdkPixbuf is used to open and render the icons. This in general gives support for most required image formats. @@ -1482,15 +1609,15 @@ extensions. ## Multiple file handling -The rasi file format offers two methods of including other files. -This can be used to modify existing themes, or have multiple variations on a theme. +The rasi file format offers two methods of including other files. This can be +used to modify existing themes, or have multiple variations on a theme. - * import: Import and parse a second file. - * theme: Discard theme, and load file as a fresh theme. +- import: Import and parse a second file. +- theme: Discard theme, and load file as a fresh theme. Syntax: -``` +```css @import "myfile" @theme "mytheme" ``` @@ -1499,19 +1626,18 @@ The specified file can either by *name*, *filename*,*full path*. If a filename is provided, it will try to resolve it in the following order: - * `${XDG_CONFIG_HOME}/rofi/themes/` - * `${XDG_CONFIG_HOME}/rofi/` - * `${XDG_DATA_HOME}/rofi/themes/` - * `${INSTALL PREFIX}/share/rofi/themes/` +- `${XDG_CONFIG_HOME}/rofi/themes/` +- `${XDG_CONFIG_HOME}/rofi/` +- `${XDG_DATA_HOME}/rofi/themes/` +- `${INSTALL PREFIX}/share/rofi/themes/` A name is resolved as a filename by appending the `.rasi` extension. - - ## 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/`. +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/`. ## SEE ALSO