i3bar-river
i3bar-river copied to clipboard
Fixed active workspace selection on hyprland with named workspaces
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.