diff options
author | Dennis Eriksen <dennis@eriksen.im> | 2016-05-20 10:10:55 +0200 |
---|---|---|
committer | Dennis Eriksen <dennis@eriksen.im> | 2016-05-20 10:10:55 +0200 |
commit | 54c0d66f8cef119b8bde39d5ad44c4f91436d350 (patch) | |
tree | 1c4e4ad86cf040030318f4c772d66126d2fe3be0 /prompt_adam3_setup | |
parent | make promptchar bold red if root (diff) | |
download | adam3-54c0d66f8cef119b8bde39d5ad44c4f91436d350.tar.gz |
just adding a comment
Diffstat (limited to '')
-rw-r--r-- | prompt_adam3_setup | 9 |
1 files changed, 5 insertions, 4 deletions
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) |