Last active
December 24, 2021 10:40
-
-
Save romuald/ce04da26c5ff5c3918892bad010ef91d to your computer and use it in GitHub Desktop.
Plays a sound when touched
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# 1. run the script | |
# 2. "touch" the script to play a sound | |
while :; do | |
inotifywait -q -e attrib $0 | |
ogg123 -q /usr/share/sounds/gnome/default/alerts/glass.ogg | |
done | |
# apt install vorbis-tools gnome-control-center-data for player / soundfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment