|
|
|
@ -7,28 +7,17 @@ end
|
|
|
|
|
|
|
|
|
|
-- Application shortcuts
|
|
|
|
|
|
|
|
|
|
local wf = hs.window.filter
|
|
|
|
|
safari_esc = hs.hotkey.new({}, "escape", function() end, function()
|
|
|
|
|
local safari_esc = hs.hotkey.new({}, "escape", function() end, function()
|
|
|
|
|
if current_app():name() == "Safari" then
|
|
|
|
|
safari_opt_esc:disable()
|
|
|
|
|
hs.eventtap.keyStroke({"alt"}, "escape")
|
|
|
|
|
safari_opt_esc:enable()
|
|
|
|
|
end
|
|
|
|
|
end)
|
|
|
|
|
safari_opt_esc = hs.hotkey.new({"alt"}, "escape", function() end, function()
|
|
|
|
|
if current_app():name() == "Safari" then
|
|
|
|
|
safari_esc:disable()
|
|
|
|
|
hs.eventtap.keyStroke({}, "escape")
|
|
|
|
|
safari_esc:enable()
|
|
|
|
|
end
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
local wf = hs.window.filter
|
|
|
|
|
wf.new("Safari"):subscribe(wf.windowFocused, function()
|
|
|
|
|
safari_esc:enable()
|
|
|
|
|
safari_opt_esc:enable()
|
|
|
|
|
end):subscribe(wf.windowUnfocused, function()
|
|
|
|
|
safari_esc:disable()
|
|
|
|
|
safari_opt_esc:disable()
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
-- hs.hotkey.bind({"cmd", "shift"}, "[", function()
|
|
|
|
|