soundboard: add extra keys

This commit is contained in:
dogeystamp 2023-01-03 13:04:58 -05:00
parent db1c355282
commit 9fa0d6c1c0
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 15 additions and 9 deletions

View File

@ -33,15 +33,10 @@ super + asciitilde
# start sound
KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
if [ -z "$SB_DIR" ]; then \
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';\
exit 1;\
fi;\
snd_id="{0-9}";\
id=$(cat /dev/random | base32 | head -c 5);\
socket="$SB_DIR/cur/sb-socket$snd_id-$id";\
mpv --no-resume-playback --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
rm -f "$socket"
sb-play "{0-9}"
KP_{Divide,Multiply,Delete}
sb-play "1{0-2}"
# stop specific sound
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}

View File

@ -0,0 +1,11 @@
#!/bin/sh
if [ -z "$SB_DIR" ]; then
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';
exit 1;
fi;
snd_id="$1"
id=$(cat /dev/random | base32 | head -c 5);\
socket="$SB_DIR/cur/sb-socket$snd_id-$id";\
mpv --no-resume-playback --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
rm -f "$socket"