From 29371bb36bff39623c37af283dc9d14c355ed847 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 24 Jun 2016 08:55:43 -0700 Subject: [PATCH] [hammerspoon] Sigh, escaping in fullscreen Safari --- .hammerspoon/init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.hammerspoon/init.lua b/.hammerspoon/init.lua index c556f9d..fa4b377 100644 --- a/.hammerspoon/init.lua +++ b/.hammerspoon/init.lua @@ -7,13 +7,13 @@ end -- Application shortcuts -local safari_esc = hs.hotkey.new({}, "escape", function() end, function() - if current_app():name() == "Safari" then - hs.eventtap.keyStroke({"alt"}, "escape") - end -end) +-- local safari_esc = hs.hotkey.new({}, "escape", function() end, function() +-- if current_app():name() == "Safari" then +-- hs.eventtap.keyStroke({"alt"}, "escape") +-- end +-- end) -local safari_esc = hs.hotkey.new({"cmd"}, "w", function() end, function() +local safari_close_tab = hs.hotkey.new({"cmd"}, "w", function() end, function() if current_app():name() == "Safari" then current_app():selectMenuItem({"File", "Close Tab"}) end @@ -21,10 +21,10 @@ end) local wf = hs.window.filter wf.new("Safari"):subscribe(wf.windowFocused, function() - safari_esc:enable() + -- safari_esc:enable() safari_close_tab:enable() end):subscribe(wf.windowUnfocused, function() - safari_esc:disable() + -- safari_esc:disable() safari_close_tab:disable() end)