Skip to content

Instantly share code, notes, and snippets.

@att14
Created May 20, 2024 17:22
Show Gist options
  • Save att14/f833939542a83e2fbcdf94726bfb965e to your computer and use it in GitHub Desktop.
Save att14/f833939542a83e2fbcdf94726bfb965e to your computer and use it in GitHub Desktop.
SwiftBar Zoom State
#!/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
#!/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 : "Start Share"
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 ":eye.slash.fill: | sfcolor=#ff4d40"
else
set returnValue to ":eye.fill: | sfcolor=#53945d"
end if
else
set returnValue to ""
end if
end tell
end tell
else
set returnValue to ""
end if
return returnValue
#!/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