From f3323b159b7dd5dd171f58fde37b2c0f0356c660 Mon Sep 17 00:00:00 2001 From: "Gal@Shefet" Date: Tue, 27 Sep 2022 06:32:00 -0400 Subject: [PATCH] Fixed omp prompt Fixed: .envrc shows up when `direnv` does not exists --- _home/dot_sz.shrc.d/97_chezmoi_aliases | 4 ++-- _home/private_dot_poshtheme.omp.json | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_home/dot_sz.shrc.d/97_chezmoi_aliases b/_home/dot_sz.shrc.d/97_chezmoi_aliases index 71f35c0..a5b4650 100644 --- a/_home/dot_sz.shrc.d/97_chezmoi_aliases +++ b/_home/dot_sz.shrc.d/97_chezmoi_aliases @@ -1,7 +1,7 @@ if [[ -n "$(which-command chezmoi)" ]]; then export CHEZMOIROOT="$(chezmoi source-path)" - export CZ="$CHEZMOIROOT/_home" - export CZ_X="$CHEZMOIROOT/_externals" + export CZ="$CHEZMOIROOT" + export CZ_X="$(readlink -f $CHEZMOIROOT/../_externals)" alias czcd="cd $CZ" alias czxcd="cd $CZ_X" diff --git a/_home/private_dot_poshtheme.omp.json b/_home/private_dot_poshtheme.omp.json index 89d46a7..fe8bca3 100644 --- a/_home/private_dot_poshtheme.omp.json +++ b/_home/private_dot_poshtheme.omp.json @@ -81,9 +81,9 @@ "style": "powerline", "properties": { "shell": "bash", - "command": "type -t direnv *>/dev/null && { direnv status *>&1 || true; } | grep \"Found RC allowed\"; true" + "command": "type -t direnv 2>/dev/null && { direnv status 2>&1 || true; } | grep \"Found RC allowed\"; true" }, - "template": "." + "template": "{{ if .Output }}.{{ end }}" }, { "type": "command", @@ -100,9 +100,9 @@ "trailing_diamond": "▓", "properties": { "shell": "bash", - "command": "type -t direnv *>/dev/null && { direnv status *>&1 || true; } | grep \"Found RC allowed\"; true" + "command": "type -t direnv 2>/dev/null && { direnv status 2>&1 || true; } | grep \"Found RC allowed\"; true" }, - "template": "envrc" + "template": "{{ if .Output }}envrc{{ end }}" } ] }, @@ -281,7 +281,7 @@ "invert_powerline": true, "powerline_symbol": "", "properties": { - "always_enabled": true + "always_enabled": false }, "style": "powerline", "template": "{{ if gt .Code 0 }}{{ .Meaning }}{{ else }}✔{{ end }} ", @@ -333,7 +333,7 @@ "invert_powerline": true, "style": "powerline", "powerline_symbol": "", - "template": "sw{{ printf \"%.0f%%\" .SwapPercentUsed }}", + "template": "   {{ printf \"%.0f%%\" .SwapPercentUsed }}", "type": "sysinfo" }, {