Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/WDoyle123/ps1palette
Streamline Bash PS1 customisation through script automation for prompt colour coding and .bashrc integration.
https://github.com/WDoyle123/ps1palette
bash shell shell-script shell-scripting terminal
Last synced: about 1 month ago
JSON representation
Streamline Bash PS1 customisation through script automation for prompt colour coding and .bashrc integration.
- Host: GitHub
- URL: https://github.com/WDoyle123/ps1palette
- Owner: WDoyle123
- License: gpl-3.0
- Created: 2023-11-29T16:34:59.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2023-11-29T19:01:07.000Z (7 months ago)
- Last Synced: 2024-02-01T11:06:55.133Z (5 months ago)
- Topics: bash, shell, shell-script, shell-scripting, terminal
- Language: Shell
- Homepage:
- Size: 49.8 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-cli-apps - ps1palette - Streamline Bash PS1 customization through script automation for prompt color coding and .bashrc integration. (<a name="utility"></a>Utilities)
- cli-apps - ps1palette - Streamline Bash PS1 customization through script automation for prompt color coding and .bashrc integration. (<a name="utility"></a>Utilities)
README
# 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
## 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
```
2. Make the script executable:
```
chmod +x ps1palette.sh
```
3. Run the script: `./ps1palette.sh`
4. Choose between `full` or `segmented` colouring options.
5. For full colouring, select a colour for the entire PS1.
6. For segmented colouring, select colours for each segment (Username, Hostname, Directory, Prompt Symbol).
7. 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](LICENSE)