Skip to content

Ghostty Terminal

Ghostty created by Mitchell Hashimoto, is a terminal emulator written in zig.

As a native macOS and GTK app, it provides a modern and intuitive terminal experience.

Terminal window
Cmd+T # New tab
Cmd+N # New window
Cmd+W # Close tab/window
Cmd+K # Clear terminal screen
Cmd+D # Split pane vertically
Cmd+Shift+D # Split pane horizontally
Alt+<arrow key> # Navigate between panes
Cmd+Shift+[/] # Navigate between tabs
Ctrl+A # Move cursor to beginning of line
Ctrl+E # Move cursor to end of line
Option+Click # Move cursor to clicked position
Cmd+F # Find in terminal
Ctrl+Shift+F # Full-screen search
Cmd+Shift+P # Command palette

Configuration

Terminal window
~/.config/ghostty/config # Main configuration file
# Basic configuration
font-family = Berkeley Mono
font-size = 14
background-opacity = 0.95
theme = catppuccin-mocha
shell = /bin/zsh
# To reload config: Cmd+Shift+P > Reload Configuration

Colour Scheme and Appearance

Terminal window
# In ~/.config/ghostty/config
# Theme options
theme = catppuccin-mocha # Built-in theme
# Or use custom colours
background = 1E1E2E
foreground = CDD6F4
cursor-color = F5E0DC
# Font options
font-family = Berkeley Mono
font-size = 14
font-feature = calt
font-feature = liga
line-height = 1.2
# Window options
window-padding-x = 10
window-padding-y = 10
background-opacity = 0.95
macos-option-as-alt = true

Advanced Configuration

Keybindings

Terminal window
# In ~/.config/ghostty/config
keybind = ctrl+shift+t=new_tab
keybind = ctrl+shift+w=close_tab
keybind = super+shift+n=new_window
keybind = ctrl+alt+left=previous_tab
keybind = ctrl+alt+right=next_tab

Window Customization

Terminal window
# In ~/.config/ghostty/config
window-decoration = false
window-theme = dark
confirm-close-surface = false
adjust-cell-width = -1%
adjust-cell-height = 3%

Experimental Features

Terminal window
# In ~/.config/ghostty/config
experimental-features = allow-clipboard-access
experimental-features = styled-underlines
experimental-features = sixel

Terminal Multiplexing

Terminal window
# Combine with tmux for enhanced session management
tmux-integration = true
tmux-control-mode = true

URL Handling

Terminal window
# In ~/.config/ghostty/config
url-launcher = open
clipboard-read = allow
clipboard-write = allow

Command-Line Usage

Terminal window
ghostty --working-directory ~/projects # Open in specific directory
ghostty --command "nvim file.txt" # Open with specific command
ghostty --config "font-size=16" # Override config option

Development Workflow Example

Terminal window
# Open a new Ghostty window for the project
ghostty --working-directory ~/projects/myproject
# Split the window for different tasks
# Cmd+D to create a vertical split
# In first pane: Edit code
z myproject
nvim $(fzf)
# In second pane: Run server and monitor
gst
bun run dev
# Create another split for logs (Cmd+Shift+D for horizontal)
tail -f logs/dev.log
# Use Alt+Arrow keys to navigate between panes
# Use Cmd+Shift+P for command palette when needed

Power User Tips

  1. Install Ghostty via Homebrew: brew install --cask ghostty
  2. Manage keybindings in ~/.config/ghostty/config with the keybind directive
  3. Benefit from GPU acceleration for smoother rendering
  4. Use window-decoration settings to customize window appearance
  5. Configure dynamic window opacity with adjust-cell-width and adjust-cell-height
  6. Enable experimental features with the experimental-features option
  7. Use the spawn command to open new windows with specific configurations
  8. Combine Ghostty with tmux for enhanced window management capabilities
  9. Define custom key sequences using key-sequence in the config
  10. Configure URL handling with the url-launcher and related settings

Resources