From 0b05d1a046b318ab6ed3393be5bde56d72621cb9 Mon Sep 17 00:00:00 2001 From: sloane Date: Fri, 9 Jan 2026 10:50:00 -0500 Subject: [PATCH] ghostty: change fonts, use crt shader for retro vibes --- dot-config/ghostty/config | 4 +++ dot-config/ghostty/shaders/bettercrt.glsl | 33 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 dot-config/ghostty/shaders/bettercrt.glsl diff --git a/dot-config/ghostty/config b/dot-config/ghostty/config index be23c02..931408e 100644 --- a/dot-config/ghostty/config +++ b/dot-config/ghostty/config @@ -1,2 +1,6 @@ theme = Catppuccin Mocha keybind = shift+enter=text:\x1b\r +# font-family = VT323 +font-family = DepartureMono Nerd Font + +custom-shader = ./shaders/bettercrt.glsl diff --git a/dot-config/ghostty/shaders/bettercrt.glsl b/dot-config/ghostty/shaders/bettercrt.glsl new file mode 100644 index 0000000..8f58b89 --- /dev/null +++ b/dot-config/ghostty/shaders/bettercrt.glsl @@ -0,0 +1,33 @@ +// Original shader collected from: https://www.shadertoy.com/view/WsVSzV +// Licensed under Shadertoy's default since the original creator didn't provide any license. (CC BY NC SA 3.0) +// Slight modifications were made to give a green-ish effect. + +// This shader was modified by April Hall (arithefirst) +// Sourced from https://github.com/m-ahdal/ghostty-shaders/blob/main/retro-terminal.glsl +// Changes made: +// - Removed tint +// - Made the boundaries match ghostty's background color + +float warp = 0.25; // simulate curvature of CRT monitor +float scan = 0.50; // simulate darkness between scanlines + +void mainImage(out vec4 fragColor, in vec2 fragCoord) +{ + // squared distance from center + vec2 uv = fragCoord / iResolution.xy; + vec2 dc = abs(0.5 - uv); + dc *= dc; + + // warp the fragment coordinates + uv.x -= 0.5; uv.x *= 1.0 + (dc.y * (0.3 * warp)); uv.x += 0.5; + uv.y -= 0.5; uv.y *= 1.0 + (dc.x * (0.4 * warp)); uv.y += 0.5; + + // determine if we are drawing in a scanline + float apply = abs(sin(fragCoord.y) * 0.25 * scan); + + // sample the texture + vec3 color = texture(iChannel0, uv).rgb; + + // mix the sampled color with the scanline intensity + fragColor = vec4(mix(color, vec3(0.0), apply), 1.0); +}