Created
January 27, 2020 15:09
-
-
Save rumpl/0c7b82d99887f37d51e1473c60459cdd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function toggleZoomMute() | |
local zoom = hs.appfinder.appFromName("zoom.us") | |
if (zoom == nil) then | |
return | |
end | |
local unmute = {"Meeting", "Unmute Audio"} | |
local mute = {"Meeting", "Mute Audio"} | |
if (zoom:findMenuItem(mute)) then | |
zoom:selectMenuItem(mute) | |
hs.alert.show("Zoom Muted") | |
elseif (zoom:findMenuItem(unmute)) then | |
zoom:selectMenuItem(unmute) | |
hs.alert.show("Zoom Unmuted") | |
end | |
end | |
hs.hotkey.bind({"cmd", "shift"}, "A", function() | |
toggleZoomMute() | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment