From 1206290c6919f46a4897afc96590279cf3dcf059 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Thu, 16 Sep 2021 22:13:56 -0400 Subject: [PATCH] [O] Separate prompt.sh --- scripts/includes/prompt.sh | 13 +++++++++++++ scripts/zshrc.sh | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 scripts/includes/prompt.sh diff --git a/scripts/includes/prompt.sh b/scripts/includes/prompt.sh new file mode 100644 index 0000000..987c99d --- /dev/null +++ b/scripts/includes/prompt.sh @@ -0,0 +1,13 @@ +# Bash PS1 (Not updated) +PS1='\n\[\e[m\][\[\e[35m\]\D{%y-%m-%d} \t\[\e[m\]] [\[\e[34m\]\h\[\e[m\]] [\[\e[33m\]\u\[\e[m\]] \[\e[37m\]\w \n\[\e[m\]$ ' + +# ZSH +DEFAULT_USER="hykilpikonna" +PROMPT=$(color "&n&5%D{%a %m-%d %H:%M}&r | &1%m&r |") +# Shows a cat if I'm hykilpikonna +if [[ "$USER" != "$DEFAULT_USER" ]]; then + PROMPT=$(color "$PROMPT &e%n&r") +else + PROMPT=$(color "$PROMPT 🐱") +fi +PROMPT=$(color "$PROMPT &r%~&n> ") diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index a5ebfc1..23f8d5f 100644 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -96,20 +96,6 @@ cut() { ffmpeg -i $1 -codec copy -ss $start -t $2 Cut\ $1 } -# Bash PS1 (Not updated) -PS1='\n\[\e[m\][\[\e[35m\]\D{%y-%m-%d} \t\[\e[m\]] [\[\e[34m\]\h\[\e[m\]] [\[\e[33m\]\u\[\e[m\]] \[\e[37m\]\w \n\[\e[m\]$ ' - -# ZSH -DEFAULT_USER="hykilpikonna" -PROMPT=$(color "&n&5%D{%a %m-%d %H:%M}&r | &1%m&r |") -# Shows a cat if I'm hykilpikonna -if [[ "$USER" != "$DEFAULT_USER" ]]; then - PROMPT=$(color "$PROMPT &e%n&r") -else - PROMPT=$(color "$PROMPT 🐱") -fi -PROMPT=$(color "$PROMPT &r%~&n> ") - # Includes . $SCR/includes/*