Giter VIP home page Giter VIP logo

zoom.spoon's Introduction

Documentation for the Unoffical Zoom Spoon

What this Spoon does

This is a Spoon (or plugin) that makes it easier for Hammerspoon to interact with the Zoom videotelephony software.

If you aren’t familiar with Hammerspoon yet, it is a powerful programmable automation tool for macOS.

Using this Spoon in concert with Hammerspoon, you can do things like:

  • Get notified when the Zoom app opens, starts a meeting, or starts screensharing
  • Get notified when the Zoom app closes, stops a meeting, or stops screensharing
  • Mute Zoom when it’s open and in a meeting or screensharing
  • Unmute Zoom when it’s open and in a meeting or screensharing

The original goal for this Spoon was to enable the author to create a “mute status light” for Zoom.

How to install this Spoon

  1. Make sure that you have Hammerspoon installed

    If it’s not installed already, then use the Getting Started with Hammerspoon guide to learn how to install and use Hammerspoon.

  2. Install the Zoom Spoon

    The easiest way to do this is to download the ZIP version of this Spoon, unzip it, then double click the Zoom.spoon folder. Hammerspoon will install it for you.

    If you plan on modifying the Spoon and sending a pull request to this repo, then you should clone this repo into your ~/.hammerspoon/Spoons

How to use this Spoon

Open your Hammerspoon configuration file and edit it to make use of this Spoon. Below is a sample configuration that does the following:

  • Creates a menu bar item that will display a red circle when a Zoom meeting is in progress and you are muted and a green circle if you are unmuted
  • Will toggle between mute and unmute if the red or green circle is clicked
  • Will assign the F13 button to be a mute toggle button
-- This lets you click on the menu bar item to toggle the mute state
zoomStatusMenuBarItem = hs.menubar.new(nil)
zoomStatusMenuBarItem:setClickCallback(function()
    spoon.Zoom:toggleMute()
end)

updateZoomStatus = function(event)
  hs.printf("updateZoomStatus(%s)", event)
  if (event == "from-running-to-meeting") then
    zoomStatusMenuBarItem:returnToMenuBar()
  elseif (event == "muted") then
    zoomStatusMenuBarItem:setTitle("🔴")
  elseif (event == "unmuted") then
    zoomStatusMenuBarItem:setTitle("🟢")
  elseif (event == "from-meeting-to-running") or (event == "from-running-to-closed") then
    zoomStatusMenuBarItem:removeFromMenuBar()
  end
end

hs.loadSpoon("Zoom")
spoon.Zoom:setStatusCallback(updateZoomStatus)
spoon.Zoom:start()

-- Next up:
-- https://github.com/adamyonk/PushToTalk.spoon/blob/master/init.lua
hs.hotkey.bind('', 'f13', function()
  spoon.Zoom:toggleMute()
end)

These three lines are the most important:

hs.loadSpoon("Zoom")
spoon.Zoom:setStatusCallback(updateZoomStatus)
spoon.Zoom:start()

The first line, hs.loadSpoon("Zoom"), loads this Spoon. The second line, uses the spoon.Zoom:setStatusCallback() method to have the updateZoomStatus function called when the state of the Zoom app changes. And finally, the last line, spoon.Zoom:start() starts up the Zoom spoon.

zoom.spoon's People

Contributors

jpf avatar dogeared avatar wonderslug avatar brunon avatar kontrafiktion avatar

Watchers

James Cloos avatar

Forkers

unn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.