feat: add Linux support via kitty terminal and notify-send notifications - #12
Open
javacruft wants to merge 3 commits into
Open
feat: add Linux support via kitty terminal and notify-send notifications#12javacruft wants to merge 3 commits into
javacruft wants to merge 3 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 viakitty @ launch --type=os-window; otherwise it falls back tokitty --detach, starting a separate instance per session. Click-to-resume on notifications remains a terminal-notifier (macOS) feature: notify-send's--actionimplies--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 remainsitermand macOS behavior is unchanged.🤖 Generated with Claude Code