all repos — nixfiles @ fb91cda1b1f8fe904001b8814b160b8431b8f59c

System and user configuration, managed by nix and home-manager

zsh: don't source powershell when TERM in dumb
Alan Pearce alan@alanpearce.eu
Wed, 07 Jun 2023 09:06:22 +0200
commit

fb91cda1b1f8fe904001b8814b160b8431b8f59c

parent

468e3de0842b7fbc4549557e1d261163be686582

1 files changed, 7 insertions(+), 5 deletions(-)

jump to
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -28,6 +28,11 @@ cp -a $PWD $out/       '';
     };
   };
+  powerlevel = (mkZshPlugin {
+    name = "zsh-powerlevel10k";
+    src = pkgs.zsh-powerlevel10k.src;
+    file = "powerlevel10k.zsh-theme";
+  }).src;
 in
 {
   home.packages = with pkgs; [
@@ -87,11 +92,6 @@ rev = "598675303044df8e9d04722f3adff4f63a238922";           # date = 2017-07-19T21:59:49+09:00;
           sha256 = "08bjm1dd2mpv8rk8x6yvm6gj490rgimmiq7ln4jr5hik2k3mm82r";
         };
-      }
-      {
-        name = "zsh-powerlevel10k";
-        src = pkgs.zsh-powerlevel10k.src;
-        file = "powerlevel10k.zsh-theme";
       }
     ];
 
@@ -215,6 +215,8 @@ if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then           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 =