diff options
| author | 2026-07-08 02:01:03 -0700 | |
|---|---|---|
| committer | 2026-07-08 02:01:03 -0700 | |
| commit | 2b890378efe6c154f7c38f24a6267f6db5333c7c (patch) | |
| tree | ea29d325d5450293af674b5a78bd2b74f884f5dd | |
| parent | 32defb1ce87dbc9b4717898dcf259a2f55615468 (diff) | |
| download | new-dotfiles-2b890378efe6c154f7c38f24a6267f6db5333c7c.tar.gz new-dotfiles-2b890378efe6c154f7c38f24a6267f6db5333c7c.zip | |
hammerspoon: Make the console use fennel
| -rw-r--r-- | hammerspoon/.hammerspoon/init.fnl | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/hammerspoon/.hammerspoon/init.fnl b/hammerspoon/.hammerspoon/init.fnl index 3aa6b4f..ada9884 100644 --- a/hammerspoon/.hammerspoon/init.fnl +++ b/hammerspoon/.hammerspoon/init.fnl @@ -97,6 +97,22 @@ (let [watcher (make-mouse-watcher)] (watcher:start)) -;; Done +;;; Fennel Repl + +(local fennel (require :fennel)) + +(let [coro (coroutine.create (. fennel :repl :repl))] + (coroutine.resume coro {:readChunk (fn [] + (let [input (coroutine.yield)] + (.. input "\n"))) + :onValues (fn [xs] + (print (table.concat xs "\t"))) + :onError (fn [_ msg] + (print msg))}) + (set hs._consoleInputPreparser (fn [s] + (coroutine.resume coro s) + ""))) + +;;; Done (hs.alert.show "Loaded!" [] (hs.screen.primaryScreen) 0.5) |
