workspace widget improvements for hyprland#2683
Conversation
|
I'm worried about the display side filtering of the special workspace(s), this bring a de-synchronization between the data (m_cachedState / m_items) some code down the line will potentially use the cached state and it will create bugs. ex: Changing workspace with the mouse-wheel while take into account the special one. So I'd recommend filtering the special workspace at the source : In the backend, don't emit special workspaces from all() / forOutput() at all (they're not useful to any consumer today it seems) |
the code used to identify workspaces by name if the name was set. This poses a problem if the name of the workspace was empty, or if two workspaces have the same name. This refactoring will always use the reported workspace id to identify workspaces when possible.
special workspaces (id < 0) are not returned for all() and forOutput() calls, thus they will not be shown in the workspaces widget
|
the workspaces are now not returned on all() and forOutput() (695281a)
|
|
Thanks again for the PR, I'm merging it. You may wanna double check the "workspacev2" implementation, from Hyprland's wiki the args seems to be {id},{name} and you seem to parse args[1] (the name) as an integer. This would silently fail for any non numeric workspace name. |
you are correct. fixed in #2692 |
Pull Request
workspace widget improvements for hyprland:
Motivation
Type of Change
Mark the relevant option with an "x".
Related Issue
Testing
Describe how you tested your changes and mark the relevant items.
Screenshots / Videos
If applicable, include screenshots or videos to help illustrate your changes.
Checklist
Additional Notes
Add any additional context or follow-up notes for reviewers.