pull/2/head
Alpha Chen 2 years ago
parent 6377f5b709
commit 6dc9241a07
No known key found for this signature in database

@ -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

Loading…
Cancel
Save