From 4d8c196773422057275bb7608dc99fd8539e2010 Mon Sep 17 00:00:00 2001 From: steffen Date: Sat, 24 Jan 2026 05:35:50 +0000 Subject: [PATCH] md --- README.md | 142 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 93 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 67ee7d3..890ba5a 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ 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 +- ✨ 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 --- @@ -26,29 +26,35 @@ Elegant, portable, and easy-to-install Bash prompt with: ## πŸ—‚οΈ Repo Structure +```text dotfiles/ β”œβ”€β”€ ps1/ -β”‚ └── ps1.sh +β”‚ └── ps1.sh β”œβ”€β”€ install/ -β”‚ β”œβ”€β”€ install-linux-global.sh -β”‚ β”œβ”€β”€ install-macos-user.sh -β”‚ └── install-nerdfont.sh +β”‚ β”œβ”€β”€ install-linux-global.sh +β”‚ β”œβ”€β”€ install-macos-user.sh +β”‚ └── install-nerdfont.sh └── README.md +``` - +--- ## Banner (hostname + punchline + sysinfo) PΓ₯ Linux/WSL lastes ogsΓ₯ et banner ved login: + - `figlet $(hostname)` i farger - `figlet -f digital ""` i farger - `landscape-sysinfo` (hvis tilgjengelig) ### Punchline (global) + Banneret leser punchline fra: + - `/etc/ps1-punchline` Sett punchline slik: + ```bash echo "Din punchline" | sudo tee /etc/ps1-punchline >/dev/null ``` @@ -62,103 +68,141 @@ echo "Din punchline" | sudo tee /etc/ps1-punchline >/dev/null ```bash sudo bash install/install-linux-global.sh ``` + This: -Installs the prompt module to /etc/profile.d/ps1.sh +- 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 -Sources it in /etc/bash.bashrc so all users get the prompt +### 🍏 macOS (per-user) -After install, open a new shell to see the prompt. - -🍏 macOS (per-user) +```bash 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: +- Copies `ps1/ps1.sh` to `~/.config/ps1/ps1.sh` +- Adds a source block in `~/.bashrc` and `~/.bash_profile` +- Open a new terminal or reload your shell: +```bash source ~/.bashrc -πŸ–ΌοΈ Nerd Fonts (optional but recommended) +``` + +### πŸ–ΌοΈ Nerd Fonts (optional but recommended) + Nerd Fonts provide the best display for glyphs (powerline symbols): +```bash bash install/install-nerdfont.sh +``` + After install: -Open your terminal settings +- 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 -Set font to JetBrainsMono Nerd Font (or any Nerd Font) +--- -Terminal must use a Nerd Font for glyphs like ξ‚°, ξ‚Ά, ξ‚΄ to render correctly. +## βš™οΈ Overrides (Optional) -βš™οΈ 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. +``` + +Add these to your `~/.bashrc` or `~/.bash_profile`. + +--- + +## πŸ™… Disable Prompt (per user) -πŸ™… 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 +``` + +--- + +## πŸ§ͺ 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. +--- + +## πŸ’‘ Usage Notes + +Font matters: even with Nerd Fonts installed, you must select them in your terminal settings. Works on terminals like: -GNOME Terminal +- GNOME Terminal +- iTerm2 +- Kitty +- VS Code integrated terminal +- Windows Terminal (WSL) -iTerm2 +If you see squares or missing glyphs, your terminal is likely using a non-Nerd font. -Kitty +--- -VS Code integrated terminal +## πŸ“Έ Example Prompt -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. -πŸ› οΈ Contribution +--- + +## πŸ› οΈ Contribution + Want to help improve this project? -Fork the repository +- Fork the repository +- Make your changes +- Open a merge request +- Please keep consistent colors and styles -Make your changes +--- -Open a merge request +## πŸ“„ License -Please keep consistent colors and styles. - -πŸ“„ License -MIT Β© 2026 Your Name \ No newline at end of file +MIT Β© 2026 Your Name