dotfiles/zsh.d/prompt.zsh

27 lines
848 B
Bash

# Use a prompt, depending on what is available:
# 1. starship
# 2. p10k
# 3. manjaro
if (( $+commands[starship] )); then
eval "$(starship init zsh)"
else
if [[ -s ~/.p10k.zsh ]]; then
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
source ~/.p10k.zsh
else
# Use powerline
USE_POWERLINE="true"
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
source /usr/share/zsh/manjaro-zsh-prompt
fi
fi
fi