Commit graph

38 commits

Author SHA1 Message Date
Lawrence Chen
fd756dccce
Stop seeding shell env with full app environment (#28)
`surfaceConfig.env_vars` are overrides layered on top of Ghostty's
default subprocess environment. Starting the env map from
`ProcessInfo.processInfo.environment` re-introduced variables that
Ghostty intentionally strips (e.g. LANGUAGE, Xcode DYLD vars),
bypassing its env filtering.

Start with an empty map and add `getenv()` fallbacks for PATH, SHELL,
ZDOTDIR, and GHOSTTY_RESOURCES_DIR so critical values are still
resolved without leaking the full app environment.
2026-02-09 12:28:23 -08:00
Lawrence Chen
e9c5917c66
Fix zsh autosuggestions shared history in cmuxterm (#26)
- Restore real ZDOTDIR early in zsh startup so HISTFILE uses user history\n- Preserve user ZDOTDIR without treating Ghostty injected ZDOTDIR as user\n- Add regression tests and terminfo overlay for bright colors
2026-02-09 02:35:20 -08:00
Lawrence Chen
7e69751e1b
Sidebar metadata + tagged reload isolation (#16)
* Sidebar primitives + tagged dev isolation

* Allow wider sidebar resize

* Fix tagged socket selection + panel id errors

* Fix progress label quoting + bundle suffix sanitize

* Skip ctrl-enter keybind test when keystrokes blocked

* Fix shell nc hang + prune stale per-surface sidebar metadata
2026-02-06 18:09:56 -08:00
Lawrence Chen
cc71e5797e
Add sidebar blur effect with withinWindow blending (#9)
* Add sidebar blur effect with withinWindow blending

- Add NSVisualEffectView-based blur backdrop for sidebar
- Support withinWindow blending mode to blur terminal content behind sidebar
- Auto-switch to overlay layout when withinWindow mode is selected
- Add sidebar debug panel with material, blending, tint, and opacity controls
- Add preset options (HUD Glass, Popover Glass, etc.)
- Default to HUD Glass preset with withinWindow blur

* Simplify tab close button visibility and remove hover background

Show close button only on hover instead of when active/multi-selected.
Remove the hover background color from tabs for cleaner appearance.

* Add config reload support with notification system

- Add reloadConfiguration() methods for app-wide and per-surface reload
- Handle GHOSTTY_ACTION_RELOAD_CONFIG action from Ghostty
- Add ghosttyConfigDidReload notification for views to react
- TerminalSplitTreeView reloads GhosttyConfig on notification
- Add openConfigurationInTextEdit() helper
- Fix activeMainWindow() to correctly find main window

* Add custom tab titles and pinned tabs support

- Add customTitle and isPinned properties to Tab
- Separate process title from custom title with applyProcessTitle()
- Add setCustomTitle()/clearCustomTitle() for user-defined tab names
- Add togglePin()/setPinned() with automatic reordering
- Pinned tabs stay at the top, new tabs insert after pinned section
- moveTabToTop/moveTabsToTop respect pinned tab ordering

* Add --panel option to new-split command

- CLI: Parse --panel <id|index> option for new-split
- Controller: Resolve panel argument to split specific surface
- Return new panel UUID on successful split creation

* Fix notifications popover positioning with layout-aware anchor

- Use AnchorNSView with layout callback for reliable positioning
- Force layout before showing popover to ensure current geometry
- Convert anchor bounds to window content view coordinates
- Add fallback positioning near top-left when anchor unavailable
- Fix button hit testing with explicit frame and contentShape

* Improve app termination in reload script

Use osascript to gracefully quit by bundle ID before pkill fallback.
Add more robust pkill patterns to catch instances from any DerivedData path.

* Add sidebar blur effect with live-adjustable glass settings

- Add WindowGlassEffect for window-level NSGlassEffectView (macOS 26+)
- Add SidebarBackdrop with configurable material, blend mode, tint, and opacity
- Add Sidebar Debug panel (Debug menu) for live adjustment of sidebar appearance
- Add Background Debug panel for window glass tint settings
- Support both behindWindow and withinWindow blur modes
- Live tint updates without requiring window reload

* Align titlebar text to left edge of content area
2026-02-04 03:04:45 -08:00
Lawrence Chen
600683cd7d
Add --panel flag to new-split command (#10)
* Add --panel flag to new-split command

Allows splitting a specific panel without changing focus first.

Usage: cmuxterm new-split <direction> [--panel <id|index>]

Example: cmuxterm new-split down --panel 1

* Return new panel ID from new-split command

new-split now returns the UUID of the newly created panel, enabling
reliable chaining of split operations without index drift issues.

Before: OK
After:  OK F2675177-3838-49AF-A1A0-1744C0048E99

Example workflow to create left + 2x2 grid on right:
  RIGHT=$(cmuxterm new-split right | awk '{print $2}')
  BOTTOM=$(cmuxterm new-split down --panel $RIGHT | awk '{print $2}')
  cmuxterm new-split right --panel $RIGHT
  cmuxterm new-split right --panel $BOTTOM
2026-02-03 21:37:49 -08:00
Lawrence Chen
9cb9c1389c
Align render loop with Ghostty (#5) 2026-01-30 20:39:21 -08:00
Lawrence Chen
4b77b1117d Fix focus-on-scroll and harden reload scripts 2026-01-30 16:46:30 -08:00
Lawrence Chen
3d022db148 Fix find focus and align search with Ghostty 2026-01-29 20:36:32 -08:00
Lawrence Chen
cb51710d94 Record jump-to-unread focus on first responder 2026-01-29 19:28:12 -08:00
Lawrence Chen
af2ab0955c Handle scale on screen changes 2026-01-29 17:46:55 -08:00
Lawrence Chen
357eeb3585 Insert new tabs after current and inherit cwd 2026-01-29 03:30:22 -08:00
Lawrence Chen
004a353fe5 Normalize window controls and confirm close panel 2026-01-29 02:20:54 -08:00
Lawrence Chen
a0bf5dfc84 Add cmuxterm CLI and socket control modes 2026-01-28 21:19:48 -08:00
Lawrence Chen
c353131f53 Fix notification focus and indicators 2026-01-28 15:15:34 -08:00
Lawrence Chen
ca9c680da7 Ensure tab focus owns key input 2026-01-28 03:12:50 -08:00
Lawrence Chen
8984e8a750 Add debug scrollback tab and smooth scroll wheel 2026-01-28 03:00:50 -08:00
Lawrence Chen
b0c61f7d6c Ship DMG releases and enhance tab actions 2026-01-26 14:48:08 -08:00
Lawrence Chen
f275782a9c Disable native tabbing and polish notifications 2026-01-26 03:28:54 -08:00
Lawrence Chen
8320d5805a Rename to cmux and add About panel 2026-01-26 03:05:03 -08:00
Lawrence Chen
d6b0a544f9 Unset NO_COLOR before Ghostty init 2026-01-25 15:51:23 -08:00
Lawrence Chen
00eda7f32b Fix scroll mods for precise trackpad input 2026-01-23 18:17:11 -08:00
Lawrence Chen
73e42553c8 Fix keybind handling and add ctrl+enter test 2026-01-23 17:01:05 -08:00
Lawrence Chen
e69665a15a Fix sidebar resize tracking and add UI test 2026-01-23 03:18:40 -08:00
Lawrence Chen
2b598cdb8f Move tabs to top on notification 2026-01-23 01:58:55 -08:00
Lawrence Chen
6b8475cc59 Make panel flash reliable 2026-01-23 01:50:24 -08:00
Lawrence Chen
4c326d6abd Fix terminal background rendering 2026-01-22 20:53:41 -08:00
Lawrence Chen
b40f3dec35 Fix split close focus and window background sync 2026-01-22 20:12:54 -08:00
Lawrence Chen
b715f0cebe Update sidebar badges and key modifier translation 2026-01-22 19:30:30 -08:00
Lawrence Chen
bc074d20c1 Implement splits and notification focus 2026-01-22 18:02:45 -08:00
Lawrence Chen
62136dbdd3 Add notifications and clipboard context menu 2026-01-22 16:53:03 -08:00
Lawrence Chen
f7c421c56a Fix focus when switching tabs 2026-01-22 15:53:35 -08:00
Lawrence Chen
de577c7f03 Match Ghostty mouse tracking and focus handling 2026-01-22 15:24:13 -08:00
Lawrence Chen
846201b3c8 Add Ghostty scrollbars in libghostty view 2026-01-22 03:49:03 -08:00
Lawrence Chen
022f4a0431 Revert "Add Ghostty-style scrollbars and focus handling"
This reverts commit 5d11e612e4.
2026-01-22 03:48:23 -08:00
Lawrence Chen
5d11e612e4 Add Ghostty-style scrollbars and focus handling 2026-01-22 03:47:30 -08:00
Lawrence Chen
cd0f6200c0 Fix Ctrl+C/D handling and add Unix socket control API for testing
Key changes:
- Fix keyboard input handling for control characters in GhosttyTerminalView
  - Set consumed_mods correctly (exclude Ctrl/Cmd from consumed mods)
  - Send unmodified character text for Ctrl+key combinations
  - Add unshifted_codepoint support for proper key encoding

- Add TerminalController with Unix socket API (/tmp/ghosttytabs.sock)
  - Commands: send, send_key, list_tabs, new_tab, close_tab, select_tab
  - Supports ctrl-c, ctrl-d, ctrl-z, enter, tab, escape, etc.

- Add Python test client and automated test suite
  - tests/ghosttytabs.py - Python client library
  - tests/test_ctrl_socket.py - Main Ctrl+C/D test suite (4 tests)
  - tests/test_signals_auto.py - Standalone PTY signal tests

- Update CLAUDE.md with socket API documentation and testing guide
- Update .gitignore for Python cache files

This fixes Ctrl+C/D not working in apps like claude-code, btop, opencode
while continuing to work in simpler apps like htop.
2026-01-22 02:20:51 -08:00
Lawrence Chen
f969298c6e Fix tab switching state persistence and keypress beeps
- Add TerminalSurface class to own ghostty_surface_t lifecycle per tab
- Use ZStack to keep all terminal views alive instead of recreating on switch
- Add NSTextInputClient conformance to properly handle interpretKeyEvents
- Add ghostty_surface_set_focus calls for proper focus management
- Add doCommand(by:) override to silence unhandled key command beeps
2026-01-22 01:47:16 -08:00
Lawrence Chen
c5bd543fe0 Initial commit: macOS terminal app with vertical tabs using libghostty
Features:
- Vertical tabs sidebar with SwiftUI
- Terminal emulation via GhosttyKit.xcframework (libghostty)
- Keyboard shortcuts: Cmd+T/N, Ctrl+Shift+` (new tab), Cmd+W (close),
  Cmd+Shift+[/], Ctrl+Tab (navigation), Cmd+1-9 (jump to tab)
- Reads Ghostty config from ~/Library/Application Support/com.mitchellh.ghostty/config
- Metal-based rendering
2026-01-22 01:16:24 -08:00