diff --git a/README.md b/README.md index 53680fb..d4d9c27 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ If you don't want to display your username (the green or red (root) colors are s POWERLINE_HIDE_USER_NAME="true" ``` +If you don't want to display your hostname (the green or red (root) colors are still there): + +``` +POWERLINE_HIDE_HOST_NAME="true" +``` + If you don't want the blank line before the prompt: ``` diff --git a/powerline.zsh-theme b/powerline.zsh-theme index 1916d51..a92dc49 100644 --- a/powerline.zsh-theme +++ b/powerline.zsh-theme @@ -14,7 +14,11 @@ else POWERLINE_RIGHT_A="" fi -if [ "$POWERLINE_HIDE_USER_NAME" = "" ]; then +if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then + POWERLINE_USER_NAME="%n@%M" +elif [ "$POWERLINE_HIDE_USER_NAME" != "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then + POWERLINE_USER_NAME="@%M" +elif [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" != "" ]; then POWERLINE_USER_NAME="%n" else POWERLINE_USER_NAME=""