diff options
| -rw-r--r-- | config/hammerspoon/init.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/hammerspoon/init.lua b/config/hammerspoon/init.lua index 45ce362..93950a9 100644 --- a/config/hammerspoon/init.lua +++ b/config/hammerspoon/init.lua @@ -584,3 +584,23 @@ hotkey('9', ca, window_resize(geometry.rect(0.20, 0, 0.80, 1))) -- hotkey('6', csa, demo_dump('/tmp/screencast6.txt')) -- hotkey('7', csa, demo_dump('/tmp/screencast7.txt')) -- hotkey('8', csa, demo_dump('/tmp/screencast8.txt')) + +-- Machine-local Hammerspoon config, where a machine has any: +-- ~/.config/hammerspoon/local.lua, a real file beside the init.lua link and in +-- no repo, like ~/.localprofile for the shell. Only init.lua is linked, so that +-- directory is the machine's own and anything else in it stays there. +-- +-- Last, so it can override the hotkeys and settings above, and in a pcall: a +-- mistake in it must not take the rest of this config down with it. Reload with +-- ctrl-shift-alt-h, the same as any other change here. +local local_config = os.getenv("HOME") .. "/.config/hammerspoon/local.lua" +if hs.fs.attributes(local_config) then + local ok, err = pcall(dofile, local_config) + if not ok then + print("local.lua: " .. tostring(err)) + hs.notify.new({ + title = "Hammerspoon", + informativeText = "local.lua failed: " .. tostring(err), + }):send() + end +end |
