# Bashrc Dotfiles โ€” Global & Portable Bash Prompt Elegant, portable, and easy-to-install Bash prompt with: - โœจ Two color zones - ๐ŸŒ… Time-based emoji accents - ๐Ÿ–ฅ๏ธ Fallback when Nerd Fonts arenโ€™t available - ๐Ÿ“ Shortened but informative path - ๐Ÿ”˜ Status-colored prompt arrow - ๐Ÿง  Works on Linux, WSL, and macOS --- ## ๐Ÿš€ Install (step by step) ### ๐Ÿง Linux / WSL (global, all users) 1) Clone the repo: ```bash git clone ``` 2) Enter the folder: ```bash cd Bashrc ``` 3) Run the global installer (auto-installs deps + prompts for punchline): ```bash sudo bash dotfiles/install/install-linux-global.sh ``` You get 3 choices in the install script: 1) PS1 only 2) Banner only 3) Both (PS1 + banner) To "uninstall" one part, run the script again and choose only the other. 4) Open a new shell to see the prompt and banner. ### ๐Ÿ macOS (per-user) 1) Clone the repo: ```bash git clone ``` 2) Enter the folder: ```bash cd Bashrc ``` 3) Run the user installer: ```bash bash dotfiles/install/install-macos-user.sh ``` 4) Reload your shell (or open a new terminal): ```bash source ~/.bashrc ``` ### ๐Ÿ–ผ๏ธ Nerd Fonts (optional but recommended) ```bash bash dotfiles/install/install-nerdfont.sh ``` After install: - Open your terminal settings - Set font to JetBrainsMono Nerd Font (or any Nerd Font) - Terminal must use a Nerd Font for glyphs like `๎‚ฐ`, `๎‚ถ`, `๎‚ด` to render correctly --- ## โœ… What gets installed (PS1 + banner) ### Linux / WSL - Installs the prompt module to `/etc/profile.d/ps1.sh` - Installs the banner module to `/etc/profile.d/banner.sh` - Sources both from `/etc/bash.bashrc` - Installs `landscape-common`, `figlet`, and `lolcat` if missing - Prompts for the global punchline used by the banner - You can change the selection or remove PS1/banner by running the installer again ### macOS - Copies `ps1/ps1.sh` to `~/.config/ps1/ps1.sh` - Adds a source block in `~/.bashrc` and `~/.bash_profile` --- ## PS1 module (when it runs) The prompt is loaded automatically by the installer: - Linux/WSL: sourced from `/etc/bash.bashrc` (global) - macOS: sourced from `~/.bashrc` and `~/.bash_profile` (per-user) You normally do not need to run `ps1.sh` manually. --- ## Banner (hostname + punchline + sysinfo) On Linux/WSL, a banner is also shown on login: - `figlet $(hostname) -c | lolcat` - `figlet -f digital "" -c | lolcat` - `landscape-sysinfo | lolcat` ### Punchline (global) The banner reads the punchline from: - `/etc/ps1-punchline` The install script prompts for a punchline and stores it in the file. You can also set it manually: ```bash echo "Your punchline" | sudo tee /etc/ps1-punchline >/dev/null ``` --- ## PS1 install Use the installer for your OS: ### Linux / WSL (global) ```bash sudo bash dotfiles/install/install-linux-global.sh ``` ### macOS (per-user) ```bash bash dotfiles/install/install-macos-user.sh ``` --- ## ๐ŸŒฑ Seasonal palettes (4seasons branch) The `4seasons` branch adds seasonal palettes with an optional static or dynamic mode. Season ranges (Europe/Oslo): - Spring: Marchโ€“May - Summer: Juneโ€“August - Autumn: Septemberโ€“mid November - Winter: mid Novemberโ€“February When installing PS1 you can choose: - Dynamic (auto by date) - Static (pick a single season) --- ## ๐Ÿง  Features - **Clean, modern powerline-style prompt** - Zone 1: date/time/user (cool gray-blue) - Zone 2: host/path (turquoise / cool green) - Automatically switches emoji during the day - Smart path shortening (keeps your home dir visible) - Fallback to ASCII/Unicode if Nerd Fonts are not installed - Per-user disable support - Simple per-user or global install --- ## ๐Ÿ—‚๏ธ Repo Structure ```text dotfiles/ โ”œโ”€โ”€ ps1/ โ”‚ โ””โ”€โ”€ ps1.sh โ”œโ”€โ”€ install/ โ”‚ โ”œโ”€โ”€ install-linux-global.sh โ”‚ โ”œโ”€โ”€ install-macos-user.sh โ”‚ โ””โ”€โ”€ install-nerdfont.sh โ””โ”€โ”€ README.md ``` ## โš™๏ธ Overrides (Optional) Sometimes autodetection doesnโ€™t work (e.g., on macOS without fontconfig): Force Nerd Font glyphs: ```bash export PS1_FORCE_NF=1 ``` Force fallback (no powerline glyphs): ```bash export PS1_FORCE_ASCII=1 ``` Add these to your `~/.bashrc` or `~/.bash_profile`. --- ## ๐Ÿ™… Disable Prompt (per user) If you want to disable the global prompt for your account: Temporarily in a shell: ```bash export DISABLE_GLOBAL_PS1=1 ``` Permanently: ```bash mkdir -p ~/.config/ps1 touch ~/.config/ps1/disable ``` To re-enable: ```bash rm -f ~/.config/ps1/disable ``` --- ## ๐Ÿงช Testing After install, open a new shell and run: ```bash bash -i -c 'echo OK' ``` If you see a prompt with colors and emoji, things are working. --- ## ๐Ÿ’ก Usage Notes Font matters: even with Nerd Fonts installed, you must select them in your terminal settings. Works on terminals like: - GNOME Terminal - iTerm2 - Kitty - VS Code integrated terminal - Windows Terminal (WSL) If you see squares or missing glyphs, your terminal is likely using a non-Nerd font. --- ## ๐Ÿ“ธ Example Prompt This prompt shows:

With exit-status colored arrow and emoji reflecting time of day. --- ## ๐Ÿ”ฅ Why this is real high-end PS1 design - Semantic color use (identity vs location) - Few colors, but with meaning - Path is visible, but never dominant - Emoji is an accent, not a gimmick - Prompt line is calm โ†’ the command gets focus ### ๐ŸŽจ Color palette (notes) | Role | BG | Description | | --- | --- | --- | | Zone 1 BG | 61 | gray-blue pastel | | Zone 1 FG | 255 | pure white | | Zone 2 BG | 37 | turquoise / cool green | | Path FG | 194 (FG) | light green, muted | | Frame | 60 | darker blue | --- ## ๐Ÿ› ๏ธ Contribution Want to help improve this project? - Fork the repository - Make your changes - Open a merge request - Please keep consistent colors and styles --- ## ๐Ÿ“„ License MIT ยฉ 2026 Steffen Skui