Documentation for sigusr1 and sigusr2 config
This commit is contained in:
@ -151,6 +151,20 @@ The visual display elements for waybar use a CSS stylesheet, see *waybar-styles(
|
||||
default: *false* ++
|
||||
Option to enable reloading the css style if a modification is detected on the style sheet file or any imported css files.
|
||||
|
||||
*on_sigusr1* ++
|
||||
typeof: string ++
|
||||
default: *toggle* ++
|
||||
Action that is performed when receiving SIGUSR1 kill signal. ++
|
||||
Possible values: *show*, *hide*, *toggle*, *reload*, *noop*. ++
|
||||
Default value: *toggle*.
|
||||
|
||||
*on_sigusr2* ++
|
||||
typeof: string ++
|
||||
default: *reload* ++
|
||||
Action that is performed when receiving SIGUSR2 kill signal. ++
|
||||
Possible values: *show*, *hide*, *toggle*, *reload*, *noop*. ++
|
||||
Default value: *reload*.
|
||||
|
||||
# MODULE FORMAT
|
||||
|
||||
You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
|
||||
@ -206,14 +220,35 @@ A minimal *config* file could look like this:
|
||||
Waybar accepts the following signals:
|
||||
|
||||
*SIGUSR1*
|
||||
Toggles the bar visibility (hides if shown, shows if hidden)
|
||||
By default toggles the bar visibility (hides if shown, shows if hidden)
|
||||
*SIGUSR2*
|
||||
Reloads (resets) the bar
|
||||
By default reloads (resets) the bar
|
||||
*SIGINT*
|
||||
Quits the bar
|
||||
|
||||
For example, to toggle the bar programmatically, you can invoke `killall -SIGUSR1 waybar`.
|
||||
|
||||
## User signal configuration
|
||||
|
||||
Config parameters `on_sigusr1` and `on_sigusr2` change what happens when bars receive
|
||||
`SIGUSR1` and `SIGUSR2` signals.
|
||||
|
||||
This means that commands `killall -SIGUSR1 waybar` and `killall -SIGUSR2 waybar`
|
||||
can perform user-configured action.
|
||||
|
||||
It also means that if an external script has the PID of the bar then it can
|
||||
perform more complex `show`/`hide`/`reload` logic for each instance of Waybar.
|
||||
One can find the PID e.g. by doing `pgrep -a waybar` which could then match
|
||||
by config name or other parameters.
|
||||
|
||||
### Kill parameter meanings
|
||||
|
||||
*show* Switches state to visible (per bar).
|
||||
*hide* Switches state to hidden (per bar).
|
||||
*toggle* Switches state between visible and hidden (per bar).
|
||||
*reload* Reloads whole waybar.
|
||||
*noop* Does nothing when the kill signal is received.
|
||||
|
||||
# MULTI OUTPUT CONFIGURATION
|
||||
|
||||
## Limit a configuration to some outputs
|
||||
|
Reference in New Issue
Block a user