soundboard: add extra keys
This commit is contained in:
parent
db1c355282
commit
9fa0d6c1c0
@ -33,15 +33,10 @@ super + asciitilde
|
|||||||
|
|
||||||
# start sound
|
# start sound
|
||||||
KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||||
if [ -z "$SB_DIR" ]; then \
|
sb-play "{0-9}"
|
||||||
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';\
|
|
||||||
exit 1;\
|
KP_{Divide,Multiply,Delete}
|
||||||
fi;\
|
sb-play "1{0-2}"
|
||||||
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"
|
|
||||||
|
|
||||||
# stop specific sound
|
# stop specific sound
|
||||||
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||||
|
11
src/.local/bin/deskutils/soundboard/sb-play
Executable file
11
src/.local/bin/deskutils/soundboard/sb-play
Executable 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"
|
Loading…
Reference in New Issue
Block a user