diff --git a/glasshouse-desktop/home/scripts/default.nix b/glasshouse-desktop/home/scripts/default.nix index 646aa61..0eaf312 100644 --- a/glasshouse-desktop/home/scripts/default.nix +++ b/glasshouse-desktop/home/scripts/default.nix @@ -8,11 +8,9 @@ splash = pkgs.writeShellScriptBin "splash" (builtins.readFile ./scripts/splash.sh); switchmon = pkgs.writeShellScriptBin "switchmon" (builtins.readFile ./scripts/switchmon.sh); - ls = pkgs.writeShellScriptBin "ls" (builtins.readFile ./scripts/ls.sh); nixswitch = pkgs.writeShellScriptBin "nixswitch" (builtins.readFile ./scripts/nixswitch.sh); garbage-collect = pkgs.writeShellScriptBin "garbage-collect" (builtins.readFile ./scripts/garbage-collect.sh); scheck = pkgs.writeShellScriptBin "scheck" (builtins.readFile ./scripts/s_check.sh); - cd = pkgs.writeShellScriptBin "cd" (builtins.readFile ./scripts/cd.sh); mcd = pkgs.writeShellScriptBin "mcd" (builtins.readFile ./scripts/mcd.sh); crs = pkgs.writeShellScriptBin "crs" (builtins.readFile ./scripts/crs.sh); nixcommit = pkgs.writeShellScriptBin "nixcommit" (builtins.readFile ./scripts/nixcommit.sh); @@ -39,11 +37,9 @@ record = pkgs.writeScriptBin "record" (builtins.readFile ./scripts/record.sh); in { home.packages = [ - ls nixswitch garbage-collect scheck - cd mcd crs nixcommit diff --git a/glasshouse-desktop/home/scripts/scripts/cd.sh b/glasshouse-desktop/home/scripts/scripts/cd.sh deleted file mode 100755 index 22f9569..0000000 --- a/glasshouse-desktop/home/scripts/scripts/cd.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/run/current-system/sw/bin/bash - -export SOUNDS_ENABLED=0 -eza -1 --group-directories-first --icons "$@" -builtin cd "$@" || exit -export SOUNDS_ENABLED=1 -s_check && (aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &) diff --git a/glasshouse-desktop/home/scripts/scripts/ls.sh b/glasshouse-desktop/home/scripts/scripts/ls.sh deleted file mode 100755 index 4bfe91a..0000000 --- a/glasshouse-desktop/home/scripts/scripts/ls.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/run/current-system/sw/bin/bash - -eza -1 --group-directories-first --icons "$@" -s_check && runbg aplay ~/sound/sys/ls.wav diff --git a/glasshouse-desktop/home/zsh/zshell.nix b/glasshouse-desktop/home/zsh/zshell.nix index b1e7044..bbd1cc4 100644 --- a/glasshouse-desktop/home/zsh/zshell.nix +++ b/glasshouse-desktop/home/zsh/zshell.nix @@ -61,6 +61,19 @@ nvimcfg = "nvim $HOME/dots/nixvim/config"; }; initExtra = '' + + ls() { + eza -1 --group-directories-first --icons "$@" + s_check && runbg aplay ~/sound/sys/ls.wav + } + + cd() { + export SOUNDS_ENABLED=0 + eza -1 --group-directories-first --icons "$@" + builtin cd "$@" || exit + export SOUNDS_ENABLED=1 + s_check && (aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &) + } if [ ! -e $HOME/.zsh_history ]; then touch $HOME/.zsh_history chmod 600 $HOME/.zsh_history