completion / powerlinecolours

This commit is contained in:
Armin 2015-02-19 00:21:40 +01:00
commit 025336c83e
2 changed files with 4 additions and 70 deletions

View file

@ -42,7 +42,7 @@ zstyle ':completion:*:hosts' hosts $hosts
# Use caching so that commands like apt and dpkg complete are useable
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion::complete:*' cache-path ~/.oh-my-zsh/cache/
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/
# Don't complete uninteresting users
zstyle ':completion:*:*:*:users' ignored-patterns \
@ -66,3 +66,5 @@ if [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; then
zle -N expand-or-complete-with-dots
bindkey "^I" expand-or-complete-with-dots
fi

View file

@ -1,72 +1,4 @@
# 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
;;
434b0a6daa530638a964132e86b8a01d7b39aa7c)
colours=(254 130 196 32)
;;
esac
colours=(22 71 152 32)
# set colours from array:
prompt_context_user_fg="${colours[1]}"