fixed fastfetch
This commit is contained in:
@@ -97,6 +97,7 @@ in
|
||||
claude-code
|
||||
caligula
|
||||
ocamlPackages.utop
|
||||
opencode
|
||||
openconnect
|
||||
yubikey-manager
|
||||
])
|
||||
|
||||
@@ -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
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user