diff options
| author | 2026-07-08 02:00:43 -0700 | |
|---|---|---|
| committer | 2026-07-08 02:00:43 -0700 | |
| commit | 32defb1ce87dbc9b4717898dcf259a2f55615468 (patch) | |
| tree | 5e1f78690e6cc91731c3d900ccd3e70b922a2b55 /hammerspoon | |
| parent | 89331e3e030bcc95d6146d53f8845a519bb13465 (diff) | |
| download | new-dotfiles-32defb1ce87dbc9b4717898dcf259a2f55615468.tar.gz new-dotfiles-32defb1ce87dbc9b4717898dcf259a2f55615468.zip | |
hammerspoon: Watch for changes in the configuration file and reload
Diffstat (limited to 'hammerspoon')
| -rw-r--r-- | hammerspoon/.hammerspoon/init.fnl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hammerspoon/.hammerspoon/init.fnl b/hammerspoon/.hammerspoon/init.fnl index 05422a6..3aa6b4f 100644 --- a/hammerspoon/.hammerspoon/init.fnl +++ b/hammerspoon/.hammerspoon/init.fnl @@ -8,6 +8,15 @@ (hs.hotkey.bind ["cmd" "alt" "ctrl"] "e" show-window-information) (hs.hotkey.bind ["cmd" "shift"] "r" hs.reload) +(fn make-config-path-watcher [] + (hs.pathwatcher.new + (.. (os.getenv "HOME") + "/code/personal/dotfiles/hammerspoon/.hammerspoon") + (fn [] (print "Reload!") (hs.reload)))) + +(let [watcher (make-config-path-watcher)] + (watcher:start)) + ;;; Layout -- Automatically put windows in their place. (fn apply-layout [] |
