slack script: redirect sound to null
This commit is contained in:
parent
f049e72130
commit
1d944cc6ec
1 changed files with 8 additions and 3 deletions
|
@ -63,7 +63,9 @@ ERROR_BLOCKS=$(
|
|||
)
|
||||
|
||||
# Initialise sound playback
|
||||
mpv --volume=0 --start=0 --length=0.1 "${HOME}/dotfiles/gruvbox-95/sounds/st-computer-on.mp3"
|
||||
|
||||
mpv --volume=0 --start=0 --length=0.1 "${HOME}/dotfiles/sounds/star-trek-computer-success.mp3" \
|
||||
>/dev/null 2>&1
|
||||
sleep 1
|
||||
|
||||
# Process notification
|
||||
|
@ -72,11 +74,14 @@ if [ "$2" != "error" ]; then
|
|||
-H 'Content-type: application/json' \
|
||||
--data '{"text":"🟢 '"$3"'"}' \
|
||||
"$WEBHOOK"
|
||||
mpv --volume=100 "${HOME}/dotfiles/sounds/star-trek-computer-success.mp3"
|
||||
mpv --volume=100 "${HOME}/dotfiles/sounds/star-trek-computer-success.mp3" \
|
||||
>/dev/null 2>&1
|
||||
|
||||
else
|
||||
curl -X POST \
|
||||
-H 'Content-type: application/json' \
|
||||
--json "$ERROR_BLOCKS" \
|
||||
"$WEBHOOK"
|
||||
mpv --volume=100 "${HOME}/dotfiles/sounds/star-trek-computer-error.mp3"
|
||||
mpv --volume=100 "${HOME}/dotfiles/sounds/star-trek-computer-error.mp3" \
|
||||
>/dev/null 2>&1
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue