Created
February 3, 2023 16:15
-
-
Save rinogo/e1dd217186a068ca4ea44743cdfa8a9a to your computer and use it in GitHub Desktop.
Applescripts to use with Swiftbar for showing status of Zoom camera and microphone in the macOS menu bar. Paired with shortcuts in the Zoom app, this is an easy way to toggle Zoom's audio and video on and off.
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
#!/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 "LIVE MIC" | |
set returnValue to ":mic.fill: | sfcolor=red" | |
else | |
#set returnValue to "MUTED" | |
set returnValue to ":mic.slash.fill:" | |
end if | |
else | |
set returnValue to "" | |
end if | |
end tell | |
end tell | |
else | |
set returnValue to "" | |
end if | |
return returnValue & "| size=18 | |
--- | |
zoomMuteState" |
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
#!/usr/bin/osascript | |
# <bitbar.title>zoomVideoState</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>nickjvturner</bitbar.author> | |
# <bitbar.author.github>nickjvturner</bitbar.author.github> | |
# <bitbar.desc>Zoom Video 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 : "Stop Video" | |
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 "VIDEO ACTIVE" | |
set returnValue to ":eye.fill: | sfcolor=red" | |
else | |
#set returnValue to "NO VIDEO" | |
set returnValue to ":eye.slash:" | |
end if | |
else | |
set returnValue to "" | |
end if | |
end tell | |
end tell | |
else | |
set returnValue to "" | |
end if | |
return returnValue & "| size=18 | |
--- | |
zoomVideoState" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment