snippet fix

This commit is contained in:
qq
2023-01-02 22:34:54 +08:00
parent a88a520464
commit be9307f96a
6 changed files with 53 additions and 292 deletions
+18
View File
@@ -0,0 +1,18 @@
local pathwatcher = require "hs.pathwatcher"
local alert = require "hs.alert"
-- http://www.hammerspoon.org/go/#fancyreload
function reloadConfig(files)
doReload = false
for _, file in pairs(files) do
if file:sub(-4) == ".lua" then
doReload = true
end
end
if doReload then
hs.reload()
end
end
pathwatcher.new(os.getenv("HOME") .. "/.hammerspoon", reloadConfig):start()
alert.show("Hammerspoon Config Reloaded")