I'm trying to have a one button key binding to switch to the last used app, without an app switcher window showing. Like they suggest in this article: http://xahlee.info/linux/why_tiling_window_manager_sucks.html (alt-tab to f4)
I thought this might work, but it gets stuck on the app switcher window:
hs.hotkey.bind({}, "f8", function()
hs.eventtap.keyStroke({"cmd"}, "tab", 10);
end)
I think the way I would do this is implement an hs.application.watcher that keeps track of the most recently activated app in a global variable, so you can then just call :activate() on that variable :)
I'm going to close out this issue because I think this should all be possible, but please feel free to re-open it if you run into any problems :)
Most helpful comment
I think the way I would do this is implement an
hs.application.watcherthat keeps track of the most recently activated app in a global variable, so you can then just call:activate()on that variable :)I'm going to close out this issue because I think this should all be possible, but please feel free to re-open it if you run into any problems :)