From 61ca7ef3bb1cf071d6a9120d4cfbf48290d73356 Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 31 Mar 2024 23:52:36 +0200 Subject: [PATCH] home-profile: fix zsh propt if no env var --- configurations/profile/home/shell/zsh.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configurations/profile/home/shell/zsh.nix b/configurations/profile/home/shell/zsh.nix index af2ec3a..3c8c539 100644 --- a/configurations/profile/home/shell/zsh.nix +++ b/configurations/profile/home/shell/zsh.nix @@ -92,15 +92,17 @@ in ${makeIfVar "__MATERUS_HM_ZSH_PROMPT" "p10k" '' 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'' + fi + if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then + source "${extraPlugins.powerlevel10k.fullPath}" + fi + '' } if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then __MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-1}"; else __MATERUS_HM_ZSH_256COLORS="''${__MATERUS_HM_ZSH_256COLORS:-0}"; fi - if [[ -f "${extraPlugins.powerlevel10k.fullPath}" ]]; then - source "${extraPlugins.powerlevel10k.fullPath}" - fi + if [[ -f "${extraPlugins.sudo.fullPath}" ]]; then source "${extraPlugins.sudo.fullPath}" fi