more p10k changes

This commit is contained in:
Alexander Bantyev 2022-08-25 16:08:04 +04:00
parent 85e3ab6994
commit 77016def4b
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 5 additions and 5 deletions

View File

@ -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'

View File

@ -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.