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

Fixed active workspace selection on hyprland with named workspaces #36

Merged
merged 3 commits into from
Oct 6, 2024

Conversation

f-str
Copy link
Contributor

@f-str f-str commented Oct 5, 2024

When using hyprland workspaces with default names, e.g. as configured the following in the hyprland config:

workspace = 1, defaultName=A
workspace = 2, defaultName=B
...

These names are then used in the IPC communication instead of the workspace IDs (e.g. workspace>>A, focusedmon>>DP-1,A).

But in the current state, i3bar-river expects the workspace ID to be used in these events, which then is used set the active workspace ID, which leads to the following error invalid digit found in string, as the name could be set to any string.

In my changes the string in the IPC events is used to retrieve the actual workspace ID by filtering the vector of workspaces by the provided name.
Note that when no default name is specified in the hyprland config the ID is used a the name, so this does not break.

@MaxVerevkin
Copy link
Owner

Thanks, the change looks good to me.

Before merging please run cargo fmt (it turns out the CI check for formatting was not working all this time 😆).

@MaxVerevkin MaxVerevkin merged commit 778e884 into MaxVerevkin:master Oct 6, 2024
4 checks passed
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.

2 participants