Created
August 20, 2026 07:12
-
-
Save chunlea/0b8b04493e7622ccf23b9457f03668d3 to your computer and use it in GitHub Desktop.
ghotty.config
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
| # Ghostty configuration | |
| # Docs: https://ghostty.org/docs/config | |
| # --- Startup --- | |
| # Don't create a window when the app launches (use Cmd+N when you want one). | |
| initial-window = false | |
| # Default directory for new terminals (accepts ~/, or `home` / `inherit`). | |
| working-directory = ~/workspace | |
| # New windows (including the quick terminal) don't inherit the previous | |
| # window's cwd; they always start from working-directory above. Tabs and | |
| # splits within a window still inherit (tab/split-inherit-working-directory | |
| # default to true). | |
| window-inherit-working-directory = false | |
| # Drop the first terminal straight into herdr, falling back to a normal zsh | |
| # when herdr exits. Going through `zsh -lic` is required because Ghostty | |
| # launched from Finder gets a bare PATH without ~/.local/bin — .zshrc has to | |
| # be sourced to find herdr (which is also defined there as a shell function). | |
| # To put every new terminal into herdr, change initial-command to command. | |
| initial-command = zsh -lic "herdr; exec zsh -l" | |
| # --- Appearance --- | |
| # Follow the system light/dark appearance. window-theme already defaults to | |
| # auto, so the titlebar follows along. Use a single value (e.g. theme = GitHub) | |
| # to pin one theme instead. | |
| theme = light:GitHub Light Default,dark:GitHub Dark Default | |
| # Ligatures (=> != -> etc.) come from the font's calt feature and are on by | |
| # default in Ghostty. To turn them off: font-feature = -calt | |
| font-family = JetBrains Mono | |
| font-size = 14 | |
| # Padding between content and window edge (the default of 2 is very tight). | |
| # `balance` distributes leftover space evenly instead of piling it on one side. | |
| window-padding-x = 8 | |
| window-padding-y = 8 | |
| window-padding-balance = true | |
| # Hide the titlebar: the quick terminal is fullscreen and herdr brings its own | |
| # tab bar and sidebar. Note this also removes the traffic-light buttons, so | |
| # windows close via Cmd+Shift+W or Cmd+Q only. Use `transparent` to get them back. | |
| macos-titlebar-style = hidden | |
| # Blinking cursor (the default follows whatever the running program asks for). | |
| cursor-style-blink = true | |
| # --- Behavior --- | |
| # No confirmation dialog when closing a window. herdr is a persistent | |
| # server/client, so closing a window only detaches — the session and its agents | |
| # keep running, which makes the confirmation pointless here. | |
| confirm-close-surface = false | |
| # Hide the mouse pointer while typing. | |
| mouse-hide-while-typing = true | |
| # Don't show the size overlay in the middle of the screen while resizing. | |
| resize-overlay = never | |
| # Left Option acts as Alt (Alt+B / Alt+F word motion, Alt+. for the previous | |
| # command's last argument in zsh). Right Option still types special characters | |
| # such as – and ≈. | |
| macos-option-as-alt = left | |
| # Don't auto-enable macOS "Secure Keyboard Entry". It blocks every application | |
| # from reading keyboard events, including Raycast / Hammerspoon global hotkeys | |
| # and Ghostty's own global: keybinds (which go through the accessibility API). | |
| # It can still be turned on manually via Ghostty > Secure Keyboard Entry. | |
| macos-auto-secure-input = false | |
| # Turn on the SSH shell-integration features. ssh-terminfo installs Ghostty's | |
| # terminfo on remote hosts with `tic` (successful installs are cached; manage | |
| # with `ghostty +ssh-cache`), and ssh-env falls back to xterm-256color if that | |
| # fails. Both are off by default, which leaves remote hosts choking on the | |
| # unknown xterm-ghostty TERM. | |
| shell-integration-features = cursor,no-sudo,title,ssh-env,ssh-terminfo,path | |
| # Stay on the tip channel so auto-update doesn't drop this 1.3.2-main build | |
| # back to stable. | |
| auto-update-channel = tip | |
| # --- Quick Terminal --- | |
| # Global hotkey to show/hide: Cmd+Esc | |
| # Prerequisite: turn off the macOS Game Overlay shortcut first (System Settings | |
| # -> Keyboard -> Keyboard Shortcuts -> Mission Control -> Game Overlay), which | |
| # claims Cmd+Esc by default. Without that it shows but won't hide. | |
| # See ghostty-org/ghostty discussions/11829 | |
| keybind = global:cmd+escape=toggle_quick_terminal | |
| # Slide down from the top: top / bottom / left / right / center | |
| quick-terminal-position = top | |
| # Fill the whole screen. First value is the primary axis (height for | |
| # top/bottom), second is the secondary axis (width). | |
| quick-terminal-size = 100%,100% | |
| # Appear on whichever screen the mouse is on: main / mouse / macos-menu-bar | |
| quick-terminal-screen = mouse | |
| # Hide automatically when focus moves elsewhere. | |
| quick-terminal-autohide = true | |
| # Follow along when switching Spaces instead of yanking you back to the | |
| # Space it was opened on. | |
| quick-terminal-space-behavior = move | |
| # No slide-in/out animation (0 = show immediately). | |
| quick-terminal-animation-duration = 0 | |
| # --- Hand Ghostty's tab/split shortcuts over to herdr --- | |
| # herdr's prefix is ctrl+b = \x02. The text: action translates each Cmd chord | |
| # into "prefix + key" and writes it to the terminal, since a terminal never | |
| # receives Cmd chords on its own. | |
| # Note: these apply to every Ghostty terminal, so in a surface that isn't | |
| # running herdr they just dump a ^B sequence onto the command line. | |
| # Tabs | |
| keybind = super+t=text:\x02c | |
| keybind = super+shift+]=text:\x02n | |
| keybind = super+shift+[=text:\x02p | |
| # Splits | |
| keybind = super+d=text:\x02v | |
| keybind = super+shift+d=text:\x02- | |
| keybind = super+w=text:\x02x | |
| keybind = super+shift+enter=text:\x02z | |
| # Pane navigation: cycle and directional | |
| keybind = super+]=text:\x02\t | |
| keybind = super+[=text:\x02\x1b[Z | |
| keybind = super+alt+arrow_left=text:\x02h | |
| keybind = super+alt+arrow_down=text:\x02j | |
| keybind = super+alt+arrow_up=text:\x02k | |
| keybind = super+alt+arrow_right=text:\x02l | |
| # Jump to tab 1..9. digit_N is the physical key position; both spellings are | |
| # bound so Ghostty's defaults are fully overridden. | |
| keybind = super+1=text:\x021 | |
| keybind = super+digit_1=text:\x021 | |
| keybind = super+2=text:\x022 | |
| keybind = super+digit_2=text:\x022 | |
| keybind = super+3=text:\x023 | |
| keybind = super+digit_3=text:\x023 | |
| keybind = super+4=text:\x024 | |
| keybind = super+digit_4=text:\x024 | |
| keybind = super+5=text:\x025 | |
| keybind = super+digit_5=text:\x025 | |
| keybind = super+6=text:\x026 | |
| keybind = super+digit_6=text:\x026 | |
| keybind = super+7=text:\x027 | |
| keybind = super+digit_7=text:\x027 | |
| keybind = super+8=text:\x028 | |
| keybind = super+digit_8=text:\x028 | |
| keybind = super+9=text:\x029 | |
| keybind = super+digit_9=text:\x029 | |
| # herdr-only features (Ghostty's defaults don't claim these keys) | |
| keybind = super+b=text:\x02b | |
| keybind = super+p=text:\x02w | |
| keybind = super+shift+n=text:\x02N | |
| keybind = super+g=text:\x02g | |
| keybind = super+e=text:\x02e | |
| keybind = super+r=text:\x02r | |
| # Deliberately left to Ghostty as escape hatches — don't override these: | |
| # Cmd+Q quit / Cmd+Shift+W close window / Cmd+N new window | |
| # Cmd+C, Cmd+V copy & paste / Cmd+, open config / Cmd+Shift+, reload config | |
| # Cmd+K clear screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment