From ec63c9a2766dda532dd028ad19c3b9b5a5fcc531 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 11 Jul 2017 00:00:09 +0100 Subject: [PATCH] Start customizing promptw --- custom-oh-my-zsh/promptconfig.zsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 custom-oh-my-zsh/promptconfig.zsh diff --git a/custom-oh-my-zsh/promptconfig.zsh b/custom-oh-my-zsh/promptconfig.zsh new file mode 100644 index 00000000..f908f919 --- /dev/null +++ b/custom-oh-my-zsh/promptconfig.zsh @@ -0,0 +1,29 @@ +# This is the config I use for Powerlevel9k + +# Custom dir command +function my_dir(){ + homeIcon=" " + wpPluginsIcon="  " + wpThemesIcon="" + # Gets the path. + local current_path="$(print -P "%~")" + + # Replace either ~ or ~/ with  + current_path=$(echo $current_path | sed -r -e "s/\~?/$homeIcon/") + + # Replace wp-content/themes with .. if in theme + current_path=$(echo $current_path | sed -r -e "s/wp\-content\/themes\//\.\.\//") + + echo $current_path $wpPluginsIcon + +} +POWERLEVEL9K_CUSTOM_DIR="my_dir" +POWERLEVEL9K_CUSTOM_DIR_BACKGROUND="blue" +POWERLEVEL9K_CUSTOM_DIR_FOREGROUND="white" + + +# Left Prompt +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_dir rbenv vcs) + +# Right Prompt +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator time)