Skip to content

Fix workspace ID calculation in grid layout#87

Closed
Schlafhase wants to merge 2 commits into
raybbian:mainfrom
Schlafhase:patch-1
Closed

Fix workspace ID calculation in grid layout#87
Schlafhase wants to merge 2 commits into
raybbian:mainfrom
Schlafhase:patch-1

Conversation

@Schlafhase

Copy link
Copy Markdown

This is my attempt to fix issue #86. Not sure if this works though.

@Schlafhase

Copy link
Copy Markdown
Author

Update: I just tested the patch and it seems to work fine. It may be problematic when using grid layouts other than 3x3 though so it should probably be a config option. I wasn't sure how to do that though

stsolovey pushed a commit to stsolovey/hyprtasking that referenced this pull request Jan 1, 2026
…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
stsolovey pushed a commit to stsolovey/hyprtasking that referenced this pull request Jan 1, 2026
…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
@stsolovey

Copy link
Copy Markdown

I ran into the same issue and found that a one-line fix doesn't fully solve it — the formula-based approach breaks in various edge cases with hyprsplit.

I've submitted #90 with a rewrite that queries actual workspaces from the monitor via getWorkspacesCopy() instead of calculating IDs.

@Schlafhase Schlafhase closed this Jun 12, 2026
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