[hammerspoon] update for M1

pull/37/head
Alpha Chen 3 years ago
parent e393e467a5
commit 29f491f695

@ -43,6 +43,7 @@
(hs.loadSpoon "Quitter") (hs.loadSpoon "Quitter")
(set spoon.Quitter.quitAppsAfter { (set spoon.Quitter.quitAppsAfter {
:Discord 300 :Discord 300
:Flotato 300
:MailMate 300 :MailMate 300
:Messages 300 :Messages 300
:Slack 300 :Slack 300

@ -1,15 +1,12 @@
-- Handle mismatch between homebrew's version of Lua and hammerspoon's version -- Handle mismatch between homebrew's version of Lua and hammerspoon's version
local lVer = _VERSION:match("Lua (.+)$") local lVer = _VERSION:match("Lua (.+)$")
-- local luarocks = hs.execute("which luarocks"):gsub("\n", "") local luarocks = "/opt/homebrew/bin/luarocks"
local luarocks = "/usr/local/bin/luarocks"
if #luarocks > 0 then
package.path = package.path .. ";" .. hs.execute( package.path = package.path .. ";" .. hs.execute(
luarocks .. " --lua-version " .. lVer .. " path --lr-path" luarocks .. " --lua-version " .. lVer .. " path --lr-path"
):gsub("\n", "") ):gsub("\n", "")
package.cpath = package.cpath .. ";" .. hs.execute( package.cpath = package.cpath .. ";" .. hs.execute(
luarocks .. " --lua-version " .. lVer .. " path --lr-cpath" luarocks .. " --lua-version " .. lVer .. " path --lr-cpath"
):gsub("\n", "") ):gsub("\n", "")
end
fennel = require "fennel" fennel = require "fennel"
table.insert(package.loaders or package.searchers, fennel.searcher) table.insert(package.loaders or package.searchers, fennel.searcher)

Loading…
Cancel
Save