Port 12 upstream PRs: new commands, format vars, popups & bugfixes (batch C) - #11
Merged
Conversation
Ports nikitabobko#1156. Adds a floating-window branch to ResizeCommand (gated on window.isFloating) that resizes the window's AX frame and recenters it on the resized axis, clamping to the workspace monitor bounds. Adapted to the fork's APIs: getAxRect()/setAxFrame and BinaryExitCode; run() is now async throws. Adds TestWindow.setAxFrame override to record frame mutations and 4 unit tests covering grow/shrink/recenter and monitor-edge clamping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 0945eef)
Note in aerospace-resize.adoc that resize also works on floating windows (kept within the monitor / recentered as needed). Add a ResizeCommandTest case covering maxY (bottom-edge) clamping when growing height near the monitor bottom, complementing the existing right-edge (maxX) test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit ce9666b)
Adds a --sort option to list-windows accepting a comma-separated list of recent, app-name, window-title. Default ordering remains app-name,window-title. Introduces a global windowFocusSequence counter and Window.lastFocusedAt to support the recent sort. The sort comparator is extracted into a testable ListWindowsCommand.sortLess(...). Re-implemented against fork APIs (optional prefetched title, allAlias, Sendable FormatVar). Generated cmdHelpGenerated.swift regenerated from the updated .adoc. Ports nikitabobko#1932 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 0b0f4b4)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 5f4009b)
Add the --sort flag to the list-windows rule in grammar/commands-bnf-grammar.txt (both alternatives) so shell completion knows about it, consistent with how --format is represented. The .adoc synopsis already documented --sort. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit d4f88d8)
When the target workspace is already visible on another monitor, --when-visible controls behavior: focus (default, backward-compatible): focus the workspace in place swap: exchange the active workspaces of the two monitors Adapted to the fork's BinaryExitCode return type and ArgParser/ upcastArgParserFun parser API. Regenerated cmdHelpGenerated.swift via generate-cmd-help.sh. Adds parse tests for the new flag. Ports nikitabobko#1349 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit f5b3a47)
Add the --when-visible (focus|swap) flag to the summon-workspace rule in grammar/commands-bnf-grammar.txt so shell completion offers it. The .adoc synopsis and body already documented it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 9bbdf8d)
Ports nikitabobko#2097. Adds an additive boundaries-action enum case that fails the move command when the newly created implicit container is immediately flattened away by container normalization. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 9f701a0)
Adds a `sticky` layout subcommand that toggles a per-window `isSticky` flag. Sticky floating windows stay visible on non-visible workspaces (unhidden from the corner) and aren't auto-refocused away by the focus cache when they live on a different workspace than the focused one. Adds parse tests for the new `sticky` layout subcommand. Ports nikitabobko#2083 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 97b9b71)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 64b718d)
Add the sticky descriptor to the layout rule in grammar/commands-bnf-grammar.txt alongside the other layout descriptors so shell completion offers it. The .adoc synopsis and body already documented sticky. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 0773c9e)
Resolve the stub workspace for the previous monitor before reassigning the focused workspace to the target monitor, so the stub is computed against the correct prior state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit b2daeb3)
Call workspace.normalizeContainers() at the end of FlattenWorkspaceTreeCommand so residual empty/redundant containers are removed by the command itself, not by callers. Updates the existing test and adds a deeply-nested case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 94c4004)
Previously `workspace next|prev` returned a non-zero exit code with no stderr when the next/prev workspace could not be resolved (e.g. no wrap-around and at the boundary of the list). Emit an explanatory error message instead. Also clarifies the (next|prev) docs to describe how "the list" is derived (stdin vs focused-monitor workspaces). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 0a9bc5d)
Order the menu-bar workspace list by the config persistent-workspaces order first, then alphabetically for the rest. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 60775c2)
Move the persistent-then-alphabetical ordering out of the SwiftUI body into a pure free function sortWorkspacesForMenuBar(_:persistentWorkspaces:), behavior-identical, and have the view call it. Add MenuBarTest covering mixed, all-persistent, none-persistent, missing-persistent, and empty cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit cbfe678)
Adds a %{all} format variable that expands to all available variables for
the object kind. Requires --json and must be used alone (validated with
error messages). Re-implemented against fork APIs (lazy title-var
expansion, list-* CmdArgs); resolved conflict in AeroObjKind, handled new
PlainInterVar.all case in format.swift, and updated TestCommandTest's
expected variable list.
Ports nikitabobko#1708
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 71d08a5)
Adds read-only interpolation variables %{window-parent-container-orientation}
and %{workspace-root-container-orientation}. They expand to "horizontal" or
"vertical"; windows return "NULL-ORIENTATION" for floating and macOS native
(fullscreen/minimized/hidden/popup) windows. Re-implemented against the fork's
lazy title-var expansion (toOrientationResult takes w.window); adapted tests to
AeroObj.window(.forTest(...)) and updated TestCommandTest's expected variable
lists. Dropped the upstream spurious .swift-version change.
Ports nikitabobko#1778
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit a056eb4)
Ports nikitabobko#2080. Adds an additive --root flag to the layout command that operates on the workspace's root tiling container instead of the focused window's parent. Mutually exclusive with --window-id; rejects the tiling/floating window-placement descriptors at parse time. Succeeds on empty or floating-only workspaces. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> (cherry picked from commit 77b03fc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch of fork ports, cherry-picked from
vitorebatista/AeroSpace'sport/*branches (feature/fix/test commits only; their CLAUDE.md/CHANGELOG-FORK infra commits excluded). 19 commits. (Originally #10, stacked on #9; recreated after GitHub closed it on base-branch deletion.)New commands & capabilities
list-windows --sort(recent / app-name / window-title, comma-separated)summon-workspace --when-visible(focus|swap)move … create-implicit-container-or-failboundaries actionlayout sticky— sticky floating windows (shown on all workspaces of their monitor)--rootflag forlayoutcommand to target the workspace root container nikitabobko/AeroSpace#2080layout --root— target the workspace root container%{all}format variable (JSON-only)Bugfixes & UX
workspace next|prev: emit error when relative workspace can't resolveConflict resolutions / fork-specific decisions
list-windows --sortdefault: upstream defaults toapp-name,window-title; our fork defaults to empty = preserve tree traversal order (aero-helper consumes that for tiling position).--sortis opt-in. Docs/tests updated accordingly.layout --root+ our fork layouts: upstream refactored window-layout logic into achangeWindowLayouthelper +tilingMapping. Merged so our fork'sunmanagedandstickylayout descriptors are preserved (added to the helper switch,tilingMapping,TilingContainer.matchesDescription), and--rootrejects all four window-placement modes (tiling/floating/unmanaged/sticky) at parse time.%{all}/ orientation vars: merged additively with our fork's extra format vars (window-x/y/width/height/tree-index,monitor-width/height); canonical var order is orientation-var-immediately-after-its-layout-var, then fork extras. All possible-values test strings updated to match.Verification
-warnings-as-errorsscript/generate-cmd-help.shproduces no diff (generated help in sync)All 12 source PRs verified still-open upstream at port time.