Repository navigation
macOS: Split drag move - #10090
Merged
Merged
macOS: Split drag move#10090
Conversation
This was referenced Dec 29, 2025
mitchellh
force-pushed
the
split-drag
branch
from
December 29, 2025 14:55
6cf4346 to
cfa3de5
Compare
|
This is so cool! I just realize that the last ghostty release is from last October, so to use this I actually have to build from source, or is there some release planned? |
Member
|
1.3 is scheduled to release in March. https://ghostty.org/docs/install/release-notes/1-2-0#moving-to-a-marchseptember-release-cycle |
|
Hi @mitchellh, was wondering if there's a built-in way to turn this feature off. I'm not planning on using it but I don't like the look of the grab handle being there when my mouse is on a split. Any way to hide it? |
Contributor
|
Not presently, open a new discussion if one doesn't already exist. Edit: #10108. |
Contributor
|
Also xref #10280, see the last few comments, looks like a feature or vouch request for shrinking the handle's mouse tracking area would be welcome. |
jemal
added a commit
to jemal/ghostty
that referenced
this pull request
Jul 14, 2026
Adds a move_split action (up/down/left/right) that swaps the active split with its nearest spatial neighbor, scoped to the current split tree so splits can't be moved across tabs or windows. GTK-only; no default keybind is set, bind it yourself e.g. `keybind = alt+shift+h=move_split:left`. The tree-manipulation core (SplitTree.moveSplit, plus a locate() helper on the datastruct split tree) is adapted from upstream's in-progress mouse drag-and-drop implementation (ghostty-org#10423, itself a GTK port of macOS PR ghostty-org#10090), but exposed here via a keybind instead of a drag handle, per issue ghostty-org#10224. Plumbing follows the existing goto_split action end-to-end: a new MoveSplit C-ABI enum in apprt/action.zig + include/ghostty.h (appended at the end for ABI compatibility), a Binding.zig keybind action and command palette entries, and dispatch through Surface.zig into the gtk apprt.
pluiedev
added a commit
to pluiedev/ghostty
that referenced
this pull request
Aug 5, 2026
One major todo is moving splits across different split trees (i.e. moving across tabs and windows), but that would involve a lot more logic. This MVP version works for now. GTK version of ghostty-org#10090 Closes ghostty-org#10224
jcollie
added a commit
that referenced
this pull request
Aug 5, 2026
One major todo is moving splits across different split trees (i.e. moving across tabs and windows), but that would involve a lot more logic. This MVP version works for now. Video demo (somehow the encode quality is terrible - I'll fix this later): https://github.com/user-attachments/assets/a5029451-9641-4680-bff6-38f52ebded4b GTK version of #10090 Closes #10224
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.
Related to #1525
This implements a Mouse-only approach to moving splits. When you hover near the top of a split, a grab handle now appears that can be used to drag the split into any other split position.
Note
This PR only lets you move splits to other split positions. I will create follow-up issues to track moving a split out into a new tab or window.
Demo
CleanShot.2025-12-29.at.06.37.17.mp4
Other Notes
This PR also lays a ton of the groundwork on macOS for surfaces to be draggable and copyable (pasteboard) in general. That isn't used yet but there might be some interesting ideas here like pasting screenshots by simply dragging the surface. I don't know!