Skip to content

Instantly share code, notes, and snippets.

@miketoth
Last active June 30, 2018 16:19
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miketoth/fe7d60ca43efd0130715 to your computer and use it in GitHub Desktop.
Save miketoth/fe7d60ca43efd0130715 to your computer and use it in GitHub Desktop.
TURN DOWN FOR WHAT MAC ONLY SORRY
#!/bin/bash
VOL=$(osascript -e "output volume of (get volume settings)")
NEWVOL=0
while true
do
if (($VOL == $NEWVOL)); then
$(osascript -e "set volume output volume 100")
echo $(osascript -e "output volume of (get volume settings)")
$(afplay /Users/skullum/Desktop/just_what.mp3)
fi
VOL=$(osascript -e "output volume of (get volume settings)")
done
@miketoth
Copy link
Author

run as a background process yo
./turn-down.sh &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment