First you need create plugin folder at ~/Library/Application Scripts/com.shortcutlabs.FlicMac, for example microphoneMutePlugin
mkdir -p "~/Library/Application Scripts/com.shortcutlabs.FlicMac/microphoneMutePlugin"
Now cd into it
cd "~/Library/Application Scripts/com.shortcutlabs.FlicMac/microphoneMutePlugin"
Then add config.json file with following content:
{
"pluginName": "Microphone mute",
"pluginDescription": "Helps muting microphone",
"pluginReadMore": "This plugin help muted input volume",
"protocolVersion": 1,
"actions":
[
{
"actionName": "Toggle mute",
"fileName": "toggleMute.sh"
},
{
"actionName": "Mute",
"fileName": "mute.sh"
},
{
"actionName": "Unmute",
"fileName": "unmute.sh"
}
]
}After that add three sh file
toggleMute.sh
#!/bin/sh
currentInputVolume=$(osascript -e "input volume of (get volume settings)")
if (($currentInputVolume > 0))
then
osascript -e "set volume input volume 0"
osascript -e 'display notification "Volume set to '$(osascript -e "input volume of (get volume settings)")'" with title "❌ Microphone is off"'
elif (($currentInputVolume == 0))
then
osascript -e "set volume input volume 100"
osascript -e 'display notification "Volume set to '$(osascript -e "input volume of (get volume settings)")'" with title "✅ Microphone is on"'
fimute.sh
#!/bin/sh
osascript -e "set volume input volume 0"
osascript -e 'display notification "Volume set to '$(osascript -e "input volume of (get volume settings)")'" with title "❌ Microphone is off"'unmute.sh
#!/bin/sh
osascript -e "set volume input volume 100"
osascript -e 'display notification "Volume set to '$(osascript -e "input volume of (get volume settings)")'" with title "✅ Microphone is on"'Next step is set sh permissions to allow its execution
chmod +x ./*.sh
Finally restart Flic app and plugin will be available as custom one - I use click to mute and double click to unmute