Created
October 7, 2015 06:05
-
-
Save thintsa/a1ae5435e24bc0de03f4 to your computer and use it in GitHub Desktop.
This shell script toggles system wide eq using AU Lab and Sound Siphon (see e.g. https://github.com/thintsa/aulab-soundflower-equalizer-toggle) on and off on a Mac. AudioSwitcher app can be found here: https://github.com/deweller/switchaudio-osx.
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/bash | |
number=$(ps aux | grep 'AU Lab' | wc -l) | |
if [ $number -gt 1 ] | |
then | |
./AudioSwitcher -s 'Built-in Output' | |
killall 'AU Lab' | |
osascript -e 'display notification "System wide EQ disabled" with title "EQ Toggle"' | |
else | |
open /Applications/Utilities/AU\ Lab.app/ | |
./AudioSwitcher -s 'Sound Siphon Out' | |
osascript -e 'tell application "Finder" | |
repeat | |
delay 0.1 | |
if (count of windows) of process "AU Lab" is greater than 0 then exit repeat | |
end repeat | |
repeat until visible of process "AU Lab" is false | |
delay 0.1 | |
set visible of process "AU Lab" to false | |
end repeat | |
end tell' | |
osascript -e 'display notification "System wide EQ enabled" with title "EQ Toggle"' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works on El Capitan too whereas the original toggle script doesn't without signing.