# Ported from foot/foot.ini — same look and bindings, so the two can be
# tried side by side. Ghostty is now the default terminal ($term in
# hypr/input/keybinds.lua). Check edits with `ghostty +validate-config`.

# --- Font / window ---
font-family = JetBrainsMono Nerd Font
font-size = 9

# foot: pad=12x12 center
window-padding-x = 12
window-padding-y = 12
window-padding-balance = true

# foot: initial-window-size-pixels=1000x520. Ghostty sizes in cells, not
# pixels — this is roughly the same at this font size. Only matters for
# floating windows; tiled ones fill their slot either way.
window-width = 135
window-height = 31

# No title bar or tab strip — Hyprland draws the borders. (window-show-tab-bar
# replaces the deprecated gtk-tabs-location = hidden.)
window-decoration = none
window-show-tab-bar = never

# --- Terminal type ---
# foot forced TERM=xterm-256color everywhere so SSH'd hosts wouldn't lack
# terminfo. Ghostty keeps its own richer TERM locally and only falls back
# to xterm-256color (or installs its terminfo) when you ssh somewhere.
shell-integration-features = ssh-env,ssh-terminfo

# --- Scrollback / mouse ---
# foot kept 5000 lines; Ghostty's limit is in bytes and its 10MB default
# is already well beyond that, so it's left alone.
mouse-scroll-multiplier = 2
mouse-hide-while-typing = false

# URLs: Ctrl+click opens them with xdg-open by default, like foot's url-mode.

# --- Cursor ---
cursor-style = bar
cursor-style-blink = true
adjust-cursor-thickness = 1

# --- Colours ---
background-opacity = 0.80
background = #0a0e14
foreground = #fffbf6
selection-foreground = #b3b1ad
selection-background = #b3b1ad

palette = 0=#01060e
palette = 1=#eb4129
palette = 2=#abe047
palette = 3=#f9af4f
palette = 4=#53bdfa
palette = 5=#fae994
palette = 6=#99faf2
palette = 7=#c7c7c7

# --- Keybindings ---
# foot: Ctrl+C copies, Ctrl+Shift+C sends the interrupt. "performable:"
# makes Ctrl+C copy only when there's a selection — with nothing selected
# it falls through and interrupts as normal. Ctrl+Shift+C still sends ^C
# too, for muscle memory.
keybind = performable:ctrl+c=copy_to_clipboard
keybind = ctrl+shift+c=text:\x03
# Ctrl+Shift+V paste is Ghostty's default already.

# Ghostty binds Ctrl+Enter to toggle_fullscreen by default. Hyprland handles
# fullscreen, so unbind it and let the key reach the app (e.g. newline in
# Claude Code).
keybind = ctrl+enter=unbind

# --- SSH ---
# ssh-terminfo installs Ghostty's terminfo (xterm-ghostty) on a host the
# first time you SSH in, so remote apps don't hit "unknown terminal type".
# ssh-env falls back to TERM=xterm-256color where that install can't happen
# and forwards COLORTERM etc. Ghostty's default features stay on alongside.
shell-integration-features = ssh-terminfo,ssh-env
