Skip to content

Instantly share code, notes, and snippets.

@rumpl
Created January 27, 2020 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rumpl/0c7b82d99887f37d51e1473c60459cdd to your computer and use it in GitHub Desktop.
Save rumpl/0c7b82d99887f37d51e1473c60459cdd to your computer and use it in GitHub Desktop.
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