From 4a4c13dc43a7814d7ec6b9cb328db5c342b12bab Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 15 Sep 2025 15:09:01 -0600 Subject: home/baseline/zshrc: fix USERATHOST behavior for SSH clients --- home/baseline/zshrc.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'home/baseline') diff --git a/home/baseline/zshrc.nix b/home/baseline/zshrc.nix index b963649..80a615e 100644 --- a/home/baseline/zshrc.nix +++ b/home/baseline/zshrc.nix @@ -57,8 +57,12 @@ grml_theme_add_token nix-shell -f grml_nix_shell '%F{red}' '%f' - zstyle ':prompt:grml:left:setup' items $([ ''${NO_USERATHOST:-0} -gt 0 ] || echo user at host) path nix-shell percent - zstyle ':prompt:grml:right:setup' items sad-smiley vcs $([ ''${NO_BATTERY:-0} -gt 0 ] || echo battery) time + if [ -n "$SSH_CONNECTION" ]; then + USERATHOST=1 + fi + + zstyle ':prompt:grml:left:setup' items $([ ''${USERATHOST:-0} -eq 0 ] || echo user at host) path nix-shell percent + zstyle ':prompt:grml:right:setup' items sad-smiley vcs $([ ''${BATTERY:-0} -eq 0 ] || echo battery) time zstyle ':prompt:grml:right:items:time' pre ' %F{yellow}' unsetopt sharehistory -- cgit v1.2.3