Created
July 25, 2016 16:01
-
-
Save jedahan/99e5523e29f67ce8f65c757cdaa1f307 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/geometry.zsh b/geometry.zsh | |
| index a857d4a..5ef1374 100644 | |
| --- a/geometry.zsh | |
| +++ b/geometry.zsh | |
| @@ -117,8 +117,13 @@ prompt_geometry_set_title() { | |
| } | |
| prompt_geometry_render() { | |
| + sum=0 # dumb hashing function | |
| + for i in ${#HOST}; do | |
| + ord=$(printf '%d' "'$HOST[$i]") | |
| + sum=$(($sum + ${i+1} * $ord)) | |
| + done | |
| PROMPT=" | |
| - %(?.$PROMPT_SYMBOL.$EXIT_VALUE_SYMBOL) %{$fg[blue]%}%3~%{$reset_color%} " | |
| + %(?.%F{$(($sum % 8))}$PROMPT_SYMBOL.$EXIT_VALUE_SYMBOL) %F{blue}%3~%{$reset_color%} " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment