summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-08-11 12:24:11 +0100
committerubq323 <ubq323@ubq323.website>2024-08-11 12:24:11 +0100
commit2681099a1af7bbf1421dbad3e80ede1e7a5c4e61 (patch)
tree3163facc8338ea92955c754d17838ae8e55bf1ad /.bashrc
parent7bd1c144e0eac89812ce3ada28245d09ba406104 (diff)
misc
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc16
1 files changed, 15 insertions, 1 deletions
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"