diff --git a/zsh/.zshrc b/zsh/.zshrc index 4cdc3e0..5737799 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,11 +1,18 @@ -if [[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh"; fi + +export THEME="starship" + +if [ "$THEME" = "powerlevel" ]; then + [[ -r "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" ]] && source "$HOME/.cache/p10k-instant-prompt-${(%):-%n}.zsh" +fi source $ZDOTDIR/exports.zsh source $ZDOTDIR/dircolor.zsh source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh -source $HOME/.config/p10k/powerlevel10k.zsh-theme +if [ "$THEME" = "powerlevel" ]; then + source $HOME/.config/p10k/powerlevel10k.zsh-theme +fi autoload -Uz compinit bashcompinit compinit -d $HOME/.cache/zsh/compdump @@ -18,3 +25,7 @@ for file in $ZDOTDIR/plgs/*.zsh; do source "$file"; done [[ -f $ZDOTDIR/.p10k.zsh ]] && source $ZDOTDIR/.p10k.zsh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +if [ "$THEME" = "starship" ]; then + eval "$(starship init zsh)" +fi diff --git a/zsh/exports.zsh b/zsh/exports.zsh index 321f358..727879e 100644 --- a/zsh/exports.zsh +++ b/zsh/exports.zsh @@ -16,3 +16,4 @@ export path=($path $GEM_HOME/bin) #stuff export os=$(grep -E "^ID=" /etc/*release | cut -d= -f2) export wsl=$(uname -r | cut -d'-' -f3) +export STARSHIP_CONFIG=$ZDOTDIR/starship.toml