Skip to content

Instantly share code, notes, and snippets.

@shaniber
Created October 23, 2025 22:43
Show Gist options
  • Save shaniber/cec7504cfe2581561e57a4a3edcefea1 to your computer and use it in GitHub Desktop.
Save shaniber/cec7504cfe2581561e57a4a3edcefea1 to your computer and use it in GitHub Desktop.
A script to toggle input volume in a macOS Automator workflow.
on getMicrophoneVolume()
input volume of (get volume settings)
end getMicrophoneVolume
on disableMicrophone()
set volume input volume 0
display notification "Mic volume set to zero" with title "Mic volume toggled" sound name "Funk"
end disableMicrophone
on enableMicrophone()
set volume input volume 100
display notification "Mic volume set to full" with title "Mic volume toggled" sound name "Funk"
end enableMicrophone
if getMicrophoneVolume() is greater than 0 then
disableMicrophone()
else
enableMicrophone()
end if
@shaniber
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment