mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
Added documentation for discriminated on-click events
This commit is contained in:
parent
1bb77e59f3
commit
f7206ef08d
1 changed files with 43 additions and 2 deletions
|
@ -36,15 +36,56 @@ following attributes are supported by all particles:
|
||||||
: no
|
: no
|
||||||
: Foreground (text) color. Just like _font_, this is an inherited attribute.
|
: Foreground (text) color. Just like _font_, this is an inherited attribute.
|
||||||
| on-click
|
| on-click
|
||||||
|
: associative array/string
|
||||||
|
: no
|
||||||
|
: When set to a string, executes the string as a command when the particle
|
||||||
|
is left-clicked. Tags can be used. Note that the string is *not*
|
||||||
|
executed in a shell. The same applies to all attributes associated with
|
||||||
|
it, below.
|
||||||
|
| on-click.left
|
||||||
: string
|
: string
|
||||||
: no
|
: no
|
||||||
: Command to execute when the particle is clicked. Tags can be
|
: Command to execute when the particle is left-clicked.
|
||||||
used. Note that the string is *not* executed in a shell.
|
| on-click.right
|
||||||
|
: string
|
||||||
|
: no
|
||||||
|
: Command to execute when the particle is right-clicked.
|
||||||
|
| on-click.middle
|
||||||
|
: string
|
||||||
|
: no
|
||||||
|
: Command to execute when the particle is middle-clicked.
|
||||||
|
| on-click.wheel-up
|
||||||
|
: string
|
||||||
|
: no
|
||||||
|
: Command to execute every time a 'wheel-up' event is triggered.
|
||||||
|
| on-click.wheel-down
|
||||||
|
: string
|
||||||
|
: no
|
||||||
|
: Command to execute every time a 'wheel-down' event is triggered.
|
||||||
| deco
|
| deco
|
||||||
: decoration
|
: decoration
|
||||||
: no
|
: no
|
||||||
: Decoration to apply to the particle. See *yambar-decorations*(5)
|
: Decoration to apply to the particle. See *yambar-decorations*(5)
|
||||||
|
|
||||||
|
## EXAMPLES:
|
||||||
|
|
||||||
|
*on-click* as a string (handles left click):
|
||||||
|
```
|
||||||
|
content:
|
||||||
|
<particle>:
|
||||||
|
on-click: command args
|
||||||
|
```
|
||||||
|
|
||||||
|
*on-click* as an associative array (handles other buttons):
|
||||||
|
```
|
||||||
|
content:
|
||||||
|
<particle>:
|
||||||
|
on-click:
|
||||||
|
left: command-1
|
||||||
|
wheel-up: command-3
|
||||||
|
wheel-down: command-4
|
||||||
|
```
|
||||||
|
|
||||||
# STRING
|
# STRING
|
||||||
|
|
||||||
This is the most basic particle. It takes a format string, consisting
|
This is the most basic particle. It takes a format string, consisting
|
||||||
|
|
Loading…
Add table
Reference in a new issue