Skip to content

Commit

Permalink
Revert 'Fix "launchOrFocus" behavior for Atom'
Browse files Browse the repository at this point in the history
Revert 4f7a69f. While that commit did
improve things for Atom, it made things worse for other apps like Chrome
and Finder. With those apps, if the app is open but no windows exist,
the changes in 4f7a69f would focus the
app but wouldn't display a window. Chrome with no window isn't
particularly useful. 😬
  • Loading branch information
jasonrudolph committed Apr 20, 2018
1 parent 5332af1 commit b71f3ff
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions hammerspoon/hyper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ end

for i, mapping in ipairs(hyperModeAppMappings) do
hs.hotkey.bind({'shift', 'ctrl', 'alt', 'cmd'}, mapping[1], function()
local appName = mapping[2]
local app = hs.application.get(appName)
if app then
app:activate()
else
hs.application.launchOrFocus(appName)
end
hs.application.launchOrFocus(mapping[2])
end)
end

0 comments on commit b71f3ff

Please sign in to comment.