Skip to content

feat(ghostty): try Ghostty#16

Merged
chagui merged 2 commits into
mainfrom
chagui/ghostty/initial-config
Apr 25, 2026
Merged

feat(ghostty): try Ghostty#16
chagui merged 2 commits into
mainfrom
chagui/ghostty/initial-config

Conversation

@chagui
Copy link
Copy Markdown
Owner

@chagui chagui commented Apr 25, 2026

Summary

Experimenting with Ghostty: native tabs and splits, embedded fonts, translucent blurred background, and emacs-style Alt key handling on macOS.

What this PR adds:

  • Initial Ghostty config (dot_config/ghostty/config.tmpl): translucent background with macOS blur, tab-style titlebar, copy-on-select, embedded JetBrains Mono Nerd Font, stock dark theme. window-save-state = always retains size/position across launches.
  • Native tabs and splits keybindings: Cmd+Arrow for split navigation, Cmd+Shift+Arrow for resize, Cmd+Z for split zoom, Ctrl+Tab cycles tabs, Cmd+, renames the current tab.
  • macos-option-as-alt = left so emacs-style \e<key> bindings reach the shell — Alt+C (fzf-cd-widget) was silently inert before. Right option still composes accents.
  • Pre-commit hook runs ghostty +validate-config on dot_config/ghostty/*.tmpl to catch typos in keybind actions like open_url (not a real Ghostty action) at commit time, instead of at next reload.

Companion branch extracted from this one: chagui/misc/ghostty-followups — adds a Claude WebFetch permission for ghostty.org docs and a tmux split-direction tweak. Both bits arose during the Ghostty experiment but are independent of the Ghostty config itself.

Test plan

  • chezmoi apply; reload Ghostty (Cmd+Shift+,) — no validate errors
  • Background transparency + blur visible (window not in fullscreen)
  • ^T / ^R / Alt+C trigger fzf file / history / cd-widget
  • Right option still composes (e.g. option+e eé)
  • Cmd+D splits, Cmd+Arrow navigates between splits, Cmd+Shift+Arrow resizes
  • Pre-commit hook fails when an invalid ghostty key is added to the config

🤖 Generated with Claude Code

@chagui chagui changed the title Chagui/ghostty/initial config feat(ghostty): replace Alacritty as macOS daily driver Apr 25, 2026
@chagui chagui changed the title feat(ghostty): replace Alacritty as macOS daily driver feat(ghostty): experiment with Ghostty as Alacritty alternative Apr 25, 2026
@chagui chagui changed the title feat(ghostty): experiment with Ghostty as Alacritty alternative feat(ghostty): try Ghostty with native tabs and splits Apr 25, 2026
chagui and others added 2 commits April 25, 2026 17:56
Initial Ghostty config for macOS, using native tabs/splits in place of
tmux passthrough for in-terminal session management.

Window:
- Translucent background (background-opacity = 0.7) with macOS blur
  (background-blur-radius = 20). NOT fullscreen — macOS native
  fullscreen silently disables window-level transparency. Resize
  manually (green button or Rectangle/Spectacle); window-save-state
  retains the layout across launches.
- macos-titlebar-style = tabs, copy-on-select to clipboard,
  mouse-hide-while-typing, 6px internal padding.

Behavior:
- macos-option-as-alt = left so emacs-style \e<key> bindings reach
  the shell. On macOS, left-option composes Unicode by default
  (option+c → ç), which silently broke fzf-cd-widget (Alt+C) and
  any other Alt-prefixed zsh binding. Right option still composes
  accents (option+e e → é).

Keybindings:
- Cmd+Arrow navigates splits, Cmd+Shift+Arrow resizes,
  Cmd+Z toggles split zoom, Cmd+, renames the current tab,
  Ctrl+Tab / Ctrl+Shift+Tab cycles tabs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Catch invalid keybind actions, unknown config keys, and other
ghostty-rejectable mistakes at commit time instead of at next reload.
Skips silently if ghostty is not on PATH (Linux dev boxes).

Caveat: validates the .tmpl as-is. The current ghostty config has no
Go-template syntax, so chezmoi passes it through unchanged. If
templating is added later, the hook will need to render via
`chezmoi execute-template` before validating.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chagui chagui force-pushed the chagui/ghostty/initial-config branch from 51c351a to 22adc10 Compare April 25, 2026 17:18
@chagui chagui changed the title feat(ghostty): try Ghostty with native tabs and splits feat(ghostty): try Ghostty Apr 25, 2026
@chagui chagui changed the base branch from main to chagui/customise-firefox April 25, 2026 17:22
@chagui chagui changed the base branch from chagui/customise-firefox to main April 25, 2026 17:22
@chagui chagui merged commit 27be217 into main Apr 25, 2026
1 check passed
@chagui chagui deleted the chagui/ghostty/initial-config branch April 25, 2026 17:22
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