Skip to content

feat: add option to sync layout across all workspaces#557

Open
thameem-abbas wants to merge 1 commit into
domferr:mainfrom
thameem-abbas:feat/sync-layout-across-workspaces
Open

feat: add option to sync layout across all workspaces#557
thameem-abbas wants to merge 1 commit into
domferr:mainfrom
thameem-abbas:feat/sync-layout-across-workspaces

Conversation

@thameem-abbas
Copy link
Copy Markdown

Summary

  • Adds a new sync-layout-across-workspaces boolean setting (default: off)
  • When enabled, selecting a layout on any workspace applies it to all workspaces for that monitor
  • Toggle appears in the Behaviour section of extension preferences

How it works

The sync logic is centralized in GlobalState.setSelectedLayoutOfMonitor() — when the setting is enabled, it iterates all workspace slots and sets the same layout. All existing callers (panel indicator click, keyboard layout cycling, snap-assist sync) get the behavior automatically with zero changes.

Files changed

  • gschema.xml — new boolean key
  • src/settings/settings.ts — KEY constant + getter/setter
  • src/utils/globalState.ts — sync branch in setSelectedLayoutOfMonitor()
  • src/prefs.ts — toggle in Behaviour group

Test plan

  • Enable setting, select layout on workspace 1, switch to workspace 2 — same layout shown
  • Multi-monitor: sync on monitor 1 doesn't affect monitor 2
  • Keyboard cycle layouts with sync enabled — all workspaces update
  • Disable setting — per-workspace behavior restored
  • New workspace created while sync enabled — inherits synced layout
  • Toggle appears in Behaviour section of preferences

🤖 Generated with Claude Code

Layout selection is per-workspace by default. This adds a toggle
in Behaviour settings that, when enabled, applies the selected
layout to all workspaces instead of just the active one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant