diff --git a/assets/sound/gitcheckout.wav b/assets/sound/gitcheckout.wav new file mode 100644 index 0000000..cf78422 Binary files /dev/null and b/assets/sound/gitcheckout.wav differ diff --git a/modules/home/environment/zshell.nix b/modules/home/environment/zshell.nix index 5b75403..6302638 100644 --- a/modules/home/environment/zshell.nix +++ b/modules/home/environment/zshell.nix @@ -54,6 +54,7 @@ #git "ga" = "playshellsound ${self}/assets/sound/gitadd.wav; git add"; + gco = "gitcheckout_sfx"; gcomm = "gitcommit_sfx"; gpush = "gitpush_sfx"; gpull = "gitpull_sfx"; @@ -71,6 +72,15 @@ runbg aplay "$1" fi } + gitcheckout_sfx() { + if git checkout "$@"; then + playshellsound ${self}/assets/sound/gitcheckout.wav + return 0 + else + playshellsound ${self}/assets/sound/error.wav + return 1 + fi + } gitrebase_sfx() { if git rebase "$@"; then playshellsound ${self}/assets/sound/gitrebase.wav