Add hammerspoon. Almost usable now...
This commit is contained in:
30
wm/hammerspoon/init.lua
Executable file
30
wm/hammerspoon/init.lua
Executable file
@@ -0,0 +1,30 @@
|
||||
local super = {"cmd", "alt", "ctrl"}
|
||||
hs.hotkey.bind(super, "W", function()
|
||||
--hs.notify.new({title="Hammerspoon", informativeText="Hello World"}):send()
|
||||
hs.alert.show("Reloading...")
|
||||
hs.reload()
|
||||
end)
|
||||
hs.hotkey.bind(super, "R", function()
|
||||
hs.reload()
|
||||
end)
|
||||
|
||||
--ctrlDoubleTap = require("ctrlDoubleTap")
|
||||
--ctrlDoubleTap.timeFrame = 0.3
|
||||
--ctrlDoubleTap.action = function()
|
||||
--hs.eventtap.keyStroke({}, "f19")
|
||||
--end
|
||||
|
||||
escCtrlDouble = require("escapeControlDouble")
|
||||
escCtrlDouble.addModifier = function(ev)
|
||||
app = hs.application.frontmostApplication()
|
||||
if app:title() == "iTerm2" then
|
||||
ev:setFlags({['ctrl'] = true})
|
||||
elseif app:title() == "kitty" then
|
||||
ev:setFlags({['ctrl'] = true})
|
||||
else
|
||||
ev:setFlags({['cmd'] = true})
|
||||
end
|
||||
return ev
|
||||
end
|
||||
|
||||
hs.alert.show("Configuration reloaded")
|
||||
Reference in New Issue
Block a user