From 6dc9241a072f69cf204fa92b46bfd26ad947e474 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 23 Nov 2022 10:34:12 -0800 Subject: [PATCH] mu --- .hammerspoon/init.fnl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.hammerspoon/init.fnl b/.hammerspoon/init.fnl index 23b1db0..3b02221 100644 --- a/.hammerspoon/init.fnl +++ b/.hammerspoon/init.fnl @@ -79,14 +79,14 @@ (accumulate [docked? false _ v (pairs (hs.usb.attachedDevices)) &until docked?] (or docked? (= v.productName "CalDigit Thunderbolt 3 Audio")))) -(local key-light-air-watcher (let [{: watcher} hs.caffeinate] - (: (watcher.new #(when (docked?) - (match $1 - watcher.screensDidLock (update-key-light-air false) - watcher.screensDidSleep (update-key-light-air false) - watcher.screensDidUnlock (update-key-light-air true) - watcher.screensDidWake (update-key-light-air true)))) - :start))) +(local key-light-air-watcher (let [{: watcher} hs.caffeinate + w (watcher.new #(when (docked?) + (match $1 + watcher.screensDidLock (update-key-light-air false) + watcher.screensDidSleep (update-key-light-air false) + watcher.screensDidUnlock (update-key-light-air true) + watcher.screensDidWake (update-key-light-air true))))] + (w:start))) ; (local usb-watcher (: (hs.usb.watcher.new #(let [{: eventType : productName} $1] ; (when (= productName