diff --git a/marauder/default.nix b/marauder/default.nix index 7fa4795..a6542d4 100755 --- a/marauder/default.nix +++ b/marauder/default.nix @@ -98,11 +98,14 @@ programs.bash = { promptInit = '' - PROMPT_COLOR="1;31m" - ((UID)) && PROMPT_COLOR="1;32m" - BASE_PROMPT="💜\[\033[$PROMPT_COLOR\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\\$\[\033[0m\] " - BRANCH="\$(git branch --show-current 2>/dev/null)" - PS1="\n\[$(tput sc)\$([ -n "$BRANCH" ] && printf "%*s" $COLUMNS "$BRANCH")\$(tput rc)\]$BASE_PROMPT" + PS1="\[\e]0;\u@\h: \w\a\]" # window title + PS1+="\n" + PS1+="\$(printf \"%*s\" \$((\$COLUMNS + 9)) \"\[\e[1;33m\]\$(git branch --show-current 2>/dev/null)\")" # git branch + PS1+="\[\e[1G\]" # move cursor to beginning of line + PS1+="💜" # prompt symbol + PS1+="\[\033[1;$((UID ? 32 : 31))m\]" # prompt color + PS1+="[\u@\h:\w]\\$" + PS1+="\[\033[0m\] " # reset color ''; };