module/river: add support for the ‘mode’ event

Seat status v3 adds a new ‘mode’ event, that informs us of the current
mode (as set by e.g. ‘riverctl enter-mode passthrough’)

The mode is exposed as a tag (named “mode”) on river’s “title”
particle:

  - river:
      title:
        map:
          default: {empty: {}}
          conditions:
            mode == passthrough:
              string: {text: " {mode} ", deco: {background: {color: ff0000ff}}}
This commit is contained in:
Daniel Eklöf 2022-06-02 17:24:42 +02:00
parent a3a0334069
commit c738f1c63d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 60 additions and 7 deletions

View file

@ -19,6 +19,10 @@
* font-shaping: new inheritable configuration option, allowing you to
configure whether strings should be _shaped_ using HarfBuzz, or not
([#159][159]).
* river: support for the new “mode” event present in version 3 of the
river status manager protocol, in the form of a new tag, _”mode”_,
in the `title` particle.
[153]: https://codeberg.org/dnkl/yambar/issues/153
[159]: https://codeberg.org/dnkl/yambar/issues/159