diff --git a/bash/bash.d/prompt_command b/bash/bash.d/prompt_command index 0d961a1..1f2d01e 100644 --- a/bash/bash.d/prompt_command +++ b/bash/bash.d/prompt_command @@ -52,51 +52,6 @@ function vte_thing() { export PROMPT_COMMAND=__prompt_command -function __colored_hostname() { - local HOST="${1:-$HOSTNAME}" - local color="${2:-$(color)}" - local PS1 - - if color ; then - case "${HOSTNAME%%.*}" in - 'esson') PS1+="${IGre}\h${RCol}";; - 'tinsmith') PS1+="${Gre}\h${RCol}";; - 'blacksmith') PS1+="${Blu}\h${RCol}";; - 'locksmith') PS1+="${Pur}\h${RCol}";; - 'bladesmith') PS1+="${Yel}\h${RCol}";; - 'gunsmith') PS1+="${Red}\h${RCol}";; - 'goldsmith') PS1+="${IYel}\h${RCol}";; - 'lilo'*) PS1+="${BWhi}\h${RCol}";; - 'hg'*) PS1+="${BRed}\h${RCol}";; - 'gouda'|'bunnik'|'houten'|'zandberg'|'bussum'|'baarn') PS1+="${Gre}${On_Whi}HEF:${Blu}${On_Whi}\h${RCol}";; - 'messier'*) PS1+="${Blu}Astro:${Red}\h${RCol}";; - *) PS1+="${Blu}${On_Whi}\h${RCol}";; - esac - else - PS1+="\h" - fi - - echo "$PS1" -} - -function __colored_username() { - local USER="${1:-$USER}" - local color="${2:-$(color)}" - local PS1 - - if color ; then - case "${USER}" in - 'root') PS1+="${Red}\u${RCol}";; - 'kastdeur'|'ericteunis') PS1+="${Gre}\u${RCol}";; - *) PS1+="${Blu}\u${RCol}";; - esac - else - PS1+="\u" - fi - - echo "$PS1" -} - function __prompt_command() { local RETVAL=$? if [ ! $RETVAL -ne 0 ]; then @@ -123,7 +78,7 @@ function __prompt_command() { #user@hostname if color ; then - PS1+="$(__colored_username)" + PS1+="${Gre}\u${RCol}" else PS1+="\u" fi @@ -131,7 +86,18 @@ function __prompt_command() { PS1+="@" if color ; then - PS1+="$(__colored_hostname)" + case "${HOSTNAME%%.*}" in + 'esson') PS1+="${IGre}\h${RCol}";; + 'tinsmith') PS1+="${Gre}\h${RCol}";; + 'blacksmith') PS1+="${Blu}\h${RCol}";; + 'locksmith') PS1+="${Pur}\h${RCol}";; + 'gunsmith') PS1+="${Red}\h${RCol}";; + 'lilo'*) PS1+="${BWhi}\h${RCol}";; + 'hg'*) PS1+="${BRed}\h${RCol}";; + 'gouda'|'bunnik'|'houten'|'zandberg'|'bussum'|'baarn') PS1+="${Gre}${On_Whi}HEF:${Blu}${On_Whi}\h${RCol}";; + 'messier'*) PS1+="${Blu}Astro:${Red}\h${RCol}";; + *) PS1+="${Blu}${On_Whi}\h${RCol}";; + esac else PS1+="\h" fi diff --git a/polybar/config b/polybar/config index 672622c..064442f 100644 --- a/polybar/config +++ b/polybar/config @@ -66,7 +66,7 @@ font-4 = fixed:pixelsize=10;1 ;wm-restack = bspwm ;wm-restack = i3 -override-redirect = false +override-redirect = true ;scroll-up = bspwm-desknext ;scroll-down = bspwm-deskprev