English | 中文
On macOS, dragging a folder onto Kitty opens a new OS window. There is no config to change this.
kitty-split-drop fixes it — one drag, one vertical split.
Under the Hood
| Step | What happens |
|---|---|
| 1 | You drop a folder on the Dock icon. macOS fires an openFile Apple Event to KittySplit.app. |
| 2 | The app locates the running Kitty instance via Unix socket at /tmp/kitty-socket-*. |
| 3 | Sends kitten @ goto-layout splits — switches to the only layout that supports vsplit. |
| 4 | Sends kitten @ launch --type=window --location=vsplit --cwd=<path> — creates the pane. |
| 5 | Brings Kitty to the foreground via tell application "kitty" to activate. |
The entire logic is ~35 lines of AppleScript, compiled into a native .app bundle via osacompile.
Tech stack: AppleScript · kitten remote control · Unix sockets · osacompile
git clone https://github.com/Cshiyuan/kitty-split-drop.git
cd kitty-split-drop
./install.shThe installer will:
| # | Action |
|---|---|
| 1 | Compile KittySplit.app → ~/Applications/ |
| 2 | Add allow_remote_control yes to kitty.conf |
| 3 | Add listen_on unix:/tmp/kitty-socket to kitty.conf |
| 4 | Ensure splits layout is enabled |
Then:
1. Restart Kitty (listen_on requires restart)
2. Drag KittySplit.app from ~/Applications to your Dock
3. Done.
Drag any folder from Finder onto the KittySplit icon in your Dock.
A new vertical split appears in your current Kitty tab, with the shell starting in that folder. Kitty automatically comes to the foreground.
./uninstall.shRemoves KittySplit.app. The kitty.conf changes are preserved — manual revert instructions are printed.
Kitty has multiple layout managers (grid, tall, fat, splits, etc.). The --location=vsplit parameter only works with the splits layout — other layouts ignore it and use their own placement algorithm. The app switches to splits before creating the pane to ensure predictable vertical split behavior.
- macOS
- Kitty installed at
/Applications/kitty.app
MIT License © 2026 Cshiyuan