Skip to content

Instantly share code, notes, and snippets.

@darland
Forked from jframos/mic_mute_script.workflow
Created July 16, 2018 18:28
Show Gist options
  • Save darland/578439831964b329e1ec936d2a2f02c0 to your computer and use it in GitHub Desktop.
Save darland/578439831964b329e1ec936d2a2f02c0 to your computer and use it in GitHub Desktop.
AppleScript - Microphone mute
if input volume of (get volume settings) = 0 then
set level to 90
display notification "On" with title "Mic"
tell application "System Events"
tell appearance preferences
set dark mode to false
end tell
end tell
else
set level to 0
display notification "Off" with title "Mic"
tell application "System Events"
tell appearance preferences
set dark mode to true
end tell
end tell
end if
set volume input volume level
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment