dotfiles/bin/play_error_sound.sh
Akemi Izuko f6881cea7a
Init again
The dotfiles are back
2022-09-06 23:34:19 -06:00

10 lines
290 B
Bash
Executable file

#!/bin/bash
# Play MacOS system error sound: System Preferences -> Sound -> Sound Effects
if [[ $(uname) == 'Darwin' ]]; then
afplay $(defaults read .GlobalPreferences.plist \
| awk '/sound.beep.sound"/ { gsub(/(.*= ")|(";)/, ""); print }')
fi
# vim: set syntax=bash ff=unix: