summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-02-02 17:21:21 +0100
committerDave Davenport <qball@gmpclient.org>2020-02-02 17:21:21 +0100
commitbc2e1549fbd519f760775521b055e399dc6959e0 (patch)
tree7ffc365e875fe72d1a014e85fc24a9a5315114db
parent7dcc3f450ca23143c074a2c3e24eb9414ebc36fb (diff)
Add rofi-script manpage, add meta option support to dmenu.
update ronn to go-md2man
-rw-r--r--Makefile.am13
-rw-r--r--doc/rofi-script.5.markdown102
-rw-r--r--doc/rofi-theme-selector.187
-rw-r--r--doc/rofi-theme.52453
-rw-r--r--source/dialogs/dmenu.c35
5 files changed, 1423 insertions, 1267 deletions
diff --git a/Makefile.am b/Makefile.am
index 41284e4f..481b4c85 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -176,10 +176,12 @@ dist_man1_MANS=\
doc/rofi-sensible-terminal.1
dist_man5_MANS=\
- doc/rofi-theme.5
+ doc/rofi-theme.5\
+ doc/rofi-script.5
EXTRA_DIST += \
doc/rofi-theme.5.markdown \
+ doc/rofi-script.5.markdown \
doc/rofi-theme-selector.1.markdown \
doc/rofi.1.markdown
@@ -257,10 +259,11 @@ EXTRA_DIST+=\
##
-update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown
- ronn --roff $(top_srcdir)/doc/rofi.1.markdown
- ronn --roff $(top_srcdir)/doc/rofi-theme-selector.1.markdown
- ronn --roff $(top_srcdir)/doc/rofi-theme.5.markdown
+update-manpage: $(top_srcdir)/doc/rofi-theme-selector.1.markdown $(top_srcdir)/doc/rofi.1.markdown $(top_srcdir)/doc/rofi-theme.5.markdown $(top_srcdir)/doc/rofi-script.5.markdown
+ go-md2man -in $(top_srcdir)/doc/rofi.1.markdown -out $(top_srcdir)/doc/rofi.1
+ go-md2man -in $(top_srcdir)/doc/rofi-theme-selector.1.markdown -out $(top_srcdir)/doc/rofi-theme-selector.1
+ go-md2man -in $(top_srcdir)/doc/rofi-theme.5.markdown -out $(top_srcdir)/doc/rofi-theme.5
+ go-md2man -in $(top_srcdir)/doc/rofi-script.5.markdown -out $(top_srcdir)/doc/rofi-script.5
##
# Rofi test program
diff --git a/doc/rofi-script.5.markdown b/doc/rofi-script.5.markdown
new file mode 100644
index 00000000..dae1dc33
--- /dev/null
+++ b/doc/rofi-script.5.markdown
@@ -0,0 +1,102 @@
+# ROFI-SCRIPT 5 rofi-script
+
+## NAME
+
+**rofi script mode** - Rofi format for scriptable modi.
+
+
+## DESCRIPTION
+
+**rofi** supports modes that use simple scripts in the background to generate a list and process the result from user
+actions. This provide a simple interface to make simple extensions to rofi.
+
+
+## USAGE
+
+To specify a script mode, set a mode with the following syntax: "{name}:{executable}"
+
+For example:
+
+```
+rofi -show fb -modi "fb:file_browser.sh"
+```
+
+The name should be unique.
+
+## API
+
+Rofi calls the executable without arguments on startup. This should generate a list of options, separated by a newline
+(`\n`).
+If the user selects an option, rofi calls the executable with the text of that option as the first argument.
+If the script returns no entries, rofi quits.
+
+A simple script would be:
+
+```bash
+#!/usr/bin/env bash
+
+if [ x"$@" = x"quit" ]
+then
+ exit 0
+fi
+echo "reload"
+echo "quit"
+
+```
+
+This shows two entries, reload and quit. When the quit entry is selected, rofi closes.
+
+## Passing mode options
+
+Extra options, like setting the prompt, can be set by the script.
+Extra options are lines that start with a NULL character (`\0`) followed by a key, separator (`\x1f`) and value.
+
+For example to set the prompt:
+
+```bash
+ echo -en "\0prompt\x1fChange prompt\n"
+```
+
+The following extra options exists:
+
+ * **prompt**: Update the prompt text.
+ * **message**: Update the message text.
+ * **markup-rows**: If 'true' renders markup in the row.
+ * **urgent**: Mark rows as urgent. (for syntax see the urgent option in dmenu mode)
+ * **active**: Mark rows as active. (for syntax see the active option in dmenu mode)
+
+## Parsing row options
+
+Extra options for individual rows can be set.
+The extra option can be specified following the same syntax as mode option, but following the entry.
+
+For example:
+
+```bash
+ echo -en "aap\0icon\x1ffolder\n"
+```
+
+The following options are supported:
+
+ * **icon**: Set the icon for that row.
+ * **meta**: Specify invisible search terms.
+ * **nonselectable**: If true the row cannot activated.
+
+
+
+## SEE ALSO
+
+rofi-sensible-terminal(1), dmenu(1), rofi-theme(5), rofi-theme-selector(1)
+
+## AUTHOR
+
+Qball Cow <qball@gmpclient.org>
+
+Rasmus Steinke <rasi@xssn.at>
+
+Quentin Glidic <sardemff7+rofi@sardemff7.net>
+
+
+Original code based on work by: Sean Pringle <sean.pringle@gmail.com>
+
+For a full list of authors, check the AUTHORS file.
diff --git a/doc/rofi-theme-selector.1 b/doc/rofi-theme-selector.1
index b97550ce..de076ff4 100644
--- a/doc/rofi-theme-selector.1
+++ b/doc/rofi-theme-selector.1
@@ -1,47 +1,44 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "ROFI\-THEME\-SELECTOR" "1" "December 2019" "" ""
-.
-.SH "NAME"
-\fBrofi\-theme\-selector\fR \- Preview and apply themes for \fBrofi\fR
-.
-.SH "DESCRIPTION"
-\fBrofi\-theme\-selector\fR is a bash/rofi script to preview and apply themes for \fBrofi\fR\. It\'s part of any installation of \fBrofi\fR\.
-.
-.SH "USAGE"
-.
-.SS "Running rofi\-theme\-selector"
-\fBrofi\-theme\-selector\fR shows a list of all available themes in a \fBrofi\fR window\. It lets you preview each theme with the Enter key and apply the theme to your \fBrofi\fR configuration file with Alt+a\.
-.
-.SH "Theme directories"
-\fBrofi\-theme\-selector\fR searches the following directories for themes:
-.
-.IP "\(bu" 4
+.TH rofi\-theme\-selector 1 rofi\-theme\-selector
+.SH NAME
+.PP
+\fBrofi\-theme\-selector\fP \- Preview and apply themes for \fBrofi\fP
+
+.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\&.
+
+.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.
+
+.SH Theme directories
+.PP
+\fBrofi\-theme\-selector\fP searches the following directories for themes:
+
+.RS
+.IP \(bu 2
${PREFIX}/share/rofi/themes
-.
-.IP "\(bu" 4
-$XDG_CONFIG_HOME/rofi/themes
-.
-.IP "\(bu" 4
-$XDG_DATA_HOME/share/rofi/themes
-.
-.IP "" 0
-.
-.P
-${PREFIX} reflects the install location of rofi\. In most cases this will be "/usr"\.
-.
-.br
-$XDG_CONFIG_HOME is normally unset\. Default path is "$HOME/\.config"\.
-.
-.br
-$XDG_DATA_HOME is normally unset\. Default path is "$HOME/\.local/share"\.
-.
-.SH "SEE ALSO"
+.IP \(bu 2
+$XDG\_CONFIG\_HOME/rofi/themes
+.IP \(bu 2
+$XDG\_DATA\_HOME/share/rofi/themes
+
+.RE
+
+.PP
+${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".<br>
+$XDG\_CONFIG\_HOME is normally unset. Default path is "$HOME/.config".<br>
+$XDG\_DATA\_HOME is normally unset. Default path is "$HOME/.local/share".
+
+.SH SEE ALSO
+.PP
rofi(1)
-.
-.SH "AUTHORS"
-Qball Cow qball@gmpclient\.org
-.
-.br
-Rasmus Steinke rasi@xssn\.at
+
+.SH AUTHORS
+.PP
+Qball Cow qball@gmpclient.org<br>
+Rasmus Steinke rasi@xssn.at
diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5
index 43a22c78..567dd5f3 100644
--- a/doc/rofi-theme.5
+++ b/doc/rofi-theme.5
@@ -1,180 +1,193 @@
-.\" generated with Ronn/v0.7.3
-.\" http://github.com/rtomayko/ronn/tree/0.7.3
-.
-.TH "ROFI\-THEME" "5" "January 2020" "" ""
-.
-.SH "NAME"
-\fBrofi\-theme\fR \- Rofi theme format files
-.
-.SH "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\. Therefor, a new file format has been created, replacing the old one\.
-.
-.SH "FORMAT SPECIFICATION"
-.
-.SH "Encoding"
-The encoding of the file is utf\-8\. Both unix (\fB\en\fR) and windows (\fB\er\en\fR) newlines format are supported\. But unix is preferred\.
-.
-.SH "Comments"
-C and C++ file comments are supported\.
-.
-.IP "\(bu" 4
-Anything after \fB//\fR and before a newline is considered a comment\.
-.
-.IP "\(bu" 4
-Everything between \fB/*\fR and \fB*/\fR is a comment\.
-.
-.IP "" 0
-.
-.P
-Comments can be nested and the C comments can be inline\.
-.
-.P
+.TH ROFI\-THEME 5 rofi\-theme
+.SH NAME
+.PP
+\fBrofi\-theme\fP \- Rofi theme format files
+
+.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. Therefor, 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.
+
+.SH Comments
+.PP
+C and C++ file comments are supported.
+
+.RS
+.IP \(bu 2
+Anything after \fB\fC//\fR and before a newline is considered a comment.
+.IP \(bu 2
+Everything between \fB\fC/*\fR and \fB\fC*/\fR is a comment.
+
+.RE
+
+.PP
+Comments can be nested and the C comments can be inline.
+
+.PP
The following is valid:
-.
-.IP "" 4
-.
-.nf
-// Magic comment\.
+.PP
+.RS
+
+.nf
+// Magic comment.
property: /* comment */ value;
-.
+
.fi
-.
-.IP "" 0
-.
-.P
+.RE
+
+.PP
However, this is not:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
prop/*comment*/erty: value;
-.
+
.fi
-.
-.IP "" 0
-.
-.SH "White space"
-White space and newlines, like comments, are ignored by the parser\.
-.
-.P
+.RE
+
+.SH White space
+.PP
+White space and newlines, like comments, are ignored by the parser.
+
+.PP
This:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
property: name;
-.
+
.fi
-.
-.IP "" 0
-.
-.P
+.RE
+
+.PP
Is identical to:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
property :
name
;
-.
+
.fi
-.
-.IP "" 0
-.
-.SH "File extension"
-The preferred file extension for the new theme format is \fBrasi\fR\. This is an abbreviation for \fBr\fRofi \fBa\fRdvanced \fBs\fRtyle \fBi\fRnformation\.
-.
-.SH "Basic Structure"
-Each element has a section with defined properties\. Global properties can be defined in section \fB* { }\fR\. Sub\-section names begin with a hash symbol \fB#\fR\.
-.
-.P
-It is advised to define the \fIglobal properties section\fR on top of the file to make inheritance of properties clearer\.
-.
-.IP "" 4
-.
-.nf
+.RE
+
+.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.
+.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 a hash symbol \fB\fC#\fR\&.
+
+.PP
+It is advised to define the \fIglobal properties section\fP on top of the file to
+make inheritance of properties clearer.
+
+.PP
+.RS
+
+.nf
/* Global properties section */
* {
// list of properties
}
-/* Element theme section\. */
+/* Element theme section. */
{element path} {
// list of properties
}
-{elements\.\.\. } {
+{elements... } {
// list of properties
}
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-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"
-A theme can have one or more global properties sections\. If there is more than one, they will be merged\.
-.
-.P
-The global properties section denotes the defaults for each element\. Each property of this section can be referenced with \fB@{identifier}\fR (See Properties section)
-.
-.P
-A global properties section is indicated with a \fB*\fR as element path\.
-.
-.SH "Element theme section"
-A theme can have multiple element theme sections\.
-.
-.P
-The element path can consist of multiple names separated by whitespace or dots\. Each element may contain any number of letters, numbers and \fB\-\fR\'s\. The first element in the element path should always start with a \fB#\fR\. Multiple elements can be specified by a \fB,\fR\.
-.
-.P
+.RE
+
+.PP
+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.
+
+.PP
+The global properties section denotes the defaults for each element.
+Each property of this section can be referenced with \fB\fC@{identifier}\fR
+(See Properties section)
+
+.PP
+A global properties section is indicated with a \fB\fC*\fR as element path.
+
+.SH Element theme section
+.PP
+A theme can have multiple element theme sections.
+
+.PP
+The element path can consist of multiple names separated by whitespace or dots.
+Each element may contain any number of letters, numbers and \fB\fC\-\fR\&'s.
+The first element in the element path should always start with a \fB\fC#\fR\&.
+Multiple elements can be specified by a \fB\fC,\fR\&.
+
+.PP
This is a valid element name:
-.
-.IP "" 4
-.
-.nf
-element normal\.normal {
+.PP
+.RS
+
+.nf
+element normal.normal {
background\-color: blue;
}
button {
background\-color: blue;
}
-.
+
.fi
-.
-.IP "" 0
-.
-.P
+.RE
+
+.PP
And is identical to:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
element normal normal, button {
background\-color: blue;
}
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-Each section inherits the global properties\. Properties can be explicitly inherited from their parent with the \fBinherit\fR keyword\. In the following example:
-.
-.IP "" 4
-.
-.nf
+.RE
+
+.PP
+Each section inherits the global properties. Properties can be explicitly inherited from their parent with the
+\fB\fCinherit\fR keyword.
+In the following example:
+.PP
+.RS
+
+.nf
window {
a: 1;
b: 2;
@@ -185,507 +198,500 @@ mainbox {
b: 4;
c: 8;
}
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-The element \fBmainbox\fR will have the following set of properties (if \fBmainbox\fR is a child of \fBwindow\fR):
-.
-.IP "" 4
-.
-.nf
+.RE
+
+.PP
+The element \fB\fCmainbox\fR will have the following set of properties (if \fB\fCmainbox\fR is a child of \fB\fCwindow\fR):
+
+.PP
+.RS
+.nf
a: 1;
b: 4;
c: 8;
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-If multiple sections are defined with the same name, they are merged by the parser\. If multiple properties with the same name are defined in one section, the last encountered property is used\.
-.
-.SH "Properties Format"
+.RE
+
+.PP
+If multiple sections are defined with the same name, they are merged by the
+parser. If multiple properties with the same name are defined in one section,
+the last encountered property is used.
+
+.SH Properties Format
+.PP
The properties in a section consist of:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
{identifier}: {value};
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-Both fields are mandatory for a property\.
-.
-.P
-The \fBidentifier\fR names the specified property\. Identifiers can consist of any combination of numbers, letters and \'\-\'\. It must not contain any whitespace\. The structure of the \fBvalue\fR defines the type of the property\. The current parser does not define or enforce a certain type of a particular \fBidentifier\fR\. When used, values with the wrong type that cannot be converted are ignored\.
-.
-.P
+.RE
+
+.PP
+Both fields are mandatory for a property.
+
+.PP
+The \fB\fCidentifier\fR names the specified property. Identifiers can consist of any
+combination of numbers, letters and '\-'. It must not contain any whitespace.
+The structure of the \fB\fCvalue\fR defines the type of the property. The current
+parser does not define or enforce a certain type of a particular \fB\fCidentifier\fR\&.
+When used, values with the wrong type that cannot be converted are ignored.
+
+.PP
The current theme format supports different types:
-.
-.IP "\(bu" 4
+
+.RS
+.IP \(bu 2
a string
-.
-.IP "\(bu" 4
+.IP \(bu 2
an integer number
-.
-.IP "\(bu" 4
+.IP \(bu 2
a fractional number
-.
-.IP "\(bu" 4
+.IP \(bu 2
a boolean value
-.
-.IP "\(bu" 4
+.IP \(bu 2
a color
-.
-.IP "\(bu" 4
+.IP \(bu 2
text style
-.
-.IP "\(bu" 4
+.IP \(bu 2
line style
-.
-.IP "\(bu" 4
+.IP \(bu 2
a distance
-.
-.IP "\(bu" 4
+.IP \(bu 2
a padding
-.
-.IP "\(bu" 4
+.IP \(bu 2
a border
-.
-.IP "\(bu" 4
+.IP \(bu 2
a position
-.
-.IP "\(bu" 4
+.IP \(bu 2
a reference
-.
-.IP "\(bu" 4
+.IP \(bu 2
an orientation
-.
-.IP "\(bu" 4
+.IP \(bu 2
a list of keywords
-.
-.IP "\(bu" 4
+.IP \(bu 2
an environment variable
-.
-.IP "\(bu" 4
+.IP \(bu 2
Inherit
-.
-.IP "" 0
-.
-.P
-Some of these types are a combination of other types\.
-.
-.SH "String"
-.
-.IP "\(bu" 4
-Format: \fB"[:print:]+"\fR
-.
-.IP "" 0
-.
-.P
-A string is always surrounded by double quotes (\fB"\fR)\. Between the quotes there can be any printable character\.
-.
-.P
+
+.RE
+
+.PP
+Some of these types are a combination of other types.
+
+.SH String
+.RS
+.IP \(bu 2
+Format: \fB\fC"[:print:]+"\fR
+
+.RE
+
+.PP
+A string is always surrounded by double quotes (\fB\fC"\fR). Between the quotes there can be any printable character.
+
+.PP
For example:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
font: "Awasome 12";
-.
+
.fi
-.
-.IP "" 0
-.
-.P
-The string must be valid UTF\-8\.
-.
-.SH "Integer"
-.
-.IP "\(bu" 4
-Format: \fB[\-+]?[:digit:]+\fR
-.
-.IP "" 0
-.
-.P
-An integer may contain any number\.
-.
-.P
+.RE
+
+.PP
+The string must be valid UTF\-8.
+
+.SH Integer
+.RS
+.IP \(bu 2
+Format: \fB\fC[\-+]?[:digit:]+\fR
+
+.RE
+
+.PP
+An integer may contain any number.
+
+.PP
For examples:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
lines: 12;
-.
+
.fi
-.
-.IP "" 0
-.
-.SH "Real"
-.
-.IP "\(bu" 4
-Format: \fB[\-+]?[:digit:]+(\e\.[:digit:]+)?\fR
-.
-.IP "" 0
-.
-.P
-A real is an integer with an optional fraction\.
-.
-.P
+.RE
+
+.SH Real
+.RS
+.IP \(bu 2
+Format: \fB\fC[\-+]?[:digit:]+(\\.[:digit:]+)?\fR
+
+.RE
+
+.PP
+A real is an integer with an optional fraction.
+
+.PP
For example:
-.
-.IP "" 4
-.
+
+.PP
+.RS
+
.nf
+real: 3.4;
-real: 3\.4;
-.
.fi
-.
-.IP "" 0
-.
-.P
-The following is not valid: \fB\.3\fR, \fB3\.\fR or scientific notation: \fB3\.4e\-3\fR\.
-.
-.SH "Boolean"
-.
-.IP "\(bu" 4
-Format: \fB(true|false)\fR
-.
-.IP "" 0
-.
-.P
-Boolean value is either \fBtrue\fR or \fBfalse\fR\. This is case\-sensitive\.
-.
-.P
+.RE
+
+.PP
+The following is not valid: \fB\fC\&.3\fR, \fB\fC3.\fR or scientific notation: \fB\fC3.4e\-3\fR\&.
+
+.SH Boolean
+.RS
+.IP \(bu 2
+Format: \fB\fC(true|false)\fR
+
+.RE
+
+.PP
+Boolean value is either \fB\fCtrue\fR or \fB\fCfalse\fR\&. This is case\-\&sensitive.
+
+.PP
For example:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
dynamic: false;
-.
+
.fi
-.
-.IP "" 0
-.
-.SH "Color"
-\fBrofi\fR supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4)
-.
-.IP "\(bu" 4
-Format: \fB#{HEX}{3}\fR (rgb)
-.
-.IP "\(bu" 4
-Format: \fB#{HEX}{4}\fR (rgba)
-.
-.IP "\(bu" 4
-Format: \fB#{HEX}{6}\fR (rrggbb)
-.
-.IP "\(bu" 4
-Format: \fB#{HEX}{8}\fR (rrggbbaa)
-.
-.IP "\(bu" 4
-Format: \fBrgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])\fR
-.
-.IP "\(bu" 4
-Format: \fBrgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])\fR
-.
-.IP "\(bu" 4
-Format: \fBhsl[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR
-.
-.IP "\(bu" 4
-Format: \fBhwb[a]( {ANGLE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE}])\fR
-.
-.IP "\(bu" 4
-Format: \fBcmyk( {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE}, {PERCENTAGE} [, {PERCENTAGE} ])\fR
-.
-.IP "\(bu" 4
-Format: \fB{named\-color} [ / {PERCENTAGE} ]\fR
-.
-.IP "" 0
-.
-.P
-The white\-space format proposed in CSS4 is also supported\.
-.
-.P
+.RE
+
+.SH Color
+.PP
+\fBrofi\fP supports the color formats as specified in the CSS standard (1,2,3 and some of CSS 4)
+
+.RS
+.IP \(bu 2
+Format: \fB\fC#{HEX}{3}\fR (rgb)
+.IP \(bu 2
+Format: \fB\fC#{HEX}{4}\fR (rgba)
+.IP \(bu 2
+Format: \fB\fC#{HEX}{6}\fR (rrggbb)
+.IP \(bu 2
+Format: \fB\fC#{HEX}{8}\fR (rrggbbaa)
+.IP \(bu 2
+Format: \fB\fCrgb[a]({INTEGER},{INTEGER},{INTEGER}[, {PERCENTAGE}])\fR
+.IP \(bu 2
+Format: \fB\fCrgb[a]({INTEGER}%,{INTEGER}%,{INTEGER}%[, {PERCENTAGE}])\fR
+.IP \(bu 2
+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
+.IP \(bu 2
+Format: \fB\fC{named\-color} [ / {PERCENTAGE} ]\fR
+
+.RE
+
+.PP
+The white\-space format proposed in CSS4 is also supported.
+
+.PP
The different values are:
-.
-.IP "\(bu" 4
-\fB{HEX}\fR is a hexadecimal number (\'0\-9a\-f\' case insensitive)\.
-.
-.IP "\(bu" 4
-\fB{INTEGER}\fR value can be between 0 and 255 or 0\-100 when representing percentage\.
-.
-.IP "\(bu" 4
-\fB{ANGLE}\fR is the angle on the color wheel, can be in \fBdeg\fR, \fBrad\fR, \fBgrad\fR or \fBturn\fR\. When no unit is specified, degrees is assumed\.
-.
-.IP "\(bu" 4
-\fB{PERCENTAGE}\fR can be between 0\-1\.0, or 0%\-100%
-.
-.IP "\(bu" 4
-\fB{named\-color}\fR is one of the following colors:
-.
-.IP
-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
-.
-.IP "" 0
-.
-.P
+
+.RS
+.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.
+.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.
+.IP \(bu 2
+\fB\fC{PERCENTAGE}\fR can be between 0\-1.0, or 0%\-100%
+.IP \(bu 2
+
+.PP
+\fB\fC{named\-color}\fR is one of the following colors:
+.PP
+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
+
+.PP
For example:
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
background\-color: #FF0000;
-border\-color: rgba(0,0,1, 0\.5);
+border\-color: rgba(0,0,1, 0.5);
text\-color: SeaGreen;
-.
+
.fi
-.
-.IP "" 0
-.
-.P
+.RE
+
+.PP
or
-.
-.IP "" 4
-.
-.nf
+.PP
+.RS
+
+.nf
background\-color: transparent;
text\-color: Black;
-.
+
.fi
-.
-.IP "" 0
-.
-.SH "Text style"
-.
-.IP "\(bu" 4
-Format: \fB(bold|italic|underline|strikethrough|none)\fR
-.
-.IP "" 0
-.
-.P
-Text style indicates how the highlighted text is emphasized\. \fBNone\fR indicates that no emphasis should be applied\.
-.
-.IP "\(bu" 4
-\fBbold\fR: make the text thicker then the surrounding text\.
-.
-.IP "\(bu" 4
-\fBitalic\fR: put the highlighted text in script type (slanted)\.
-.
-.IP "\(bu" 4
-\fBunderline\fR: put a line under the highlighted text\.
-.
-.IP "\(bu" 4
-\fBstrikethrough\fR: put a line through the highlighted text\.
-.
-.IP "\(bu" 4
-\fBsmall caps\fR: emphasise the text using capitalization\.
-.
-.IP "" 0
-.
-.SH "Line style"
-.
-.IP "\(bu" 4
-Format: \fB(dash|solid)\fR
-.
-.IP "" 0
-.
-.P
-Indicates how a line should be drawn\. It currently supports: * \fBdash\fR: a dashed line, where the gap is the same width as the dash * \fBsolid\fR: a solid line
-.
-.SH "Distance"
-.
-.IP "\(bu" 4
-Format: \fB{Integer}px\fR
-.
-.IP "\(bu" 4
-Format: \fB{Real}em\fR
-.
-.IP "\(bu" 4
-Format: \fB{Real}ch\fR
-.
-.IP "\(bu" 4
-Format: \fB{Real}%\fR
-.
-.IP "" 0
-.
-.P
+.RE
+
+.SH Text style
+.RS
+.IP \(bu 2
+Format: \fB\fC(bold|italic|underline|strikethrough|none)\fR
+
+.RE
+
+.PP
+Text style indicates how the highlighted text is emphasized. \fB\fCNone\fR indicates that no emphasis
+should be applied.
+
+.RS
+.IP \(bu 2
+\fB\fCbold\fR: make the text thicker then the surrounding text.
+.IP \(bu 2
+\fB\fCitalic\fR: put the highlighted text in script type (slanted).
+.IP \(bu 2
+\fB\fCunderline\fR: put a line under the highlighted text.
+.IP \(bu 2
+\fB\fCstrikethrough\fR: put a line through the highlighted text.
+.IP \(bu 2
+\fB\fCsmall caps\fR: emphasise the text using capitalization.
+
+.RE
+
+.PP
+.RS
+
+.PP
+For some reason \fB\fCsmall caps\fR does not work on some systems.
+.RE
+
+.SH Line style
+.RS
+.IP \(bu 2
+Format: \fB\fC(dash|solid)\fR
+
+.RE
+
+.PP
+Indicates how a line should be drawn.
+It currently supports:
+ * \fB\fCdash\fR: a dashed line, where the gap is the same width as the dash
+ * \fB\fCsolid\fR: a solid line
+
+.SH Distance
+.RS
+.IP \(bu 2
+Format: \fB\fC{Integer}px\fR
+.IP \(bu 2
+Format: \fB\fC{Real}em\fR
+.IP \(bu 2
+Format: \fB\fC{Real}ch\fR
+.IP \(bu 2
+Format: \fB\fC{Real}%\fR
+
+.RE
+
+.PP
A distance can be specified in 3 different units:
-.
-.IP "\(bu" 4
-\fBpx\fR: Screen pixels\.
-.
-.IP "\(bu" 4
-\fBem\fR: Relative to text height\.
-.
-.IP "\(bu" 4
-\fBch\fR: Relative to width of a single number\.
-.
-.IP "\(bu" 4
-\fB%\fR: Percentage of the \fBmonitor\fR size\.
-.
-.IP "" 0
-.
-.P
-Distances used in the horizontal direction use the monitor width\. Distances in the vertical direction use the monitor height\. For example:
-.
-.IP "" 4
-.
-.nf
+.RS
+.IP \(bu 2
+\fB\fCpx\fR: Screen pixels.
+.IP \(bu 2
+\fB\fCem\fR: Relative to text