Alpha Chen 5 months ago
parent 32e0dfad53
commit 2feb273dce
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -1,21 +1,12 @@
;; fennel-ls doesn't support arbitrary allowed globals, so ;; fennel-ls doesn't support arbitrary allowed globals, so
;; unwrap `hs` here to localize it to just one place ;; unwrap `hs` here to localize it to just one place
(local {: application (local {: eventtap
: canvas
: dialog
: eventtap
: execute
: fs : fs
: hotkey : hotkey
: ipc
: inspect
: loadSpoon : loadSpoon
: logger : logger
: notify : notify
: osascript
: pasteboard : pasteboard
: screen
: uielement
: urlevent : urlevent
: window} hs) : window} hs)
@ -25,8 +16,13 @@
(local {: mash : smash : modal-bind} (require :hotkey)) (local {: mash : smash : modal-bind} (require :hotkey))
(local {: chomp : paste : replace-selection : run} (require :utils)) (local {: chomp : paste : replace-selection : run} (require :utils))
;;; quitter
(let [{: start} (require :quitter-v2)]
(start))
;; debugging ;; debugging
; (hotkey.bind mash "d" #(dialog.blockAlert "message" "text" "one" "two")) ; (hotkey.bind mash "d" #(hs.notify.show (: (hs.window.frontmostWindow) :title) "" ""))
;; ⌘⌥V - defeat paste blocking ;; ⌘⌥V - defeat paste blocking
(hotkey.bind [:cmd :alt] :v #(eventtap.keyStrokes (pasteboard.getContents))) (hotkey.bind [:cmd :alt] :v #(eventtap.keyStrokes (pasteboard.getContents)))
@ -69,12 +65,6 @@
; ;; hold onto watcher as a global so it doesn't get GC'ed ; ;; hold onto watcher as a global so it doesn't get GC'ed
; (set _G.per-app-watcher (watcher:start))) ; (set _G.per-app-watcher (watcher:start)))
;;; Elgato Key Light Air
;; Run `package.loaded["key-light-air"]["find-hostname"]()`
;; to find the hostname of the Key Light Air
(require :key-light-air)
;;; Spoons ;;; Spoons
(loadSpoon :SpoonInstall) (loadSpoon :SpoonInstall)
@ -112,7 +102,11 @@
["^https://(.*%.?)goodluckbread.com/?" handlers.safari] ["^https://(.*%.?)goodluckbread.com/?" handlers.safari]
["^https://community.glowforge.com/?" handlers.arc] ["^https://community.glowforge.com/?" handlers.arc]
["^https://accounts.google.com/?" handlers.arc] ["^https://accounts.google.com/?" handlers.arc]
["^https://(.*%.?)fidelityinvestments.com/?" handlers.safari]] ["^https://(.*%.?)fidelityinvestments.com/?"
handlers.safari]
["^https://mychartwa.providence.org/?"
handlers.firefox-dev]
["^https://www.bankofamerica.com/?" handlers.safari]]
url-redir-decoders [[:sci-hub url-redir-decoders [[:sci-hub
"^https://doi.org/(.*)" "^https://doi.org/(.*)"
"https://sci-hub.st/%1"]]] "https://sci-hub.st/%1"]]]

Loading…
Cancel
Save