From 992c15e7d64cf00b83f5af6e4bf16cdb7eb81135 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Thu, 5 Aug 2021 13:15:57 -0500 Subject: [PATCH] Prefer starship for prompts --- zshrc | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/zshrc b/zshrc index 3637394..ccadf9c 100644 --- a/zshrc +++ b/zshrc @@ -8,19 +8,23 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -# Use powerline -USE_POWERLINE="true" -# Source manjaro-zsh-configuration -if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then - source /usr/share/zsh/manjaro-zsh-config -fi -# Use manjaro zsh prompt -if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then - source /usr/share/zsh/manjaro-zsh-prompt -fi - # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ -s ~/.p10k.zsh ]] && source ~/.p10k.zsh +if [[ -n "$(command -v starship)" ]]; then + eval "$(starship init zsh)" +else + # Use powerline + USE_POWERLINE="true" + # Source manjaro-zsh-configuration + if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then + source /usr/share/zsh/manjaro-zsh-config + fi + # Use manjaro zsh prompt + if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then + source /usr/share/zsh/manjaro-zsh-prompt + fi + + [[ -s ~/.p10k.zsh ]] && source ~/.p10k.zsh +fi # Custom aliases [[ -s ~/.aliases ]] && source ~/.aliases