modules/river/tags: use toggle-tags to determine focused/occupied/urgent status #3382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
river/tags
module uses the index of each button to determine the tag to use when determining focused/occupied/urgent status, rather than using theset-tags
ortoggle-tags
value in the config. In my config, I have tags counting down from 30 for certain applications (the characters after 9 intag-labels
are Nerd Fonts icons for Firefox, Discord, KeePass and Thunderbird respectively):The current implementation means that tag 10 (512) is used for the Firefox button when determining focused/occupied/urgent status, even though the
set-tags
andtoggle-tags
values are both 30 (1073741824). In other words, the button appears occupied when tag 10 is activated, even though the button actually controls tag 30.This PR changes this behaviour to use the
toggle-tags
value, falling back to the previous behaviour iftoggle-tags
is not specified.toggle-tags
is used instead ofset-tags
to support "sticky tag" configurations (as in the wiki example).