Skip to content

Instantly share code, notes, and snippets.

@siddhantmedar
Created April 11, 2026 07:01
Show Gist options
  • Select an option

  • Save siddhantmedar/bac674f6da5a07adcd0aec801d82c6ca to your computer and use it in GitHub Desktop.

Select an option

Save siddhantmedar/bac674f6da5a07adcd0aec801d82c6ca to your computer and use it in GitHub Desktop.
[Config] Ghostty Terminal — Ubuntu 24.04
# Font
font-family = JetBrainsMono Nerd Font
font-size = 13
# Theme
theme = Catppuccin Mocha
# Window
window-padding-x = 8
window-padding-y = 4
window-decoration = server
background-opacity = 0.95
# Cursor
cursor-style = bar
cursor-style-blink = false
# Behavior
copy-on-select = false
confirm-close-surface = false
mouse-hide-while-typing = true
scrollback-limit = 10000
# Splits
keybind = ctrl+shift+d=new_split:right
keybind = ctrl+shift+e=new_split:down
keybind = ctrl+shift+h=goto_split:left
keybind = ctrl+shift+l=goto_split:right
keybind = ctrl+shift+k=goto_split:top
keybind = ctrl+shift+j=goto_split:bottom

Ghostty Terminal Setup

Installation

  • Installed natively via apt (not snap) for full feature support
  • PPA: ppa:mkasberg/ghostty-ubuntu
  • Updates automatically via sudo apt upgrade

Config Location

~/.config/ghostty/config.ghostty

Backup at ~/.config/ghostty/config.ghostty.bak

Shortcuts - Custom

Shortcut Action
Ctrl + backtick Open new Ghostty window (global, works from any app)
Ctrl + Shift + D Split terminal right
Ctrl + Shift + E Split terminal down
Ctrl + Shift + H Move to left split
Ctrl + Shift + J Move to bottom split
Ctrl + Shift + K Move to top split
Ctrl + Shift + L Move to right split
Ctrl + Shift + S Flameshot screenshot (GNOME keybind, not Ghostty)

Shortcuts - Ghostty Defaults

Shortcut Action
Ctrl + Shift + T New tab
Ctrl + Shift + W Close tab/split
Ctrl + Shift + N New window
Ctrl + Shift + C Copy
Ctrl + Shift + V Paste
Ctrl + Shift + F Search
Ctrl + Shift + Up/Down Jump between prompts (shell integration)
Ctrl + + Zoom in
Ctrl + - Zoom out
Ctrl + 0 Reset zoom
Select text Auto-copies to clipboard (copy-on-select enabled)

Config Explained

Setting Value Why
font-family JetBrainsMono Nerd Font Ligatures + icons for prompt/tools
font-size 13
theme Catppuccin Mocha Easy on the eyes, good contrast
window-decoration server Keeps title bar for dragging window
background-opacity 0.95 Subtle transparency
cursor-style bar Less visual noise than block
cursor-style-blink false No blinking
copy-on-select clipboard Highlight text = auto copy
confirm-close-surface false No "are you sure?" when closing
mouse-hide-while-typing true Hides cursor while typing
scrollback-limit 10000 Lines of scroll history

Shell Integration

Added to ~/.zshrc:

if [[ "$TERM_PROGRAM" == "ghostty" ]]; then
  source /usr/share/ghostty/shell-integration/zsh
fi

Enables: prompt jumping, clickable URLs, and other Ghostty-specific features.

Terminfo Fix

Conda/miniforge's ncurses uses hex-encoded directories (78/ instead of x/). Terminfo files copied to both formats in ~/.terminfo/:

  • ~/.terminfo/x/xterm-ghostty
  • ~/.terminfo/78/xterm-ghostty
  • ~/.terminfo/g/ghostty
  • ~/.terminfo/67/ghostty

Notes

  • Global keybinds (Ctrl + backtick) are set via GNOME custom keybindings, not Ghostty (X11 doesn't support Ghostty's native global keybinds — that requires Wayland)
  • To edit config quickly: ghostty +edit-config
  • To list available themes: ghostty +list-themes
  • To validate config: ghostty +validate-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment