I find it a bit awkward in xmonad to switch back and forth between two windows. Is there an extension (or a part of core xmonad) which allows this?
For example, I want to switch between firefox and emacs often, and they might not be in the same workspace. I currently do this using gotoMenu by typing M-g firefox<cr>
and M-g emacs<cr>
but this is awkward, especially if there's more than one instance of either app. Ideally I'd like a single shortcut to perform an action like give-focus-to-most-recently-used-unfocussed-window, which I could just press over and over to switch back and forth.
XMonad.Actions.GroupNavigation seems to be a perfect fit. To let the module track your window history, make sure that
logHook
invokeshistoryHook
. For example:Then create a key binding for the following expression, which will toggle between the current and most recent window.