Skip to content

val4oss/customize-ps1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customize PS1

Provide bash file to custom PS1.

Prerequisite

systemd-detect-virt is required to get virtual environment

How to use

  1. Get the file .bash_customize_ps1 on your host and source it in your bashrc file:
source $HOME/.bash_customize_ps1
  1. Call the function custom_ps1 with corresponding colors
USER_COLOR=blue
MACHINE_COLOR=blue
WORKSPACE_COLOR=green
TIME_COLOR=yellow
SEPARATOR_COLOR=white

custom_ps1 $PRIMARY_COLOR $WORKSPACE_COLOR $TIME_COLOR $SEPARATOR_COLOR

List of colors

display Xterm Number Name
#3a3a3a 237 black
#800000 1 red
#5f875f 65 green
#afaf00 142 yellow
#005f87 24 blue
#875faf 97 magenta
#87afd7 110 cyan
#c6c6c6 251 white
#ff87d7 212 pink
#ff875f 209 orange
#af875f 137 brown
#949494 246 grey

List of functions

  • custom_ps1 fontground color for your PS1 with separators

    source "${HOME]/.bash_customize_ps1"
    custom_ps1 yellow yellow blue magenta white

    Custom ps1 example

  • custom_ps1_bg background color for your PS1 with arrows shape

    source "${HOME]/.bash_customize_ps1"
    custom_ps1_bg brown red black white

    Custom ps1 bg example

About

Bash files to custom PS1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages