config/users/pbsds/home/profiles/salert.nix

27 lines
739 B
Nix
Raw Normal View History

2024-02-01 00:55:00 +01:00
{ 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;
};
}