summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2021-07-02 18:01:46 +0200
committerDave Davenport <qball@gmpclient.org>2021-07-02 18:01:46 +0200
commitf5aa88acfdf55678b32eca33998b0c70e7741259 (patch)
tree8ac776c4ae66d96423e7ed2a50982079d9811eac
parent0c304524fb49e641d3da1a86a39f654cf162ca49 (diff)
[Doc] Update rofi theme manpage with some examples and fixes.
-rw-r--r--doc/rofi-theme.575
-rw-r--r--doc/rofi-theme.5.markdown77
2 files changed, 124 insertions, 28 deletions
diff --git a/doc/rofi-theme.5 b/doc/rofi-theme.5
index f9ff8bfc..acd915b1 100644
--- a/doc/rofi-theme.5
+++ b/doc/rofi-theme.5
@@ -1257,9 +1257,9 @@ The current layout of \fBrofi\fP is structured as follows:
| | mainbox {BOX:vertical} | |
| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |
| | | inputbar {BOX:horizontal} | | |
-| | | |\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-| | | |
-| | | | prompt | | entry | |ci | | | |
-| | | |\-\-\-\-\-\-\-\-\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| |\-\-\-| | | |
+| | | |\-\-\-\-\-\-\-\-\-| |\-| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-| |\-\-\-| |\-\-\-| |\-\-\-| | | |
+| | | | prompt | |:| | entry |#fr| | / | |#ns| |ci | | | |
+| | | |\-\-\-\-\-\-\-\-\-| |\_| |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-|\-\-\-| |\-\-\-| |\-\-\-| |\-\-\-| | | |
| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |
| | | |
| | |\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-| | |
@@ -1292,6 +1292,8 @@ The current layout of \fBrofi\fP is structured as follows:
.PP
ci is the case\-indicator
+fr is the num\-filtered\-rows
+ns is the num\-rows
.RE
.SS Error message structure
@@ -1363,23 +1365,70 @@ Any widget name starting with \fB\fCtextbox\fR is a textbox widget, others are b
.PP
There are several special widgets that can be used by prefixing the name of the widget:
+.SS textbox
+.PP
+This is a read\-only textbox widget. The displayed string can be set with \fB\fCcontent\fR\&.
+
+.PP
+Example:
+
+.PP
.RS
-.IP \(bu 2
-\fB\fCtextbox\fR:
-This is a textbox widget. The displayed string can be set with \fB\fCstr\fR\&.
-.IP \(bu 2
-\fB\fCicon\fR:
+
+.nf
+textbox\-custom {
+ expand: false;
+ content: "My Message";
+}
+
+.fi
+.RE
+
+.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).
-.IP \(bu 2
-\fB\fCbutton\fR:
+
+.PP
+Example:
+
+.PP
+.RS
+
+.nf
+icon\-paste {
+ expand: false;
+ filename: "gtk\-paste";
+ size: 24;
+ vertical\-align: 0.5;
+ action: "kb\-primary\-paste";
+}
+
+.fi
+.RE
+
+.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 keybinging name and completes that action. (see rofi \-show keys for a list).
+.PP
+.RS
+
+.nf
+button\-paste {
+ expand: false;
+ content: "My Clickable Message";
+ vertical\-align: 0.5;
+ action: "kb\-primary\-paste";
+}
+
+.fi
.RE
+.SS Children
.PP
To specify children, set the \fB\fCchildren\fR
property (this always happens on the \fB\fCbox\fR child, see example below):
@@ -1388,7 +1437,9 @@ property (this always happens on the \fB\fCbox\fR child, see example below):
.RS
.nf
-children: [prompt,entry,overlay,case\-indicator];
+inputbar {
+ children: [prompt,entry,overlay,case\-indicator];
+}
.fi
.RE
@@ -1576,7 +1627,7 @@ To test minor changes, part of the theme can be passed on the command line, for
.RS
.nf
-rofi \-theme\-str '#window { fullscreen:true;}' \-show run
+rofi \-theme\-str 'window { fullscreen:true;}' \-show run
.fi
.RE
diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown
index a0170665..80a34b41 100644
--- a/doc/rofi-theme.5.markdown
+++ b/doc/rofi-theme.5.markdown
@@ -771,9 +771,9 @@ The current layout of **rofi** is structured as follows:
| | mainbox {BOX:vertical} | |
| | |---------------------------------------------------------------------------| | |
| | | inputbar {BOX:horizontal} | | |
-| | | |---------| |-----------------------------------------------------| |---| | | |
-| | | | prompt | | entry | |ci | | | |
-| | | |---------| |-----------------------------------------------------| |---| | | |
+| | | |---------| |-| |---------------------------------|---| |---| |---| |---| | | |
+| | | | prompt | |:| | entry |#fr| | / | |#ns| |ci | | | |
+| | | |---------| |_| |---------------------------------|---| |---| |---| |---| | | |
| | |---------------------------------------------------------------------------| | |
| | | |
| | |---------------------------------------------------------------------------| | |
@@ -799,6 +799,8 @@ 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
### Error message structure
@@ -844,22 +846,65 @@ Any widget name starting with `textbox` is a textbox widget, others are box widg
There are several special widgets that can be used by prefixing the name of the widget:
-* `textbox`:
- This is a textbox widget. The displayed string can be set with `str`.
-* `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).
-* `button`:
- This is a textbox widget that can have a 'clickable' action.
- The `action` can be set to:
- `keybinding`: accepts a keybinging name and completes that action. (see rofi -show keys for a list).
+#### textbox
+
+This is a read-only textbox widget. The displayed string can be set with `content`.
+
+
+Example:
+
+```css
+textbox-custom {
+ expand: false;
+ content: "My Message";
+}
+```
+
+#### 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).
+
+
+Example:
+
+```css
+icon-paste {
+ expand: false;
+ filename: "gtk-paste";
+ size: 24;
+ vertical-align: 0.5;
+ action: "kb-primary-paste";
+}
+```
+
+
+#### button
+
+This is a textbox widget that can have a 'clickable' action.
+The `action` can be set to:
+`keybinding`: accepts a keybinging name and completes that action. (see rofi -show keys for a list).
+
+```css
+button-paste {
+ expand: false;
+ content: "My Clickable Message";
+ vertical-align: 0.5;
+ action: "kb-primary-paste";
+}
+```
+
+
+#### Children
To specify children, set the `children`
property (this always happens on the `box` child, see example below):
-```
-children: [prompt,entry,overlay,case-indicator];
+```css
+inputbar {
+ children: [prompt,entry,overlay,case-indicator];
+}
```
The theme needs to be updated to match the hierarchy specified.
@@ -997,7 +1042,7 @@ 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:
```
-rofi -theme-str '#window { fullscreen:true;}' -show run
+rofi -theme-str 'window { fullscreen:true;}' -show run
```
To print the current theme, run: