From 4f42b14dd2ad149624d35e105f8155783ab12cf1 Mon Sep 17 00:00:00 2001 From: neodarz Date: Mon, 5 Oct 2020 21:19:31 +0200 Subject: Little update --- dotfiles/zsh/09-prompt.zsh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'dotfiles/zsh/09-prompt.zsh') diff --git a/dotfiles/zsh/09-prompt.zsh b/dotfiles/zsh/09-prompt.zsh index 9c5fce6..ca892c3 100644 --- a/dotfiles/zsh/09-prompt.zsh +++ b/dotfiles/zsh/09-prompt.zsh @@ -27,20 +27,20 @@ ICO_BEHIND="↓" #ICO_BEHIND="🠛" #ICO_BEHIND="▼" ICO_DIVERGED="⥮" -COLOR_ROOT="%{$fg_bold[red]%}" -COLOR_USER="%F{white}" -COLOR_NORMAL="%F{white}" +COLOR_ROOT="%F{red}" +COLOR_USER="%F{527}" +COLOR_NORMAL="%F{527}" PROMPT_STYLE="classic" # Modify the colors and symbols in these variables as desired. -GIT_PROMPT_SYMBOL="%{$fg[blue]%}±" # plus/minus - clean repo -GIT_PROMPT_PREFIX="%{$fg[green]%} %{$reset_color%}" -GIT_PROMPT_SUFFIX="%{$fg[green]%}%{$reset_color%}" -GIT_PROMPT_AHEAD="%{$fg[red]%}ANUM%{$reset_color%}" # A"NUM" - ahead by "NUM" commits -GIT_PROMPT_BEHIND="%{$fg[white]%}BNUM%{$reset_color%}" # B"NUM" - behind by "NUM" commits -GIT_PROMPT_MERGING="%{$fg_bold[magenta]%}⚡%{$reset_color%}" # lightning bolt - merge conflict -GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" # red circle - untracked files -GIT_PROMPT_MODIFIED="%{$fg_bold[yellow]%}●%{$reset_color%}" # yellow circle - tracked files modified -GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}" # green circle - staged changes present = ready for "git push" +GIT_PROMPT_SYMBOL="%F{blue}±" # plus/minus - clean repo +GIT_PROMPT_PREFIX="%F{green} %F{527}" +GIT_PROMPT_SUFFIX="%F{green}%F{527}" +GIT_PROMPT_AHEAD="%F{red}ANUM%F{527}" # A"NUM" - ahead by "NUM" commits +GIT_PROMPT_BEHIND="%F{white}BNUM%F{527}" # B"NUM" - behind by "NUM" commits +GIT_PROMPT_MERGING="%F{magenta}⚡%F{527}" # lightning bolt - merge conflict +GIT_PROMPT_UNTRACKED="%F{red}●%F{527}" # red circle - untracked files +GIT_PROMPT_MODIFIED="%F{yellow}●%F{527}" # yellow circle - tracked files modified +GIT_PROMPT_STAGED="%F{green}●%F{527}" # green circle - staged changes present = ready for "git push" parse_git_branch() { # Show Git branch/tag, or name-rev if on detached head @@ -94,25 +94,25 @@ git_prompt_string() { local git_where="$(parse_git_branch)" # If inside a Git repository, print its branch and state - [ -n "$git_where" ] && echo "[$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX%{$fg[yellow]%}${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX%F{white}]─" + [ -n "$git_where" ] && echo "[$GIT_PROMPT_SYMBOL$(parse_git_state)$GIT_PROMPT_PREFIX%F{yellow}${git_where#(refs/heads/|tags/)}$GIT_PROMPT_SUFFIX%F{527}]─" # If not inside the Git repo, print exit codes of last command (only if it failed) - #[ ! -n "$git_where" ] && echo "%{$fg[red]%}%(?..%?)" + #[ ! -n "$git_where" ] && echo "%F{red}%(?..%?)" } function error() { - echo "%(?..[$fg[red]%?%F{white}]─)" + echo "%(?..[%F{red}%?%F{527}]─)" } function host() { if [[ -n $SSH_CONNECTION ]]; then - echo "%{$fg_bold[red]%}!$reset_color%F{white}$HOST" + echo "%F{red}!%F{527}$HOST" else echo "$HOST" fi } -PROMPT='%F{white}┌─[${USER_LEVEL}$USER$reset_color%F{white}@$(host)]─$(git_prompt_string)$(error)[%~] +PROMPT='${COLOR_NORMAL}┌─[${USER_LEVEL}${USER}@$(host)]─$(git_prompt_string)$(error)[%~] └─ - %f' setfont lat0-08 -- cgit v1.2.1