|
|
@ -3,14 +3,20 @@ local mash = {"cmd", "alt", "ctrl", "shift"}
|
|
|
|
|
|
|
|
|
|
|
|
-- Application shortcuts
|
|
|
|
-- Application shortcuts
|
|
|
|
|
|
|
|
|
|
|
|
hs.hotkey.bind({}, "escape", function()
|
|
|
|
local wf = hs.window.filter
|
|
|
|
|
|
|
|
local safari_esc = hs.hotkey.new({}, "escape", function() end, function()
|
|
|
|
if current_app():name() == "Safari" then
|
|
|
|
if current_app():name() == "Safari" then
|
|
|
|
hs.eventtap.keyStroke({"alt"}, "escape")
|
|
|
|
hs.eventtap.keyStroke({"alt"}, "escape")
|
|
|
|
else
|
|
|
|
|
|
|
|
hs.eventtap.keyStroke({}, "escape")
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wf.new("Safari"):subscribe(wf.windowFocused, function()
|
|
|
|
|
|
|
|
safari_esc:enable()
|
|
|
|
|
|
|
|
end):subscribe(wf.windowUnfocused, function()
|
|
|
|
|
|
|
|
safari_esc:disable()
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- hs.hotkey.bind({"cmd", "shift"}, "[", function()
|
|
|
|
-- hs.hotkey.bind({"cmd", "shift"}, "[", function()
|
|
|
|
-- current_app():selectMenuItem({"Window", "Select Previous Tab"})
|
|
|
|
-- current_app():selectMenuItem({"Window", "Select Previous Tab"})
|
|
|
|
-- end)
|
|
|
|
-- end)
|
|
|
|