diff options
| author | 2026-07-08 02:00:43 -0700 | |
|---|---|---|
| committer | 2026-08-26 23:04:25 -0700 | |
| commit | 492f33edebba9ea59df2d74a5eda59e07a53c00a (patch) | |
| tree | b4e6df7516e75b0256621bf80311744f1c8571f2 /hammerspoon | |
| parent | 816128d9f47b7536e3532827711240b34d6590f3 (diff) | |
| download | new-dotfiles-492f33edebba9ea59df2d74a5eda59e07a53c00a.tar.gz new-dotfiles-492f33edebba9ea59df2d74a5eda59e07a53c00a.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 [] |
