From be933430232a97a43130eded470ee963ac1f4797 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 23 Dec 2024 18:05:40 +0000 Subject: [PATCH] Update zsh configuration --- nix/hosts/t490/configuration.nix | 3 - nix/modules/home-manager/features/cli/zsh.nix | 59 +------------------ 2 files changed, 2 insertions(+), 60 deletions(-) diff --git a/nix/hosts/t490/configuration.nix b/nix/hosts/t490/configuration.nix index a1a1025..bc6033a 100644 --- a/nix/hosts/t490/configuration.nix +++ b/nix/hosts/t490/configuration.nix @@ -223,9 +223,6 @@ programs.dconf.enable = true; - programs.zsh.enable = true; - programs.zsh.histSize = 5000; - users.defaultUserShell = "/etc/profiles/per-user/${username}/bin/zsh"; zramSwap.enable = true; diff --git a/nix/modules/home-manager/features/cli/zsh.nix b/nix/modules/home-manager/features/cli/zsh.nix index 37412bd..79c04b5 100644 --- a/nix/modules/home-manager/features/cli/zsh.nix +++ b/nix/modules/home-manager/features/cli/zsh.nix @@ -2,11 +2,12 @@ { programs.zsh = { - dotDir = ".config/zsh"; enable = true; enableCompletion = true; + enableSyntaxHighlighting = true; cdpath = [ "~/Code" ]; + dotDir = ".config/zsh"; shellAliases = (import ./zsh/aliases.nix); @@ -22,12 +23,6 @@ alias -s {pdf,PDF}="background okular" alias -s {zip,ZIP}="unzip -l" - background() { - for ((i=2;i<=$#;i++)); do - ''${@[1]} ''${@[$i]} &> /dev/null & - done - } - git() { if [[ "''${1}" == "root" ]]; then shift @@ -52,46 +47,9 @@ command yt-dlp --paths ~/Videos "$@" } - # Case insensitive autocompletion. - zstyle ":completion:*" matcher-list "" "m:{a-zA-Z}={A-Za-z}" "r:|=*" "l:|=* r:|=*" - autoload -Uz compinit && compinit - bindkey -s ^f "tmux-sessionizer\n" bindkey -s ^v "nvim\n" - clear-ls-all() { - clear - ls -al - zle reset-prompt - } - zle -N clear-ls-all - - clear-git-status() { - clear - git status - zle reset-prompt - } - zle -N clear-git-status - - clear-tree-2() { - clear - tree -L 2 - zle reset-prompt - } - zle -N clear-tree-2 - - clear-tree-3() { - clear - tree -L 3 - zle reset-prompt - } - zle -N clear-tree-3 - - bindkey '^G' clear-git-status - # bindkey '^H' clear-tree-3 - # bindkey '^J' clear-tree-2 - # bindkey '^K' clear-ls-all - setopt auto_cd setopt auto_pushd setopt pushd_ignore_dups @@ -102,21 +60,8 @@ enable = true; plugins = [ - { - name = "plugin/git"; - tags = [ "from:oh-my-zsh" ]; - } - - { - name = "plugin/vi-mode"; - tags = [ "from:oh-my-zsh" ]; - } - { name = "Aloxaf/fzf-tab"; } { name = "olets/zsh-abbr"; } - - { name = "zsh-users/zsh-completions"; } - { name = "zsh-users/zsh-syntax-highlighting"; } ]; }; };