Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules/river/tags: use toggle-tags to determine focused/occupied/urgent status #3382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arthomnix
Copy link

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 the set-tags or toggle-tags value in the config. In my config, I have tags counting down from 30 for certain applications (the characters after 9 in tag-labels are Nerd Fonts icons for Firefox, Discord, KeePass and Thunderbird respectively):

    "river/tags": {
        "num-tags": 13,
        "tag-labels": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "󰈹", "", "", ""],
        "set-tags": [
            1,
            2,
            4,
            8,
            16,
            32,
            64,
            128,
            256,
            1073741824,
            536870912,
            268435456,
            134217728
        ],
        "toggle-tags": [
            1,
            2,
            4,
            8,
            16,
            32,
            64,
            128,
            256,
            1073741824,
            536870912,
            268435456,
            134217728
        ]
    },

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 and toggle-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 if toggle-tags is not specified. toggle-tags is used instead of set-tags to support "sticky tag" configurations (as in the wiki example).

@Alexays Alexays force-pushed the master branch 2 times, most recently from d623a89 to a4d31ab Compare September 13, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant