slack_status_updater
slack_status_updater copied to clipboard
🚧WIP: add the ability to turn a USB port on and off
LightBox currently has very little to do with actual lights. The code manages the on/off state of a designated USB port and shows that on/off status in an icon added to the Apple menubar. Clicking the icon will also toggle the on/off state. Super janky tray app!
Also kinda revamped how the zoom detection works:
- changed the in-meeting detection to look in the Zoom app's pull down menus; if "Meeting" in present as a pull-down, you're in a meeting. Needed to do this because the window title detection would miss when I was screen sharing.
- used a Hammerspoon application watcher to check for starting/stopping and focus/unfocus of the Zoom application to decide whether to run the timer that checks for in-meeting status. The timer now stops polling for whether you're in a meeting if Zoom isn't running.
Some ideas I have for this or for the future:
- [ ] setup the
zoom_detect
piece to only be responsible for detecting zoom meetings and emit something that other things can subscribe to, maybe with the hs.watchable evented key/value? - [ ] separate the Slack updating to a stand-alone module that could be subscribed in
init.lua
to take action on azoom_detect
event - [ ] make the lightbox module event-driven to be subscribed in
init.lua
- [ ] some way to configure these things (e.g. the USB device id for lightbox) without editing the code