From c28e9f9d50887c1a06a9ee6bb046c7ae557c5f95 Mon Sep 17 00:00:00 2001 From: lara Date: Thu, 18 Jun 2020 21:50:02 -0400 Subject: [PATCH] [zshrc] Redesign prompt --- prompt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/prompt b/prompt index 017f634..347aa51 100644 --- a/prompt +++ b/prompt @@ -6,9 +6,9 @@ # and changes the color of the username color_username () { if [[ $EUID -eq 0 ]]; then - echo "%{$fg_bold[red]%}%n" + echo "%{$fg_no_bold[red]%}%n" else - echo "%{$fg_bold[green]%}%n" + echo "%{$fg_no_bold[blue]%}%n" fi } @@ -16,17 +16,19 @@ color_prompt_char () { if [[ $EUID -eq 0 ]]; then echo "%{$fg_no_bold[red]%}#%{$reset_color%}" else - echo "%{$fg_no_bold[green]%}$%{$reset_color%}" + echo "%{$fg_no_bold[blue]%}$%{$reset_color%}" fi } -# Host coloring, specific to Rezometz +# Host coloring, personalise to your own taste color_host () { local couleur_hote="" case $HOST in TwelveYearsAndStillGoingStrong|lharkinateur|BecauseROSThatSWhy|lharktop|blieuxor) + couleur_hote=green;; + pixie) couleur_hote=cyan;; - chimay|orval) + chimay|orval|serenity) couleur_hote=magenta;; babel|taima|era|vidar|okami|athena) couleur_hote=red;; @@ -117,7 +119,7 @@ prompt_msg () { # https://dougblack.io/words/zsh-vi-mode.html vim_mode () { VIM_NORMAL="%{$fg_bold[red]%}[% N]% " - VIM_INSERT="%{$fg_bold[green]%}[% I]% " + VIM_INSERT="%{$fg_bold[blue]%}[% I]% " VIM_PROMPT="${${KEYMAP/vicmd/$VIM_NORMAL}/(main|viins)/$VIM_INSERT}" echo "$VIM_PROMPT%{$reset_color%}" } @@ -213,7 +215,7 @@ prompt_create zle-line-init zle-keymap-select () { PROMPT+="$(virtual_env)$(prompt_chars) %{$reset_color%}" # Right prompt with current repo informations - RPROMPT="${vcs_info_msg_0_}%E%{$reset_color%}" + RPROMPT="${vcs_info_msg_0_}%{$reset_color%}%E" zle reset-prompt }