fix(#3239): hide cursor type change behind config flag

also, statically configure the cursor type
This commit is contained in:
Lars-Ragnar A. Haugen
2024-05-15 20:07:28 +02:00
committed by Austin Horstman
parent 6f994c849d
commit 7e2d8ab2a3
2 changed files with 59 additions and 10 deletions

View File

@ -39,6 +39,38 @@ You can apply special styling to any module for when the cursor hovers it.
}
```
## Setting cursor style
Most, if not all, module types support setting the `cursor` option. This is
configured in your `config.jsonc`. If set to `true`, when hovering the module a
"pointer"(as commonly known from web CSS styling `cursor: pointer`) style cursor
will be shown.
There are more cursor types to choose from by setting the `cursor` option to
a number, see Gdk3 official docs for all possible cursor types:
https://docs.gtk.org/gdk3/enum.CursorType.html.
However, note that not all cursor options listed may be available on
your system. If you attempt to use a cursor which is not available, the
application will crash.
Example of enabling pointer(`Gdk::Hand2`) cursor type on a custom module:
```
"custom/my-custom-module": {
...
"cursor": true,
}
```
Example of setting cursor type to `Gdk::Boat`(according to
https://docs.gtk.org/gdk3/enum.CursorType.html#boat):
```
"custom/my-custom-module": {
...
"cursor": 8,
}
```
# SEE ALSO
- *waybar(5)*