Skip to content

Instantly share code, notes, and snippets.

@torgeir
Last active October 13, 2022 21:21
Show Gist options
  • Save torgeir/79f75dea46e4d16a3725515aabe74674 to your computer and use it in GitHub Desktop.
Save torgeir/79f75dea46e4d16a3725515aabe74674 to your computer and use it in GitHub Desktop.
Example configurations for AnyBar and Ubsersicht to get a visual cue representing your zoom mute status. Credits https://gist.github.com/tyhawkins/66d6f6ca8b3cb30c268df76d83020a64

Zoom mute status setup for os x

Pick one of these approaches

AnyBar

Pick this approach if you want to show the status in the menu bar, like this https://share.getcloudapp.com/9Zu8Ok97

  • Install https://github.com/tonsky/AnyBar
  • Run it
  • Place the zoom-status.sh on your path. Alongside it place the zoom-mute-status.scpt.
  • chmod u+x zoom-status.sh
  • Run it with nohup zoom-status.sh &

Ubersicht

Pick this approach if you want to show the status on the desktop.

  • Install https://tracesof.net/uebersicht/
  • Run it
  • Click its icon and open the widgets folder.
  • Place a folder zoom-mute-status within it, with the files zoom-mute-status.jsx and zoom-mute-status.scpt from this gist
// This is a simple example Widget to get you started with Übersicht.
// For the full documentation please visit:
// https://github.com/felixhageloh/uebersicht
// You can modify this widget as you see fit, or simply delete this file to
// remove it.
// this is the shell command that gets executed every time this widget refreshes
export const command = "osascript zoom-mute-status/zoom-mute-status.scpt";
// the refresh frequency in milliseconds
export const refreshFrequency = 1000 * 1;
// the CSS style for this widget, written using Emotion
// https://emotion.sh/
export const className = `
top: .1rem;
width: 100%;
text-align: center;
font-family: Helvetica Neue;
`;
const view = {
muted: { color: "green", label: "Muted" },
unmuted: { color: "red", label: "Unmuted" },
};
// render gets content the shell command has executed. The command's output
// is passed in as a string.
export const render = ({ output, error }) => {
if (error) console.error(error);
const trimmedOutput = output.replace("\n", "").toLowerCase();
const { color, label } = view[trimmedOutput];
return <span style={{ color }}>{label}</span>;
};
property btnTitle : "Mute audio"
if application "zoom.us" is running then
tell application "System Events"
tell application process "zoom.us"
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
set returnValue to "Unmuted"
else
set returnValue to "Muted"
end if
end tell
end tell
else
set returnValue to ""
end if
return returnValue
#!/bin/bash
while true; do
if [[ "$(osascript zoom-mute-status.scpt)" == "Muted" ]]
then
echo -n "black" | nc -4u -w0 localhost 1738
else
echo -n "red" | nc -4u -w0 localhost 1738
fi
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment