Skip to content

feat: add Linux support via kitty terminal and notify-send notifications - #12

Open
javacruft wants to merge 3 commits into
mgreau:mainfrom
javacruft:terminal/feat-kitty-linux-support
Open

feat: add Linux support via kitty terminal and notify-send notifications#12
javacruft wants to merge 3 commits into
mgreau:mainfrom
javacruft:terminal/feat-kitty-linux-support

Conversation

@javacruft

Copy link
Copy Markdown

What

Adds a kitty terminal backend (terminal: kitty) alongside iTerm2 and Ghostty, and makes desktop notifications platform-aware by using notify-send on Linux instead of osascript. Together these make zen fully usable on Linux; kitty works on macOS too.

Why

Both terminal-tab management and notifications currently shell out to AppleScript, which limits zen to macOS. kitty is controlled through its own CLI and notify-send is the standard freedesktop notification tool, so no AppleScript is needed on Linux.

Notes

Each kitty session opens as a new OS window rather than a tab — a focused kitty tab covers the whole window including any splits, which proved disruptive in use. When zen runs inside kitty with allow_remote_control yes, windows are opened from the running instance via kitty @ launch --type=os-window; otherwise it falls back to kitty --detach, starting a separate instance per session. Click-to-resume on notifications remains a terminal-notifier (macOS) feature: notify-send's --action implies --wait, which would block the watch daemon, so on Linux the resume command is shown in the notification body instead. Verified against kitty 0.45.0 and notify-send 0.8.8 on Linux; the default config remains iterm and macOS behavior is unchanged.

🤖 Generated with Claude Code

javacruft and others added 3 commits July 17, 2026 09:29
Adds a kitty backend alongside iTerm2 and Ghostty, enabling zen on
Linux (kitty works on macOS too). Tabs are created via kitty's remote
control protocol (kitty @ launch --type=tab), which requires zen to
run inside kitty with allow_remote_control enabled; otherwise zen
falls back to opening a new detached kitty OS window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Notifications previously always shelled out to osascript, making them
macOS-only. Send now dispatches on runtime.GOOS: Linux uses notify-send
(libnotify), other platforms keep the osascript path.

Click-to-run actions remain a terminal-notifier (macOS) feature:
notify-send's --action flag implies --wait, which would block the
daemon, so on Linux the resume command is appended to the notification
body via the existing fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A focused kitty tab covers the whole OS window, hiding any splits or
work in the current tab. A new OS window is less disruptive and matches
the fallback path's behavior, so both paths now behave the same — remote
control just reuses the running kitty instance instead of starting a
new one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant