From 395c271eb6fa6aa3eb2fc4f411cd7bab43b54120 Mon Sep 17 00:00:00 2001 From: Kyler Clay Date: Wed, 2 Oct 2024 04:08:52 -0400 Subject: [PATCH] Commit for generation 167 --- glasshouse-desktop/modules/zshell.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/glasshouse-desktop/modules/zshell.nix b/glasshouse-desktop/modules/zshell.nix index 0dc541a..10e91ef 100644 --- a/glasshouse-desktop/modules/zshell.nix +++ b/glasshouse-desktop/modules/zshell.nix @@ -203,6 +203,15 @@ safe_rm() { done } +nix-beep() { + sounds_enabled && (aplay ~/sound/sys/nixswitch-start.wav > /dev/null 2>&1 &) + nix "$@" + if [ "$?" -eq "0" ]; then + sounds_enabled && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &) + else + sounds_enabled && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &) + fi +} nixswitch() { sounds_enabled && (aplay ~/sound/sys/nixswitch-start.wav > /dev/null 2>&1 &) @@ -219,7 +228,11 @@ nixswitch() { fi sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse" builtin cd $OLDPWD - sounds_enabled && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &) + if [ "$?" -eq "0" ]; then + sounds_enabled && (aplay ~/sound/sys/update.wav > /dev/null 2>&1 &) + else + sounds_enabled && (aplay ~/sound/sys/error.wav > /dev/null 2>&1 &) + fi } journal() { # journal for keeping track of stuff I do that isn't declared in my nix config