From 6b738187532facf3cd505030cae7ad5130dd715f Mon Sep 17 00:00:00 2001 From: pagedmov Date: Sun, 3 Nov 2024 01:02:01 -0500 Subject: [PATCH] fixed ssh-theme logic again and also wrote a wrapper function for ssh that reverts the theme upon return --- modules/home/environment/zshell.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/home/environment/zshell.nix b/modules/home/environment/zshell.nix index d2e7666..ea0f5cd 100755 --- a/modules/home/environment/zshell.nix +++ b/modules/home/environment/zshell.nix @@ -76,11 +76,15 @@ runbg aplay "$1" fi } + ssh() { # reverts ssh theme upon returning + command ssh "$@" + kitty_ssh_theme + } kitty_ssh_theme() { - if [ -z "$SSH_CONNECTION" ]; then + if [ -n "$SSH_CONNECTION" ]; then kitty @ set-colors -a ~/.config/kitty/ssh-theme.conf else - kitty @ set-colors -a ~/.config/kitty/ssh-theme.conf + kitty @ set-colors -a ~/.config/kitty/default-theme.conf fi } gitcheckout_sfx() {