Skip to content

Add All Spaces window scope#27

Merged
peterp merged 1 commit into
mainfrom
support-all-spaces-window-scope
Jun 17, 2026
Merged

Add All Spaces window scope#27
peterp merged 1 commit into
mainfrom
support-all-spaces-window-scope

Conversation

@peterp

@peterp peterp commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Problem

cmdcmd only showed the windows on the current macOS Space. If you kept work spread across Spaces or displays, the overlay could not help you find or jump to those windows.

The both-Command-keys shortcut also felt stuck in one common case. After a clean chord fired, tapping the other Command key again while still holding one Command key did not fire again.

Solution

This PR adds a Window scope setting. The default keeps the old Current Space behavior, and the new All Spaces mode shows windows from other macOS desktops when WindowServer exposes them.

All Spaces mode opens the overlay across displays, labels windows from other Spaces, and switches to the right Space when you pick one. The Command-key shortcut can now repeat after one Command key is released, while still ignoring chords mixed with normal key presses.

Technical Summary

  • Keep Current Space as the default, and persist the new windowScope setting through config generation, settings UI, and a required changeset.
  • Use CGS Space APIs to map windows to Spaces, name Spaces, and request a Space switch before focusing an off-space window.
  • In All Spaces mode, create one overlay window per display and lay out each tile on the display that owns its source window. This avoids one giant cross-display coordinate system.
  • Treat arrow-swap at a display edge as a real window move through Accessibility frame updates. Preserve relative size and position, and keep maximized windows maximized.
  • Remember the moved or picked window through refreshes, because WindowServer can change the window id after a move.
  • Move the Command-chord logic into a small state machine and add --self-test-cmd-chord so the repeat behavior can be checked without opening the app.

@peterp peterp merged commit 2435f71 into main Jun 17, 2026
1 check passed
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