module/i3: add ‘strip-workspace-numbers’ option

This is a boolean option. When set, “N:” prefixes will be stripped
from the workspaces’ name tag, *after* having been sorted (if the
‘sort’ option is being used).

This makes it useful to arrange the workspaces in a fixed order, by
prefixing the names with a number in the Sway config:

  set $ws1 “1:xyz”
  set $ws2 “2:abc”

Then, in the yambar config:

  i3:
    sort: ascending
    strip-workspace-numbers: true
This commit is contained in:
Daniel Eklöf 2022-02-11 21:44:43 +01:00
parent 605490c872
commit a2cf05a64d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 34 additions and 5 deletions

View file

@ -16,6 +16,7 @@
(https://codeberg.org/dnkl/yambar/issues/153).
* overline: new decoration
(https://codeberg.org/dnkl/yambar/issues/153).
* i3/sway: boolean option `strip-workspace-numbers`.
### Changed