Skip to content

fix(macos): do not prefer tabs when opening documents - #4

Merged
ptaranat merged 2 commits into
mainfrom
fix-window-tabbing
Jul 19, 2026
Merged

fix(macos): do not prefer tabs when opening documents#4
ptaranat merged 2 commits into
mainfrom
fix-window-tabbing

Conversation

@ptaranat

Copy link
Copy Markdown
Owner

Mitigation for new windows opening in the wrong AeroSpace workspace.

AppleWindowTabbingMode was unset, defaulting to fullscreen, under which macOS prefers reusing an existing window over creating a new one. Set to manual.

Known upstream issue: nikitabobko/AeroSpace#1929. Unresolved, maintainer cannot reproduce, reproduces on default config. This is the only mitigation suggested in that thread, so it may not fix it.

Ruled out: no competing window manager; all 8 on-window-detected rules are layout floating for Apple utilities and match neither Ghostty nor Helium.

ptaranat added 2 commits July 19, 2026 16:22
New windows opened from the AeroSpace keybindings (alt-enter for the
terminal, alt-w for the browser) land in the workspace where that app's
first window was created rather than the focused one, and macOS switches
you there.

Not a configuration error: it is a known AeroSpace issue
(nikitabobko/AeroSpace#1929) that reproduces on a default config, and the
maintainer cannot reproduce it. The only mitigation suggested in that thread
is turning off macOS's preference for tabs, which is what this sets.

AppleWindowTabbingMode was unset, so it took the macOS default of
"fullscreen". Under that setting an app prefers reusing an existing window
to creating a new one, which is the behaviour the window manager then has to
chase.

Ruled out while diagnosing: no other window manager is running, and all
eight on-window-detected rules are `layout floating` for Apple utilities,
none of which match Ghostty or Helium.
alt-w put new browser windows in whatever workspace Helium was last used in,
and switched macOS there. alt-enter never had the problem, and the
difference was the mechanism rather than anything workspace-related.

`open -na "Helium"` asks macOS for a new *instance*. Helium is Chromium
based and Chromium is single-instance, so the new process found the running
one, handed the request to it and exited. macOS then activated that existing
instance, which lives wherever it was last used, and the window opened
there.

alt-w now drives the running process's own File > New Window through System
Events, which is exactly what alt-enter does for Ghostty and why that one
has always landed in the right place. Falls back to activating the app when
it is not already running.

This is separate from AeroSpace#1929, the unresolved upstream issue also
mitigated in this branch; that one reproduces on a default config, whereas
this was self-inflicted by the binding.
@ptaranat
ptaranat merged commit 9e5c002 into main Jul 19, 2026
@ptaranat
ptaranat deleted the fix-window-tabbing branch July 19, 2026 20:40

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

ptaranat added a commit that referenced this pull request Jul 31, 2026
Mitigation for new windows opening in the wrong AeroSpace workspace.

`AppleWindowTabbingMode` was unset, defaulting to `fullscreen`, under
which macOS prefers reusing an existing window over creating a new one.
Set to `manual`.

Known upstream issue: nikitabobko/AeroSpace#1929. Unresolved, maintainer
cannot reproduce, reproduces on default config. This is the only
mitigation suggested in that thread, so it may not fix it.

Ruled out: no competing window manager; all 8 `on-window-detected` rules
are `layout floating` for Apple utilities and match neither Ghostty nor
Helium.
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