Skip to content

Instantly share code, notes, and snippets.

@emadabdulrahim
Last active February 15, 2026 22:39
Show Gist options
  • Select an option

  • Save emadabdulrahim/53b69c296ac18c742f00a71fd2079ef7 to your computer and use it in GitHub Desktop.

Select an option

Save emadabdulrahim/53b69c296ac18c742f00a71fd2079ef7 to your computer and use it in GitHub Desktop.
Ghostty terminal setup guide — theme, zsh plugins, block cursor fix, keybindings

Ghostty Terminal Setup

1. Install Ghostty

brew install --cask ghostty

2. Config File

Location: ~/Library/Application Support/com.mitchellh.ghostty/config

# Theme
theme = GitHub Dark Default

# Font
font-family = JetBrains Mono
font-size = 14
font-thicken = true

# Cursor
cursor-style = block
cursor-style-blink = false
cursor-color = white
cursor-text = black

# Default directory
working-directory = /Users/YOUR_USERNAME/Developer
window-inherit-working-directory = true

# Window
window-padding-x = 10
window-padding-y = 10
window-padding-balance = true
window-colorspace = display-p3
window-width = 300
window-height = 43
window-position-x = 0
window-position-y = 0

# macOS
macos-titlebar-style = tabs
background-opacity = 0.98
background-blur-radius = 20
window-save-state = always

# Shell integration
shell-integration = detect
shell-integration-features = no-cursor,sudo,title

# Scrollback
scrollback-limit = 10000

# Clipboard
clipboard-read = allow
clipboard-write = allow

# Readability
adjust-cell-height = 3
adjust-cursor-thickness = 2

# Splits
keybind = cmd+d=new_split:right
keybind = cmd+shift+d=new_split:down
keybind = cmd+shift+h=goto_split:left
keybind = cmd+shift+l=goto_split:right
keybind = cmd+shift+k=goto_split:top
keybind = cmd+shift+j=goto_split:bottom
keybind = cmd+shift+z=toggle_split_zoom
keybind = cmd+shift+e=equalize_splits

Adjust window-height, window-width, and working-directory to your preference. window-height = 43 is ~60% of a 1440p display.

3. Zsh Plugins

Requires oh-my-zsh. Install the plugins:

# zsh-autosuggestions — fish-like autocomplete from history (press → to accept)
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# zsh-syntax-highlighting — colors commands green/red as you type
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# fzf — fuzzy history search with Ctrl+R
brew install fzf

Then in ~/.zshrc, update the plugins line:

plugins=(git zsh-autosuggestions zsh-syntax-highlighting fzf)

4. Fix Block Cursor

Oh-my-zsh overrides the cursor to a thin beam. Add this at the end of ~/.zshrc:

# Force steady block cursor (overrides oh-my-zsh and Ghostty shell integration)
_fix_cursor() { echo -ne '\e[2 q'; }
precmd_functions+=(_fix_cursor)
zle-line-init() { echo -ne '\e[2 q'; }
zle -N zle-line-init

5. Key Bindings Reference

Key Action
Cmd+D Split right
Cmd+Shift+D Split down
Cmd+Shift+H/J/K/L Navigate splits (vim-style)
Cmd+Shift+Z Zoom/unzoom split
Cmd+Shift+E Equalize all splits
Cmd+T / Cmd+W New/close tab
Cmd+1-8 Switch tabs
Cmd+Click Open URLs
Cmd+Shift+, Reload config
Cmd+, Open config
Ctrl+R Fuzzy history search (fzf)
Accept autosuggestion

6. Useful Commands

ghostty +list-themes          # Browse all built-in themes
ghostty +list-fonts           # See installed fonts
ghostty +list-keybinds        # See all default keybindings
ghostty +show-config --default --docs   # Full config reference

Other Dark Theme Options

theme = Catppuccin Mocha
theme = TokyoNight Night
theme = Dracula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment