Skip to content

Instantly share code, notes, and snippets.

@romuald
Last active December 24, 2021 10:40
Show Gist options
  • Save romuald/ce04da26c5ff5c3918892bad010ef91d to your computer and use it in GitHub Desktop.
Save romuald/ce04da26c5ff5c3918892bad010ef91d to your computer and use it in GitHub Desktop.
Plays a sound when touched
#!/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