1
vote
Accepted
Auto switch sound sink on power change
Solved with a python script that calls SwitchAudioSource installed by brew install switchaudio-osx:
import psutil
import subprocess
import time
while True:
if psutil.sensors_battery()....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
automator × 1593applescript × 684
macos × 405
finder × 207
terminal × 176
script × 124
automation × 92
keyboard × 90
command-line × 90
services × 90
bash × 84
pdf × 72
mac × 43
mail.app × 39
safari × 33
folders × 32
screen-capture × 32
shortcut × 29
python × 28
folder-action × 28
email × 26
copy-paste × 25
catalina × 24
google-chrome × 24
applications × 23