1
0
Fork 0

Zsh prompt: Make sure bright colours are used for SSH and root

This commit is contained in:
tastytea 2022-04-04 05:23:00 +02:00
parent 975ae6087c
commit f44adb6760
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 3 additions and 2 deletions

View File

@ -12,8 +12,9 @@ zsh_theme_colours[highlight]="201" # pink
zsh_theme_colours[minor]="60" # dark violet
zsh_theme_colours[inactive]="236" # grey
[[ -n "${SSH_CONNECTION}" ]] && zsh_theme_colours[prompt]="yellow"
[[ ${EUID} -eq 0 ]] && zsh_theme_colours[prompt]="red"
# This will use potentially user defined colours
[[ -n "${SSH_CONNECTION}" ]] && zsh_theme_colours[prompt]="11" # bright yellow
[[ ${EUID} -eq 0 ]] && zsh_theme_colours[prompt]="9" # bright red
# Show username if it is not the default user
local showuser=""