Skip to content

Instantly share code, notes, and snippets.

@jframos
Created December 22, 2017 09:25
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jframos/4dd8e363010f04f997fbbe7a6f5a246a to your computer and use it in GitHub Desktop.
Save jframos/4dd8e363010f04f997fbbe7a6f5a246a 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