Skip to content

Instantly share code, notes, and snippets.

@christianoguedes
Created May 29, 2023 12:57
Show Gist options
  • Select an option

  • Save christianoguedes/8f9903b5088fce6753b8c4a2ec4348ae to your computer and use it in GitHub Desktop.

Select an option

Save christianoguedes/8f9903b5088fce6753b8c4a2ec4348ae to your computer and use it in GitHub Desktop.
macos: toogle mic + google meet by chrome extension "Mute for google meet" using global key command + control + m
...
"simple_modifications": [
{
"from": {
"key_code": "right_command"
},
"to": [
{
"shell_command": "open -a 'iTerm.app'"
}
]
},
{
"from": {
"key_code": "right_option"
},
"to": [
{
"shell_command": "osascript ~/mic.oascript"
}
]
}
]
tell application "System Events"
keystroke "m" using {control down, command down}
end tell
on getMicrophoneVolume()
input volume of (get volume settings)
end getMicrophoneVolume
on disableMicrophone()
set volume input volume 0
end disableMicrophone
on enableMicrophone()
set volume input volume 80
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