From 54c0d66f8cef119b8bde39d5ad44c4f91436d350 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Fri, 20 May 2016 10:10:55 +0200 Subject: just adding a comment --- prompt_adam3_setup | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'prompt_adam3_setup') diff --git a/prompt_adam3_setup b/prompt_adam3_setup index 927955a..d0b160f 100644 --- a/prompt_adam3_setup +++ b/prompt_adam3_setup @@ -16,13 +16,14 @@ prompt_adam3_setup () { prompt_adam3_color3=${3:-'cyan'} prompt_adam3_color4=${4:-'green'} + # Change color of host, based on hostname if [[ $prompt_adam3_color1 == 'multi' ]]; then - #prompt_adam3_hostnamecolor=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 24)}') - #prompt_adam3_hostnamebold=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 2)}') + prompt_adam3_hostnamecolor=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 24)}') + prompt_adam3_hostnamebold=$(hostname | od | tr ' ' '\n' | awk '{total = total + $1}END{print 1 + (total % 2)}') # for testing purposes - prompt_adam3_hostnamecolor=$(( ( $RANDOM % 24 ) + 1 )) - prompt_adam3_hostnamebold=$(( $RANDOM % 2 )) + #prompt_adam3_hostnamecolor=$(( ( $RANDOM % 24 ) + 1 )) + #prompt_adam3_hostnamebold=$(( $RANDOM % 2 )) # Possible prompt colors prompt_adam3_hostnamecolors=(black,red black,green black,yellow black,blue black,magenta black,cyan red,white red,yellow red,cyan green,black green,blue yellow,black yellow,blue blue,white blue,red blue,yellow magenta,white magenta,yellow cyan,white cyan,blue white,black white,red white,blue white,magenta) -- cgit v1.2.3