Skip to content

Instantly share code, notes, and snippets.

@vinhnx
Last active March 11, 2026 09:18
Show Gist options
  • Select an option

  • Save vinhnx/359c213d014db4246986484069f58db2 to your computer and use it in GitHub Desktop.

Select an option

Save vinhnx/359c213d014db4246986484069f58db2 to your computer and use it in GitHub Desktop.
My Ghostty config (save as '~/Library/Application Support/com.mitchellh.ghostty/config')
# Ghostty 1.3.0
# Tuned for a macOS 26.3.1 Apple M4 MacBook with 16 GB RAM:
# keep the UI dense and responsive, but avoid settings that increase power use
# or override standard shell/editor behavior.
# Appearance
theme = "/Users/vinhnguyenxuan/.config/ghostty/themes/vitesse/vitesse-black"
custom-shader = "/Users/vinhnguyenxuan/.config/ghostty/focus-pane.glsl"
custom-shader-animation = false
macos-icon = "chalkboard"
macos-titlebar-style = tabs
macos-titlebar-proxy-icon = hidden
macos-window-shadow = false
# Font
font-family = Menlo
font-size = 14
font-feature = -calt,-liga,-dlig
font-thicken = true
font-thicken-strength = 40
font-synthetic-style = false
# Window
window-width = 100
window-height = 90
window-save-state = always
window-inherit-working-directory = true
window-new-tab-position = current
tab-inherit-working-directory = true
split-inherit-working-directory = true
working-directory = inherit
# Rendering
cursor-style = block
cursor-style-blink = false
background-opacity = 1
background-blur = false
alpha-blending = linear-corrected
minimum-contrast = 1.1
window-vsync = true
unfocused-split-opacity = 1
# Padding
window-padding-x = 8
window-padding-y = 12
window-padding-balance = true
# Clipboard / selection
clipboard-paste-protection = false
clipboard-paste-bracketed-safe = true
copy-on-select = false
selection-invert-fg-bg = true
# Quick Terminal
quick-terminal-position = center
quick-terminal-animation-duration = 0
# Shell integration
shell-integration = detect
shell-integration-features = no-cursor
env = COLORTERM=truecolor
notify-on-command-finish = unfocused
notify-on-command-finish-action = no-bell,notify
notify-on-command-finish-after = 10s
# History / memory caps
scrollback-limit = 4194304
scrollbar = system
image-storage-limit = 0
link-previews = false
# Mouse
mouse-hide-while-typing = true
mouse-scroll-multiplier = precision:1,discrete:3
# Safety / ergonomics
confirm-close-surface = true
keybind = shift+enter=text:\n
macos-option-as-alt = true
quick-terminal-size = 70%,70%
quick-terminal-position = center
auto-update-channel = tip
# focus-pane.glsl
# source https://gist.github.com/vinhnx/0de909c1b0a0dc2de7b5a73e0ebf495a
// Adds a soft rounded focus ring and gently pulls inactive panes back.
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord / iResolution.xy;
vec4 terminal = texture2D(iChannel0, uv);
vec3 color = terminal.rgb;
if (iFocus > 0) {
vec2 centered = fragCoord - (iResolution.xy * 0.5);
vec2 halfSize = (iResolution.xy * 0.5) - vec2(1.6);
float cornerRadius = 13.0;
vec2 q = abs(centered) - (halfSize - vec2(cornerRadius));
float signedDist = length(max(q, 0.0)) + min(max(q.x, q.y), 0.0) - cornerRadius;
float borderMask = 1.0 - smoothstep(0.0, 1.6, abs(signedDist));
float glowMask = 1.0 - smoothstep(1.6, 8.0, abs(signedDist));
vec3 borderColor = vec3(0.596, 0.557, 0.447);
color = mix(color, borderColor, borderMask * 0.18);
color = mix(color, min(color + vec3(0.02), vec3(1.0)), glowMask * 0.025);
} else {
float luminance = dot(color, vec3(0.2126, 0.7152, 0.0722));
color = mix(color, vec3(luminance), 0.15);
color *= 0.78;
}
fragColor = vec4(color, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment