Skip to content

Instantly share code, notes, and snippets.

@srbhp
Created May 15, 2023 20:01
Show Gist options
  • Save srbhp/3975f311c1cc8174f5a8feea30dc5f50 to your computer and use it in GitHub Desktop.
Save srbhp/3975f311c1cc8174f5a8feea30dc5f50 to your computer and use it in GitHub Desktop.
# background color is 48. foreground color is 38
color1="\[\e[38;5;1m\]" # background
color2="\[\e[48;5;1m\]" # background
# color3="\[\e[38;5;4m\]" # background
color4="\[\e[48;5;2m\]" # background
color5="\[\e[38;5;5m\]" # foreground
color6="\[\e[48;5;5m\]" # background
# color1="\[\e[38;5;196m\]" # background
# color2="\[\e[48;5;196m\]" # background
# color4="\[\e[48;5;51m\]" # background
# color5="\[\e[38;5;214m\]" # foreground
# color6="\[\e[48;5;214m\]" # background
#
invert="\[\e[7m\]"
black="\[\e[30m\]"
# black2="\[\e[40m\]"
reset="\[\e[0m\]"
export PS1="${color1}${black}${color2}\h ${color1}${color4}${black}${color4}\u${invert}${reset}${black}${color6}\w ${reset}${color5}${reset} "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment