Instead of having to input the SF Symbol in base 64 for example?
I initially wanted to make it toggle mute the mic (On Click) with this script:
#!/bin/bash
# Get the current input volume
current_volume=$(osascript -e 'input volume of (get volume settings)')
# Check if the input volume is 0
if [ "$current_volume" -eq 0 ]; then
# Set the input volume to 100
osascript -e 'set volume input volume 100'
# Return JSON for "Mic on" with the mic icon
echo '{"text":"Mic ✅","icon_name":"mic"}'
else
# Set the input volume to 0
osascript -e 'set volume input volume 0'
# Return JSON for "Mic off" with the mic.slash icon
echo '{"text":"Mic ❌","icon_name":"mic.slash"}'
fi
But I'm currently using this #!/bin/bash current_volume=$(osascript -e 'input volume of (get volume settings)') [ "$current_volume" -eq 0 ] && echo "🔘" || echo "🟡"
Is there a setting to make it run the script on click? or should I add an action for it to work?
I've disabled then enabled the trigger on BTT and now it's working as expected.
Looks like it was just getting stuck in the previous config of the trigger..