summaryrefslogtreecommitdiffstats
path: root/doc/rofi-theme.5.markdown
diff options
context:
space:
mode:
authorDave Davenport <qball@blame.services>2021-09-01 21:27:25 +0200
committerDave Davenport <qball@blame.services>2021-09-01 21:27:25 +0200
commit68e79b66a948473308bfa2fccf850c300028ec1a (patch)
tree7b078356cf91f211518e67b13a6c0c8de218dfe2 /doc/rofi-theme.5.markdown
parent6715c596824e5bbe1924c975a83e8b20d2ada6bb (diff)
[Grammar] Add support for env();
Add support for `env(ENV,default)`. Fixes: #1411
Diffstat (limited to 'doc/rofi-theme.5.markdown')
-rw-r--r--doc/rofi-theme.5.markdown31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/rofi-theme.5.markdown b/doc/rofi-theme.5.markdown
index ba96ead3..c2c726f9 100644
--- a/doc/rofi-theme.5.markdown
+++ b/doc/rofi-theme.5.markdown
@@ -470,6 +470,23 @@ window {
}
```
+* 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.
+
+Example:
+
+```css
+window {
+ width: var( width, 30%);
+}
+```
+
+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)`
@@ -502,6 +519,20 @@ The environment variable should be an alphanumeric string without white-space.
}
```
+* 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.
+
+```css
+window {
+ width: env(WIDTH, 40%);
+}
+```
+
+If environment WIDTH is set, then that value is parsed, otherwise the default value (`40%`).
+
## Inherit
* Format: `inherit`