Fix grid layout workspace ID mismatch with split-monitor-workspaces#90
Fix grid layout workspace ID mismatch with split-monitor-workspaces#90stsolovey wants to merge 1 commit into
Conversation
…compatibility Rewrites build_overview_layout() to query actual workspaces from monitor instead of calculating IDs with formula. This fixes workspace ID mismatch when using split-monitor-workspaces or hyprsplit plugins. Changes: - Query workspaces via getWorkspacesCopy() instead of formula calculation - Add virtual workspace IDs for empty grid cells - Remove side effects (rawMonitorFocus, moveWorkspaceToMonitor) - Add .count() guards to init_position(), on_hide(), close_open_lerp(), on_move() Fixes: raybbian#86 Related: raybbian#87
|
This looks promising! Could you explain how exactly the |
|
Thank you for the PR! Unfortunately, this doesn't allow you to place windows on arbitrary workspaces - you can't place a window on the center workspace for example (that workspace then becomes the first workspace for the monitor). Ultimately I'd like a way for workspaces to remember which location they were on (This would enable a new layout) |
|
@raybbian Makes sense. Thanks for the feedback. I've switched to GNOME for now and can't actively test on Hyprland. Feel free to merge or close as you see fit. |
|
@Schlafhase The new approach queries actual workspaces via getWorkspacesCopy() instead of calculating IDs by formula. This makes it compatible with split-monitor-workspaces. Re: fork collaboration — I've switched to GNOME for now, so can't commit to active maintenance. But thanks for the offer. |
Fixes #86
The grid layout uses formula-based workspace ID calculation which doesn't work correctly with split-monitor-workspaces or hyprsplit plugins.
This PR rewrites
build_overview_layout()to query actual workspaces from the monitor viagetWorkspacesCopy()instead of calculating IDs.Changes:
rawMonitorFocus,moveWorkspaceToMonitor).count()guards for safe map accessAlso includes Hyprland 0.53 compatibility from #89.