# 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 --- ## π§ 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 dotfiles/ βββ ps1/ β βββ ps1.sh βββ install/ β βββ install-linux-global.sh β βββ install-macos-user.sh β βββ install-nerdfont.sh βββ README.md --- ## π Installation ### π§ Linux / WSL (global, all users) ```bash sudo bash install/install-linux-global.sh ``` This: Installs the prompt module to /etc/profile.d/ps1.sh Sources it in /etc/bash.bashrc so all users get the prompt After install, open a new shell to see the prompt. π macOS (per-user) bash install/install-macos-user.sh This: Copies ps1/ps1.sh to ~/.config/ps1/ps1.sh Adds source block in ~/.bashrc and ~/.bash_profile Open a new terminal or reload your shell: source ~/.bashrc πΌοΈ Nerd Fonts (optional but recommended) Nerd Fonts provide the best display for glyphs (powerline symbols): bash 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. βοΈ Overrides (Optional) Sometimes autodetection doesnβt work (e.g., on macOS without fontconfig): Force Nerd Font glyphs: export PS1_FORCE_NF=1 Force fallback (no powerline glyphs): 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: export DISABLE_GLOBAL_PS1=1 Permanently: mkdir -p ~/.config/ps1 touch ~/.config/ps1/disable To re-enable: rm -f ~/.config/ps1/disable π§ͺ Testing After install, open a new shell and run: 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: