Created
May 29, 2023 12:57
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| "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" | |
| } | |
| ] | |
| } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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