From c11c355246c475b57d154218c880df97921ebdb1 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Thu, 1 Sep 2022 08:41:56 -0700 Subject: [PATCH] Use packaged p10k on arch systems --- .zshrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index f5a13c3..57f2c2f 100644 --- a/.zshrc +++ b/.zshrc @@ -14,7 +14,12 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -source ~/.p10k/powerlevel10k.zsh-theme +# Archlinux packages p10k but nothing else does, so we have to check where p10k is +if [[ -a /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme ]]; then + source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme +else + source ~/.p10k/powerlevel10k.zsh-theme +fi # Print user@host into title so terminal tabs are correct # Despite being called precmd() this executes after process exits, before prompt