From 2681099a1af7bbf1421dbad3e80ede1e7a5c4e61 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 11 Aug 2024 12:24:11 +0100 Subject: misc --- .bashrc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to '.bashrc') diff --git a/.bashrc b/.bashrc index 245b45e..59beecc 100644 --- a/.bashrc +++ b/.bashrc @@ -5,7 +5,19 @@ # prompt PROMPT_DIRTRIM=0 -PS1='\[\e[90m\][\u@\h \W]\$\[\e[0m\] ' + +prompt_color() { + case "$1" in + snail) c=8 ;; + ubq323.website) c=92 ;; + joe) c=125 ;; + woman) c=136 ;; + *) c=72 ;; + esac + + PS1='\[\e[38;5;'"$c"'m\][\u@\h \W]\$\[\e[0m\] ' +} +prompt_color "$(uname -n)" # history shopt -s histappend @@ -43,6 +55,7 @@ export LUA_CPATH_5_3="$HOME/.local/lib/lua/5.3/?.so;;" export LUA_CPATH_5_1="$HOME/.local/lib/lua/5.1/?.so;;" export MANPATH="$HOME/.local/share/man:" + add_path () { case ":$PATH:" in *:"$1":*) @@ -55,6 +68,7 @@ add_path () { add_path ~/.local/bin add_path ~/.luarocks/bin add_path ~/bin +add_path ~/perl5/bin lb=~/."$(uname -n)".bashrc [ -f "$lb" ] && . "$lb" -- cgit v1.2.3