Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created May 24, 2023 23:37
Show Gist options
  • Save ericboehs/01acc48ddf426a12bd9c1f8e01b6d58a to your computer and use it in GitHub Desktop.
Save ericboehs/01acc48ddf426a12bd9c1f8e01b6d58a to your computer and use it in GitHub Desktop.
Global mute Zoom with status icon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Activate</key>
<string>Normal</string>
<key>CreationDate</key>
<real>702922293.579934</real>
<key>Macros</key>
<array>
<dict>
<key>Actions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>511225</integer>
<key>Conditions</key>
<dict>
<key>ConditionList</key>
<array>
<dict>
<key>Application</key>
<dict>
<key>BundleIdentifier</key>
<string>us.zoom.xos</string>
<key>Name</key>
<string>zoom</string>
<key>NewFile</key>
<string>/Applications/zoom.us.app</string>
</dict>
<key>ApplicationConditionType</key>
<string>Running</string>
<key>ConditionType</key>
<string>Application</string>
</dict>
</array>
<key>ConditionListMatch</key>
<string>All</string>
</dict>
<key>ElseActions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>511226</integer>
<key>KeyCode</key>
<integer>49</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>768</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict>
<key>BundleIdentifier</key>
<string>com.tinyspeck.slackmacgap</string>
<key>Name</key>
<string>Slack</string>
<key>NewFile</key>
<string>/Applications/Slack.app</string>
</dict>
<key>TargetingType</key>
<string>Specific</string>
</dict>
</array>
<key>MacroActionType</key>
<string>IfThenElse</string>
<key>ThenActions</key>
<array>
<dict>
<key>ActionUID</key>
<integer>510094</integer>
<key>KeyCode</key>
<integer>0</integer>
<key>MacroActionType</key>
<string>SimulateKeystroke</string>
<key>Modifiers</key>
<integer>768</integer>
<key>ReleaseAll</key>
<false/>
<key>TargetApplication</key>
<dict>
<key>BundleIdentifier</key>
<string>us.zoom.xos</string>
<key>Name</key>
<string>zoom</string>
<key>NewFile</key>
<string>/Applications/zoom.us.app</string>
</dict>
<key>TargetingType</key>
<string>Specific</string>
</dict>
</array>
<key>TimeOutAbortsMacro</key>
<true/>
</dict>
</array>
<key>CreationDate</key>
<real>640822874.02092803</real>
<key>ModificationDate</key>
<real>706630388.90051198</real>
<key>Name</key>
<string>Mute Zoom</string>
<key>Triggers</key>
<array>
<dict>
<key>FireType</key>
<string>Pressed</string>
<key>KeyCode</key>
<integer>50</integer>
<key>MacroTriggerType</key>
<string>HotKey</string>
<key>Modifiers</key>
<integer>2048</integer>
</dict>
</array>
<key>UID</key>
<string>A8C5B43D-098E-4088-8DB3-1F466327531D</string>
</dict>
</array>
<key>Name</key>
<string>Global Macro Group</string>
<key>ToggleMacroUID</key>
<string>63D5C335-023C-47D4-BF80-9810802EC2F7</string>
<key>UID</key>
<string>804D32AF-0B39-439F-8EF3-493A833B14CA</string>
</dict>
</array>
</plist>
#!/usr/bin/osascript
# <bitbar.title>zoomMuteState</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>nickjvturner</bitbar.author>
# <bitbar.author.github>nickjvturner</bitbar.author.github>
# <bitbar.desc>Zoom Mute State</bitbar.desc>
# <bitbar.image>http://www.hosted-somewhere/pluginimage</bitbar.image>
# <bitbar.dependencies>Applescript</bitbar.dependencies>
# <bitbar.abouturl>http://url-to-about.com/</bitbar.abouturl>
# <swiftbar.hideAbout>true</swiftbar.hideAbout>
# <swiftbar.hideRunInTerminal>true</swiftbar.hideRunInTerminal>
# <swiftbar.hideLastUpdated>true</swiftbar.hideLastUpdated>
# <swiftbar.hideDisablePlugin>true</swiftbar.hideDisablePlugin>
# <swiftbar.hideSwiftBar>false</swiftbar.hideSwiftBar>
property btnTitle : "Mute audio"
if application "zoom.us" is running then
tell application "System Events"
tell application process "zoom.us"
if exists (menu bar item "Meeting" of menu bar 1) then
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
set returnValue to ":mic.fill: | sfcolor=#53945d"
else
set returnValue to ":mic.slash.fill: | sfcolor=#ff4d40"
end if
else
set returnValue to ""
end if
end tell
end tell
return returnValue & "| size=16
---
zoomMuteState"
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment