# custom colour definitions for powerline theme (oh-my-zsh) # this file should be symlinked to ~/.powerlinecolours if you # want to make use of it. # get your hostname checksum with: # OSX: # echo -n "$(hostname)" | shasum | cut -d" " -f 1 # Linux: # echo -n "$(hostname)" | sha1sum | cut -d" " -f 1 # c7d8a6d722a1ec9a16fae165177c418d4fd63175 # use shasum on Mac OS X, sha1sum on Linux: if [[ "$(uname)" == "Darwin" ]]; then shasum_cmd="shasum" else shasum_cmd="sha1sum" fi # calculate hostname sha1 hash="$(echo -n "$(hostname)" | $shasum_cmd | cut -d" " -f 1)" case "$hash" in # specify colour themes for different hosts here (to see the ccolour codes, use the 256-colour-test.py script): c4c948228b9947cec128662a414e1f4194573329) colours=(254 24 208 236) # \ \ \ \________________> prompt background colour for root # \ \ \__________________> prompt foreground colour for root # \ \_____________________> prompt background colour for user # \_______________________> prompt foreground colour for user ;; c7d8a6d722a1ec9a16fae165177c418d4fd63175) colours=(253 68 196 32) # \ \ \ \________________> prompt background colour for root # \ \ \__________________> prompt foreground colour for root # \ \_____________________> prompt background colour for user # \_______________________> prompt foreground colour for user ;; 09407639790bbb3778e1c2a9f81c0680186097d1) colours=(254 62 196 32) # \ \ \ \________________> prompt background colour for root # \ \ \__________________> prompt foreground colour for root # \ \_____________________> prompt background colour for user # \_______________________> prompt foreground colour for user ;; 0ccd98ec02bedc50fef38fc9f285eb14b63c89a4) colours=(254 130 196 32) # \ \ \ \________________> prompt background colour for root # \ \ \__________________> prompt foreground colour for root # \ \_____________________> prompt background colour for user # \_______________________> prompt foreground colour for user ;; esac # set colours from array: prompt_context_user_fg="${colours[1]}" prompt_context_user_bg="${colours[2]}" prompt_context_root_fg="${colours[3]}" prompt_context_root_bg="${colours[4]}"