diff options
| author | Alejandro Soto <alejandro@34project.org> | 2025-09-15 15:09:01 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2025-09-15 15:09:01 -0600 |
| commit | 4a4c13dc43a7814d7ec6b9cb328db5c342b12bab (patch) | |
| tree | 44a261cfcccce0c4125d9c42a2ee2445884a752c /home/baseline/zshrc.nix | |
| parent | e751d09e21dcb1da805696ed0e542719b18e7d73 (diff) | |
home/baseline/zshrc: fix USERATHOST behavior for SSH clients
Diffstat (limited to '')
| -rw-r--r-- | home/baseline/zshrc.nix | 8 |
1 files changed, 6 insertions, 2 deletions
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 |
