fixed fastfetch

This commit is contained in:
2026-03-10 10:36:59 -07:00
parent 5445adec96
commit 77bc97b366
2 changed files with 22 additions and 16 deletions

View File

@@ -97,6 +97,7 @@ in
claude-code
caligula
ocamlPackages.utop
opencode
openconnect
yubikey-manager
])

View File

@@ -25,24 +25,29 @@ let
# Terminal detection logic
# For SSH sessions, default to chafa since we can't guarantee terminal capabilities
# For local sessions, check TERM and TERM_PROGRAM environment variables
terminalType =
if isSSH then
"chafa" # Safe default for remote connections
terminalType =
if isSSH then
# Enhanced SSH detection: try to detect Kitty, fallback to chafa
let
term = builtins.getEnv "TERM";
termProgram = builtins.getEnv "TERM_PROGRAM";
kittyWindowId = builtins.getEnv "KITTY_WINDOW_ID";
kittyPid = builtins.getEnv "KITTY_PID";
# Kitty detection over SSH
isKittyOverSSH = kittyWindowId != "" ||
kittyPid != "" ||
termProgram == "kitty" ||
lib.hasInfix "kitty" term ||
lib.hasInfix "xterm-kitty" term;
in
if isKittyOverSSH then
"kitty"
else
let
term = builtins.getEnv "TERM";
termProgram = builtins.getEnv "TERM_PROGRAM";
in
if termProgram == "kitty" || lib.hasInfix "kitty" term then
"kitty"
else if termProgram == "WezTerm" || lib.hasInfix "wezterm" term then
"wezterm"
else if termProgram == "ghostty" then
"kitty" # Ghostty doesn't have kitty protocol support
else
"chafa"; # Default fallback
"chafa"
else
"kitty";
in
{