Created
May 20, 2024 17:22
-
-
Save att14/f833939542a83e2fbcdf94726bfb965e to your computer and use it in GitHub Desktop.
SwiftBar Zoom State
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 | |
# <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 | |
else | |
set returnValue to "" | |
end if | |
return returnValue |
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 | |
# <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.fill: | sfcolor=#53945d" | |
else | |
set returnValue to ":video.slash.fill: | sfcolor=#ff4d40" | |
end if | |
else | |
set returnValue to "" | |
end if | |
end tell | |
end tell | |
else | |
set returnValue to "" | |
end if | |
return returnValue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment