mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
completion / powerlinecolours
This commit is contained in:
parent
aff87a57db
commit
025336c83e
2 changed files with 4 additions and 70 deletions
|
|
@ -42,7 +42,7 @@ zstyle ':completion:*:hosts' hosts $hosts
|
||||||
|
|
||||||
# Use caching so that commands like apt and dpkg complete are useable
|
# Use caching so that commands like apt and dpkg complete are useable
|
||||||
zstyle ':completion::complete:*' use-cache 1
|
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
|
# Don't complete uninteresting users
|
||||||
zstyle ':completion:*:*:*:users' ignored-patterns \
|
zstyle ':completion:*:*:*:users' ignored-patterns \
|
||||||
|
|
@ -66,3 +66,5 @@ if [ "$DISABLE_COMPLETION_WAITING_DOTS" != "true" ]; then
|
||||||
zle -N expand-or-complete-with-dots
|
zle -N expand-or-complete-with-dots
|
||||||
bindkey "^I" expand-or-complete-with-dots
|
bindkey "^I" expand-or-complete-with-dots
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,72 +1,4 @@
|
||||||
# custom colour definitions for powerline theme (oh-my-zsh)
|
colours=(22 71 152 32)
|
||||||
# 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
|
|
||||||
|
|
||||||
# set colours from array:
|
# set colours from array:
|
||||||
prompt_context_user_fg="${colours[1]}"
|
prompt_context_user_fg="${colours[1]}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue