diff --git a/profiles/workspace/zsh/default.nix b/profiles/workspace/zsh/default.nix index 482ec55..db51c1a 100755 --- a/profiles/workspace/zsh/default.nix +++ b/profiles/workspace/zsh/default.nix @@ -79,6 +79,8 @@ cmd_end=`date +%s` ((cmd_time=$cmd_end - $cmd_start)) fi + cleareol="\e[K" + colorreset="\e[1;0m" if [ $retval -eq 0 ]; then cmdstat="✓" bgcolor="\e[1;30;42m" @@ -87,11 +89,9 @@ cmdstat="✘" bgcolor="\e[1;41m" fgcolor="\e[1;31;40m" + printf "$bgcolor $cmdstat $retval $colorreset\n" fi - cleareol="\e[K" - colorreset="\e[1;0m" if [ ! -z "$cmd" ]; then - printf "$fgcolor$cmdstat $retval$colorreset\n" if [[ $cmd_time -gt 3 ]]; then ${pkgs.libnotify}/bin/notify-send -a command_complete -i utilities-terminal -u low "$cmdstat $cmd" "in `date -u -d @$cmd_time +'%T'`" echo -e '\a' diff --git a/profiles/workspace/zsh/p10k.zsh b/profiles/workspace/zsh/p10k.zsh index 63f5a7a..643813d 100644 --- a/profiles/workspace/zsh/p10k.zsh +++ b/profiles/workspace/zsh/p10k.zsh @@ -192,9 +192,9 @@ # Transparent background. typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= # Green prompt symbol if the last command succeeded. - typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=015 + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=010 # Red prompt symbol if the last command failed. - typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=015 + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=010 # Default prompt symbol. typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' # Prompt symbol in command vi mode.