Skip to content

Commit

Permalink
probably a working mute for teams
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Feb 13, 2025
1 parent 49422e7 commit 71c1232
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .hammerspoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,29 @@ local function restartMiddleClick()
end

local function muteMeet()
-- This is keyStroke's default delay
delay = 200000

app = hs.application.find(config.meet)
if app ~= nil then
hs.eventtap.keyStroke({"cmd"}, "d", 10, app)
hs.eventtap.keyStroke({"cmd"}, "d", delay, app)
end

app = hs.application.find("zoom.us")
if app ~= nil then
hs.eventtap.keyStroke({"cmd", "shift"}, "a", 10, app)
hs.eventtap.keyStroke({"cmd", "shift"}, "a", delay, app)
end

app = hs.application.find("com.microsoft.teams2")
if app ~= nil then
current = hs.window.focusedWindow()

for k, w in ipairs(app:visibleWindows()) do
w:focus()
hs.eventtap.keyStroke({"cmd", "shift"}, "m", delay, app)
end

current:focus()
end
end

Expand Down

0 comments on commit 71c1232

Please sign in to comment.