From 0c272b8de28776beda2bd3a331fc26b18edca552 Mon Sep 17 00:00:00 2001 From: larstvei Date: Thu, 28 Mar 2024 02:10:54 +0100 Subject: [PATCH] Fix direnv setup Somehow, I had setup direnv totally wrong. It worked, but was extremely slow. Now it's just nice. --- modules/home.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/home.nix b/modules/home.nix index ce0323e..60bcc51 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -137,17 +137,26 @@ shellInit = '' set PATH "$PATH:/usr/local/texlive/2022/bin/universal-darwin/" - export DIRENV_LOG_FORMAT= + if test "$TERM" != "dumb" track_directories end - direnv reload 2> /dev/null + + set -gx DIRENV_LOG_FORMAT "" + direnv hook fish | source ''; }; starship = { enable = true; settings = { + custom = { + direnv = { + format = "[\\[direnv\\]]($style) "; + style = "fg:yellow dimmed"; + when = "env | grep -E '^DIRENV_FILE='"; + }; + }; character = { success_symbol = "[λ](bold green)"; error_symbol = "[λ](bold red)";