- #!/usr/bin/zsh
- cd /d/soundboard
- xinput test `xinput list | grep "Logitech USB Receiver" | grep -oE "id=[0-9]+" | grep -oE "[0-9]+"` | while read in ; do; [[ $in = "key press 71" || $in = "key press 9" ]] && cvlc --no-loop --play-and-exit "`ls --indicator-style=none -- Applause\ [0-9]*.* | shuf -n 1`" 2>/dev/null 1>/dev/null &;
- [[ $in = "key press 60" ]] && cvlc --no-loop --play-and-exit "`ls --indicator-style=none -- Laugh\ [0-9]*.* | shuf -n 1`" 2>/dev/null 1>/dev/null &
- done
|