Skip to content

feat: add iTerm2 terminal support#15

Open
JacobHNU wants to merge 1 commit into
LinekForge:mainfrom
JacobHNU:feat/iterm2-support
Open

feat: add iTerm2 terminal support#15
JacobHNU wants to merge 1 commit into
LinekForge:mainfrom
JacobHNU:feat/iterm2-support

Conversation

@JacobHNU

@JacobHNU JacobHNU commented Jun 7, 2026

Copy link
Copy Markdown

Summary

Add iTerm2 as a supported terminal emulator, expanding the terminal auto-detection chain.

Changes

  • TerminalAdapter.swift — New ITerm2Terminal class (~40 lines):
    • openTerminal: creates a new iTerm2 window via AppleScript and runs the command
    • focusTerminalWindow: matches PID → TTY → iTerm2 session, then focuses the corresponding window/tab
  • TerminalAdapter.swiftDynamicTerminal.current() updated detection priority:
    • Ghostty (running) → iTerm2 (running) → Terminal.app (fallback)
  • build.sh — Terminal prompt message updated to mention iTerm2

Testing

  • ✅ Compiled successfully on macOS (arm64, macOS 13+)
  • ✅ iTerm2 AppleScript API verified (tty of every session returns active TTYs)
  • ✅ Bundle identifier confirmed: com.googlecode.iterm2

🤖 Generated with Claude Code

- Add ITerm2Terminal class with AppleScript-based open/focus
- Terminal detection priority: Ghostty > iTerm2 > Terminal.app
- Update build.sh prompt to mention iTerm2

Co-Authored-By: Claude Opus 4.8 <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