From 9d400eec55f1b38681a1a88c0cb59e4febdbcbbd Mon Sep 17 00:00:00 2001 From: joy Date: Sat, 5 Oct 2024 00:27:30 +0200 Subject: [PATCH] substring --- modules/apps/home/zsh/default.nix | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/modules/apps/home/zsh/default.nix b/modules/apps/home/zsh/default.nix index f567fd0..5208fa7 100644 --- a/modules/apps/home/zsh/default.nix +++ b/modules/apps/home/zsh/default.nix @@ -1,30 +1,46 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.zsh = { enable = true; + enableAutosuggestions = true; syntaxHighlighting.enable = true; enableCompletion = true; - # autosuggestion.enable = true; - historySubstringSearch.enable = true; dotDir = ".config/zsh"; - initExtra = "PROMPT='%F{green}%~%f '"; shellAliases = { - v = "hx"; - cat = "bat"; cn = "cd ~/nix"; ls = "${pkgs.eza}/bin/eza --icons -a --group-directories-first"; + v = "hx"; + cat = "bat"; pu = "sh ~/nix/modules/apps/home/zsh/scripts/push.sh"; ip = "sh ~/nix/modules/apps/home/zsh/scripts/ip.sh"; rb = "sh ~/nix/modules/apps/home/zsh/scripts/rebuild.sh"; fr = "sudo systemctl reboot --firmware"; - ser = "ssh root@joygnu.org"; up = "sudo nix flake update ~/nix"; del = "sudo nix-collect-garbage -d"; dn = "dotnet new console"; dr = "dotnet run"; + backup = "tar -czvf ~/config_backup.tar.gz ~/.config/zsh"; }; history.size = 1000000; history.path = ".config/zsh/history"; + + # plugins = [ + # { + # name = "zsh-autosuggestions"; + # src = pkgs.fetchFromGitHub { + # owner = "zsh-users"; + # repo = "zsh-autosuggestions"; + # rev = "v0.4.0"; # Version + # sha256 = "sha256-bBqJCkhygrXqAfWBsvUNpXu9IrwLyn/ypmTRKSVP0Xw="; # Fetched hash + # }; + # } + # ]; + # }; + oh-my-zsh = { + enable = true; + plugins = [ "git" "history-substring-search" ]; + theme = "simple"; + }; }; }