home: add salert

This commit is contained in:
Peder Bergebakken Sundt 2024-02-01 00:55:00 +01:00
parent f8a81ff83b
commit 4336b974a4
7 changed files with 27 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6,5 +6,6 @@
./profiles/gnome ./profiles/gnome
./profiles/mpv.nix ./profiles/mpv.nix
./profiles/desktop.nix ./profiles/desktop.nix
./profiles/salert.nix
]; ];
} }

View File

@ -0,0 +1,26 @@
{ pkgs, lib, ... }:
let
inherit (lib) getExe;
inherit (pkgs) mpv;
in
{
programs = let
rcScript = ''
salert() {
local retval=$?
if test $retval -eq 0; then
#${getExe mpv} ${../files/sounds/TFH_MadameC_Sing.wav} --no-video --really-quiet || true
#${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0065.wav} --no-video --really-quiet || true
${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0134.wav} --no-video --really-quiet || true
else
${getExe mpv} ${../files/sounds/NTR-BKIE-USA-0137.wav} --no-video --really-quiet || true
fi
return $retval
}
'';
in {
# TODO: fish
bash.initExtra = rcScript;
zsh.initExtra = rcScript;
};
}