summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-06-07 09:06:22 +0200
committerAlan Pearce2023-06-07 09:06:22 +0200
commitfb91cda1b1f8fe904001b8814b160b8431b8f59c (patch)
treecb726dedcf7f68fc00935c47927697e2d5af2ad7
parent468e3de0842b7fbc4549557e1d261163be686582 (diff)
downloadnixfiles-fb91cda1b1f8fe904001b8814b160b8431b8f59c.tar.lz
nixfiles-fb91cda1b1f8fe904001b8814b160b8431b8f59c.tar.zst
nixfiles-fb91cda1b1f8fe904001b8814b160b8431b8f59c.zip
zsh: don't source powershell when TERM in dumb
-rw-r--r--user/settings/zsh.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 22899397..6cec6e58 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -28,6 +28,11 @@ let
       '';
     };
   };
+  powerlevel = (mkZshPlugin {
+    name = "zsh-powerlevel10k";
+    src = pkgs.zsh-powerlevel10k.src;
+    file = "powerlevel10k.zsh-theme";
+  }).src;
 in
 {
   home.packages = with pkgs; [
@@ -88,11 +93,6 @@ in
           sha256 = "08bjm1dd2mpv8rk8x6yvm6gj490rgimmiq7ln4jr5hik2k3mm82r";
         };
       }
-      {
-        name = "zsh-powerlevel10k";
-        src = pkgs.zsh-powerlevel10k.src;
-        file = "powerlevel10k.zsh-theme";
-      }
     ];
 
     shellAliases = {
@@ -215,6 +215,8 @@ in
           source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh"
         fi
         typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
+        fpath+=${powerlevel}
+        source ${powerlevel}/powerlevel10k.zsh-theme
       fi
     '';
     initExtra =