mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
[Doc] Update rofi-theme documentation.
allow `content` as alias to `str` on textbox.
This commit is contained in:
parent
cd06d593b2
commit
e9dde8e2ac
3 changed files with 1226 additions and 1137 deletions
2318
doc/rofi-theme.5
2318
doc/rofi-theme.5
File diff suppressed because it is too large
Load diff
|
@ -64,7 +64,7 @@ name
|
|||
The preferred file extension for the new theme format is **rasi**. This is an
|
||||
abbreviation for **r**ofi **a**dvanced **s**tyle **i**nformation.
|
||||
|
||||
## BASIC STRUCTURE
|
||||
## Basic Structure
|
||||
|
||||
Each element has a section with defined properties. Global properties can be defined in section `* { }`.
|
||||
Sub-section names begin with a hash symbol `#`.
|
||||
|
@ -137,6 +137,7 @@ In the following example:
|
|||
window {
|
||||
a: 1;
|
||||
b: 2;
|
||||
children: [ mainbox ];
|
||||
}
|
||||
mainbox {
|
||||
a: inherit;
|
||||
|
@ -157,7 +158,7 @@ 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.
|
||||
|
||||
## PROPERTIES FORMAT
|
||||
## Properties Format
|
||||
|
||||
The properties in a section consist of:
|
||||
|
||||
|
@ -359,7 +360,7 @@ and right side and 108 pixels on the top and bottom.
|
|||
* Format: `{Distance} {Distance} {Distance}`
|
||||
* Format: `{Distance} {Distance} {Distance} {Distance}`
|
||||
|
||||
If no unit is specified, pixels are used.
|
||||
If no unit is specified, pixels are assumed.
|
||||
|
||||
The different number of fields in the formats are parsed like:
|
||||
|
||||
|
@ -384,6 +385,8 @@ The different number of fields in the formats are parsed like:
|
|||
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.
|
||||
|
@ -509,16 +512,20 @@ The current widgets available in **rofi**:
|
|||
* `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.
|
||||
* `listview`: The listview.
|
||||
* `scrollbar`: the listview scrollbar
|
||||
* `element`: the entries in the listview
|
||||
* `element`: a box in the listview holding the entries
|
||||
* `element-icon`: the widget in the listview's entry showing the (optional) icon
|
||||
* `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
|
||||
element paths.
|
||||
elements, and structure.
|
||||
|
||||
|
||||
## State
|
||||
|
@ -590,7 +597,6 @@ The following properties are currently supported:
|
|||
Background color
|
||||
* **border-color**: color
|
||||
Color of the border
|
||||
* **index**: integer (This one does not inherit it value from the parent widget)
|
||||
|
||||
### window:
|
||||
|
||||
|
@ -635,14 +641,16 @@ The following properties are currently supported:
|
|||
|
||||
* **background-color**: color
|
||||
* **border-color**: the color used for the border around the widget.
|
||||
* **font**: the font used by this textbox (string)
|
||||
* **str**: the string to display by this textbox (string)
|
||||
* **vertical-align**: vertical alignment of the text (`0` top, `1` bottom)
|
||||
* **horizontal-align**: horizontal alignment of the text (`0` left, `1` right)
|
||||
* **text-color**: the text color to use
|
||||
* **highlight**: text style {color}
|
||||
* **font**: the font used by this textbox (string).
|
||||
* **str**: the string to display by this textbox (string).
|
||||
* **vertical-align**: vertical alignment of the text (`0` top, `1` bottom).
|
||||
* **horizontal-align**: horizontal alignment of the text (`0` left, `1` right).
|
||||
* **text-color**: the text color to use.
|
||||
* **highlight**: text style {color}.
|
||||
color is optional, multiple highlight styles can be added like: bold underline italic #000000;
|
||||
* **width**: override the desired width for the textbox
|
||||
* **width**: override the desired width for the textbox.
|
||||
* **content**: Set the displayed text (String).
|
||||
* **blink**: Enable/Disable blinking on an input textbox (Boolean).
|
||||
|
||||
### listview:
|
||||
* **columns**: integer
|
||||
|
@ -663,6 +671,12 @@ The following properties are currently supported:
|
|||
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).
|
||||
* **fixed-columns**: boolean
|
||||
Do not reduce the number of columns shown when number of visible elements is not enough to fill them all.
|
||||
|
||||
Each element is a `box` called `element`. Each `element` can contain an `element-icon` and `element-text`.
|
||||
|
||||
## Layout
|
||||
|
||||
|
|
|
@ -189,6 +189,9 @@ textbox* textbox_create ( widget *parent, WidgetType type, const char *name, Tex
|
|||
}
|
||||
|
||||
const char *txt = rofi_theme_get_string ( WIDGET ( tb ), "str", text );
|
||||
if ( !txt ){
|
||||
txt = rofi_theme_get_string ( WIDGET ( tb ), "content", text );
|
||||
}
|
||||
textbox_text ( tb, txt ? txt : "" );
|
||||
textbox_cursor_end ( tb );
|
||||
|
||||
|
|
Loading…
Reference in a new issue