summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
authorAlan Pearce2020-10-24 18:55:08 +0200
committerAlan Pearce2020-10-24 18:55:08 +0200
commit4af64edfc5c72f662b65897694e78d9eee661727 (patch)
tree416ee788f6f13e337067c6f97e22a53bf9b43cf5 /user/settings
parentdbfeb8be4b890dc56d2eaf8397f35c220215a9b7 (diff)
downloadnixfiles-4af64edfc5c72f662b65897694e78d9eee661727.tar.lz
nixfiles-4af64edfc5c72f662b65897694e78d9eee661727.tar.zst
nixfiles-4af64edfc5c72f662b65897694e78d9eee661727.zip
Reformat zsh.nix
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/zsh.nix38
1 files changed, 21 insertions, 17 deletions
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 6e34a5a0..d7c8c0d4 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -30,12 +30,13 @@ in
     zsh-completions
   ];
 
-  home.activation.linkOldZshHistory = config.lib.dag.entryAfter ["writeBoundary"] ''
-    if [[ ! -f ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history ]]; then
-      mkdir -p ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/
-      ln ~/.cache/zsh/history ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history
-    fi
-  '';
+  home.activation.linkOldZshHistory =
+    config.lib.dag.entryAfter [ "writeBoundary" ] ''
+      if [[ ! -f ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history ]]; then
+        mkdir -p ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/
+        ln ~/.cache/zsh/history ${config.home.sessionVariables.XDG_DATA_HOME}/zsh/history
+      fi
+    '';
 
   programs.zsh = {
     enable = true;
@@ -135,13 +136,13 @@ in
 
     shellAliases = {
       l = "ls ${lsOptions} -Bp";
-      l1="ls -1";
-      ls="ls ${lsOptions} -hF";
-      la="ls ${lsOptions} -hA";
-      ll="ls ${lsOptions} ${lsIsoDate} -hl";
-      lal="ll -A";
-      lla="lal";
-      llr="ll -t";
+      l1 = "ls -1";
+      ls = "ls ${lsOptions} -hF";
+      la = "ls ${lsOptions} -hA";
+      ll = "ls ${lsOptions} ${lsIsoDate} -hl";
+      lal = "ll -A";
+      lla = "lal";
+      llr = "ll -t";
 
       cg = "cd-gitroot";
       cdg = "cd-gitroot";
@@ -149,8 +150,10 @@ in
       https = "http --default-scheme https";
 
       history = "fc -l $(( $LINES - 2 ))";
-      hist-freq-lines = "fc -l -10000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less";
-      hist-freq-commands = "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -g | tail -n10 | less";
+      hist-freq-lines =
+        "fc -l -10000 | cut -d' ' -f4- | sort | uniq -c | sort -g | tail -n100 | less";
+      hist-freq-commands =
+        "fc -l -10000 | cut -d' ' -f4 | sort | uniq -c | sort -g | tail -n10 | less";
       wprop = "xprop | egrep '^WM_(CLASS|NAME|WINDOW_ROLE|TYPE)'";
 
       # Enable the following commands to support aliases.
@@ -214,7 +217,7 @@ in
       hop = "home-manager packages";
       hol = "home-manager generations";
 
-      nish  = "nix-shell";
+      nish = "nix-shell";
       nic = "nix-channel";
       nica = "nix-channel --add";
       nicl = "nix-channel --list";
@@ -263,5 +266,6 @@ in
     '' + builtins.readFile ../zsh/zshrc;
   };
 
-  home.file."${zshrc}".onChange = "${pkgs.zsh}/bin/zsh -i -c 'autoload -Uz compinit && compinit && zcompile ${zshrc}'";
+  home.file."${zshrc}".onChange =
+    "${pkgs.zsh}/bin/zsh -i -c 'autoload -Uz compinit && compinit && zcompile ${zshrc}'";
 }