Skip to content

Commit

Permalink
Add powerlevel9k fallback mode for SSH clients without fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
lumbric committed May 12, 2018
1 parent 4729eaa commit a39cd84
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ fi

source ~/.dot-file-repo/zsh/powerlevel9k_settings.sh

# Fall back mode for powerlevel9k when SSH-ing to server with dot-file-repo and
# powerlevel9k installed, but dot-file-repo and fonts not available on client.
if [ -z $SSH_CLIENT ]; then
# this env variable will be available only if this .zshrc is used on client
export LC_CLIENT_HAS_DOT_FILE_REPO=1
fi
if [ -z $LC_CLIENT_HAS_DOT_FILE_REPO ]; then
source ~/.dot-file-repo/zsh/powerlevel9k_settings_no_font_fallback.sh
fi


# zsh-syntax-highlighting
# From here, maybe interesting:
Expand Down
11 changes: 11 additions & 0 deletions zsh/powerlevel9k_settings_no_font_fallback.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
POWERLEVEL9K_HOME_ICON=''
POWERLEVEL9K_HOME_SUB_ICON=''
POWERLEVEL9K_FOLDER_ICON=''
POWERLEVEL9K_SSH_ICON=''

POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=""
POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR=""
POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=""
POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR=""

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(host dir_writable dir vcs)

0 comments on commit a39cd84

Please sign in to comment.