mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-06-05 11:24:13 +00:00
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 - **Option name**: `macos-dock-drop-folder-behavior` - **Valid values**: - `tab` (default) - Opens folders in a new tab in the main window - `window` - Opens folders in a new window - **Platform**: macOS only ### Files Modified 1. **`src/config/Config.zig`** - Added `MacOSDockDropFolderBehavior` enum with `tab` and `window` values - Added configuration field with default value of `.tab` - Added documentation explaining the option 2. **`macos/Sources/Ghostty/Package.swift`** - Added `MacOSDockDropFolderBehavior` enum to match the Zig enum 3. **`macos/Sources/Ghostty/Ghostty.Config.swift`** - Added `macosDockDropFolderBehavior` computed property to access the configuration value from Swift 4. **`macos/Sources/App/macOS/AppDelegate.swift`** - Modified `application(_:openFile:)` method to check the configuration - When a folder is dropped on the dock icon, it now respects the user's preference ## Usage Add to your Ghostty configuration file: ``` macos-dock-drop-folder-behavior = window ``` ## 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.