Add shape and timeout to notification example in README
This commit is contained in:
parent
f469d040fc
commit
0f1a1c726b
10
README.md
10
README.md
|
@ -92,18 +92,20 @@ It **must** contain the following properties:
|
||||||
Optionally, it can also have the `message` property that should be a string
|
Optionally, it can also have the `message` property that should be a string
|
||||||
with a custom warning message.
|
with a custom warning message.
|
||||||
|
|
||||||
For example, one could add a warning with a custom message, a black foreground
|
For example, one could add a warning with a custom message that times out after
|
||||||
color and yellow background color once the battery discharges below 15% as
|
12 seconds, the shape of a rounded rectangle, a black foreground color and
|
||||||
follows:
|
yellow background color once the battery discharges below 15% as follows:
|
||||||
|
|
||||||
``` lua
|
``` lua
|
||||||
widget.warning_config = {
|
widget.warning_config = {
|
||||||
percentage = 15,
|
percentage = 15,
|
||||||
|
message = "The battery is getting low",
|
||||||
preset = {
|
preset = {
|
||||||
|
shape = gears.shape.rounded_rect,
|
||||||
|
timeout = 12,
|
||||||
bg = "#FFFF00",
|
bg = "#FFFF00",
|
||||||
fg = "#000000",
|
fg = "#000000",
|
||||||
},
|
},
|
||||||
message = "The battery is getting low",
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue