1

I'm trying to write a script that will execute when I start a zoom meeting.

I found a command wmctrl -l which outputs

0x05e00020  0              N/A Zoom - Free Account

But, I can't figure out what to do with that information to execute a script when it's detected.

I'm not sure if I can utilize inotify or something else.

My operating system is Kubuntu 20.04

2
  • Out of curiosity, what are you trying to do?
    – ldias
    May 29, 2020 at 16:04
  • When I join a zoom meeting I want to execute a script that interacts with my home automation to turn on lights in my office. I like to work with the office dark, it's more relaxing. But, that does not work so well with the zoom meetings. May 29, 2020 at 16:11

1 Answer 1

1

I wanted to answer this question too, but nothing seemed forthcoming. I realized, though, that I had already scripted some lua things to set Zoom's windows to be "always on top" and pinned to every workspace. That led me on a journey.

Here's the process

1. install packages

sudo apt install devilspie2 lua-sec

2. config devilspie2

and add this (or something like it) here: ~/.config/devilspie2/window_works.lua

if (string.find(get_window_name(),"Zoom")) then
    debug_print("Window: " .. get_window_name());
    pin_window();

    require("socket")
    local https = require("ssl.https")
    local body, code, headers, status = https.request("https://api.duckduckgo.com/api")
    debug_print(body)
end

NOTE: you can also simply run a BASH script if that is easier:

local command = "/bin/bash /home/[username]/scripts/thing.sh"
os.execute(command)                                                     

3. Profit!

When you open a new Zoom meeting (or something that matches the window name "Zoom"), that lua will run and it will pin the window (which you may or may not want) and it will then make an HTTP request.

relevant documentation

1
  • Thank you, this is perfect! KDE lets me add actions when it sees windows but I can't interact with the systems sound settings and send MQTT messages from the windows action settings. Dec 29, 2020 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .