Skip to content

WDoyle123/ps1palette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PS1Palette

PS1Palette is a Bash script designed to simplify the process of customising the command prompt (PS1) in Bash. It allows users to easily change the colour of their terminal prompt without needing to understand the complex syntax of PS1 colour codes.

Examples

example1.png example2.png example3.png

Features

  • Easy to Use: Just select the colour and the script does the rest.
  • Customisable: Offers full and segmented colouring options for your PS1.
  • Colour Options: Includes standard, bold, bright, and bold-bright colour variations.
  • Safe: Echoes changes to the .bashrc file, allowing easy reversion to original settings.

Usage

  1. Clone the repository or download the ps1palette.sh script.
git clone https://github.com/WDoyle123/ps1palette.git
  1. Make the script executable:
chmod +x ps1palette.sh
  1. Run the script: ./ps1palette.sh
  2. Choose between full or segmented colouring options.
  3. For full colouring, select a colour for the entire PS1.
  4. For segmented colouring, select colours for each segment (Username, Hostname, Directory, Prompt Symbol).
  5. Confirm to apply changes to your current session and save them to .bashrc.

Colour Prefixes

  • b for bold (e.g., bred for bold red)
  • br for bright (e.g., brred for bright red)
  • bbr for bold and bright (e.g., bbrred for bold and bright red)

Available Colours

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white

Notes and Disclaimer

  • Caution: This script alters .bashrc. It is recommended to backup your .bashrc before running.
  • Colour Variation: Colours may vary based on terminal settings. I'm not liable for unintended changes.
  • Source: After updating .bashrc, run source ~/.bashrc to apply changes immediately.

Contributing

Feel free to fork, modify, and send pull requests or open issues for any improvements or bug fixes.

License

see LICENSE

About

Streamline Bash PS1 customisation through script automation for prompt colour coding and .bashrc integration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages