dotfiles/bin/play_error_sound.sh

10 lines
290 B
Bash
Raw Normal View History

2023-12-23 20:13:47 -07:00
#!/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: