Skip to content

Instantly share code, notes, and snippets.

@prabowomurti
Created August 13, 2024 16:22
Show Gist options
  • Save prabowomurti/477ed19863c8aa24fbb444a9438a19f8 to your computer and use it in GitHub Desktop.
Save prabowomurti/477ed19863c8aa24fbb444a9438a19f8 to your computer and use it in GitHub Desktop.
Apple Script to those who don't have a mute button on their microphone
on getMicrophoneVolume()
input volume of (get volume settings)
end getMicrophoneVolume
on disableMicrophone()
set volume input volume 0
display notification "Microphone has been disabled" with title "Muted"
end disableMicrophone
on enableMicrophone()
set volume input volume 100
display notification "Microphone has been enabled" with title "Unmuted"
end enableMicrophone
if getMicrophoneVolume() is greater than 0 then
disableMicrophone()
else
enableMicrophone()
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment