diff options
| author | 2026-07-08 02:01:03 -0700 | |
|---|---|---|
| committer | 2026-08-26 23:04:25 -0700 | |
| commit | 676ed0f1986c58f2e4c3f61fdadde31fd3d4af36 (patch) | |
| tree | 0bd6ebcfdd4e8a7a968a2304942d2c328e1e7bec | |
| parent | 492f33edebba9ea59df2d74a5eda59e07a53c00a (diff) | |
| download | new-dotfiles-676ed0f1986c58f2e4c3f61fdadde31fd3d4af36.tar.gz new-dotfiles-676ed0f1986c58f2e4c3f61fdadde31fd3d4af36.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) |
