Skip to content

Cshiyuan/kitty-split-drop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kitty-split-drop

macOS AppleScript Lines MIT Stars

English | 中文


The Problem

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.

Architecture

Architecture

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

Quick Start

git clone https://github.com/Cshiyuan/kitty-split-drop.git
cd kitty-split-drop
./install.sh

The 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.

Usage

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

./uninstall.sh

Removes KittySplit.app. The kitty.conf changes are preserved — manual revert instructions are printed.

Why splits Layout?

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.

Requirements

  • macOS
  • Kitty installed at /Applications/kitty.app

MIT License © 2026 Cshiyuan

About

Drag a folder onto Dock to open a vertical split in Kitty

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors