diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-06-20 17:03:33 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-06-20 17:03:33 +0200 |
commit | b59eea205cf734c9f505da38b68eb3043eedf9b5 (patch) | |
tree | 3ef002a3412444ad1217c42f8f3a0f0812bd6aeb /.config/zsh/prompt | |
parent | 540d1a708efe4eadd1d09290bf8049e7cb5eceb0 (diff) |
Add new zsh prompt
Diffstat (limited to '.config/zsh/prompt')
-rw-r--r-- | .config/zsh/prompt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/.config/zsh/prompt b/.config/zsh/prompt index f0a86dc..a8a1331 100644 --- a/.config/zsh/prompt +++ b/.config/zsh/prompt @@ -29,12 +29,18 @@ zstyle ':vcs_info:git*+set-message:*' hooks git-untracked zstyle ':vcs_info:*' check-for-changes true # zstyle ':vcs_info:git:*' formats " %r/%S %b %m%u%c " -zstyle ':vcs_info:git:*' formats " %{$fg[blue]%}(%{$fg[red]%}%m%u%c%{$fg[yellow]%}%{$fg[magenta]%} %b%{$fg[blue]%})" +zstyle ':vcs_info:git:*' formats " %{$fg[red]%}%m%u%c%{$fg[yellow]%} %{$fg[orange]%} %b" +function set-prompt() { + emulate -L zsh + local top_left='%(5~|%-1~/…/%3~|%4~)' + local top_right="\$vcs_info_msg_0_ " + local bottom_left='%B%F{%(?.green.red)}$%f%b %{$reset_color%}' + PROMPT=$top_left$top_right$'\n'$bottom_left +} + +precmd_functions+=(set-prompt) # format our main prompt for hostname current folder, and permissions. -PROMPT="%B%{$fg[blue]%}[%{$fg[white]%}%n%{$fg[red]%}@%{$fg[white]%}%m%{$fg[blue]%}] %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$fg[cyan]%}%c%{$reset_color%}" -# PROMPT="%{$fg[green]%}%n@%m %~ %{$reset_color%}%#> " -PROMPT+="\$vcs_info_msg_0_ " # TODO look into this for more colors # https://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ # also ascii escape codes |