.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "ROFI\-THEME" "5" "February 2018" "" ""
.
.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
The following is valid:
.
.IP "" 4
.
.nf
// Magic comment\.
property: /* comment */ value;
.
.fi
.
.IP "" 0
.
.P
However, this is not:
.
.IP "" 4
.
.nf
prop/*comment*/erty: value;
.
.fi
.
.IP "" 0
.
.SH "White space"
White space and newlines, like comments, are ignored by the parser\.
.
.P
This:
.
.IP "" 4
.
.nf
property: name;
.
.fi
.
.IP "" 0
.
.P
Is identical to:
.
.IP "" 4
.
.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
/* Global properties section */
* {
// list of properties
}
/* Element theme section\. */
{element path} {
// list of properties
}
{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