diff options
author | Josh Rahm <rahm@google.com> | 2021-11-16 14:14:46 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2021-11-16 14:14:46 -0700 |
commit | 5d45e9d04905ffe65bffce86fb29811f778580c1 (patch) | |
tree | 936ff693dd2548be9479d7f220972abf3496c557 /prompts/strange.zsh | |
parent | 81f1693da621bfad0a970b339597c4fef736d27a (diff) | |
parent | a993438f98d5d8efda464046eb40e7fdf70d2dfa (diff) | |
download | zshrcd-5d45e9d04905ffe65bffce86fb29811f778580c1.tar.gz zshrcd-5d45e9d04905ffe65bffce86fb29811f778580c1.tar.bz2 zshrcd-5d45e9d04905ffe65bffce86fb29811f778580c1.zip |
Merge branch 'main' of git.josher.dev:zshrcd
Diffstat (limited to 'prompts/strange.zsh')
-rw-r--r-- | prompts/strange.zsh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/prompts/strange.zsh b/prompts/strange.zsh new file mode 100644 index 0000000..ee5a635 --- /dev/null +++ b/prompts/strange.zsh @@ -0,0 +1,21 @@ +PURPLE="%{\x1b[01;35m%}" +RED="%{\x1b[01;31m%}" +RESET="%{\x1b[0m%}" + +if [[ "$(hostname)" == *strange* ]] ; then + color1=$RED + color2=$PURPLE +else + color1=$PURPLE + color2=$RED +fi + +function wrap { + echo "${color1}[$1${color1}]\$${RESET} " +} + +PROMPT_END=" " +PROMPT_REND=" " + +PROMPT='$(wrap "$(simple_prompt $color1 $color2)")' +RPROMPT='$(simple_rprompt $color1 $color2)' |