macOS: Add macos-dock-drop-folder-behavior (new tab or window) configuration option #8114
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.
This PR adds a new configuration option
macos-dock-drop-folder-behavior
that controls whether folders dropped onto the Ghostty dock icon open in a new tab (default) or a new window.Changes
Configuration Option Added
macos-dock-drop-folder-behavior
tab
(default) - Opens folders in a new tab in the main windowwindow
- Opens folders in a new windowFiles Modified
src/config/Config.zig
MacOSDockDropFolderBehavior
enum withtab
andwindow
values.tab
macos/Sources/Ghostty/Package.swift
MacOSDockDropFolderBehavior
enum to match the Zig enummacos/Sources/Ghostty/Ghostty.Config.swift
macosDockDropFolderBehavior
computed property to access the configuration value from Swiftmacos/Sources/App/macOS/AppDelegate.swift
application(_:openFile:)
method to check the configurationUsage
Add to your Ghostty configuration file:
Motivation
This feature is useful for users (like me!) who prefer window-based workflows over tab-based workflows when opening folders via drag and drop on macOS.