分享一段hammerspoon配置,可以自动调节AirPods的音量:
-- 切换到AirPods Pro的时候自动调整音量
-- 不然真的要聋了
hs.audiodevice.watcher.setCallback(function()
local now_device = hs.audiodevice.defaultEffectDevice()
if now_device:name() == "yang的AirPods Pro" then
hs.audiodevice.defaultOutputDevice():setVolume(25)
hs.alert.show("已切换到yang的AirPods Pro")
end
end)
hs.audiodevice.watcher.start()