I currently use the following custom command to navigate between windows and frames:
(defun nispio/other-window (&optional arg)
"With prefix argument, select the next frame. Otherwise, select the next window"
(interactive "P")
(if arg (other-frame 1) (other-window 1)))
(global-set-key (kbd "C-\\") 'nispio/other-window)
This allows me to jump between windows with C-\
and between frames with C-u C-\
. But what I would really like is a command that will let me cycle through all of the windows, regardless of the frame that the window is in. Given the following window configuration:
Frame 1 Frame 2
+---------------------------+ +------------------+
+------------+--------------+ +------------------+
| | | | |
| Window 1 | Window 2 | | |
| | | | |
| | | | Window 4 |
| | | | |
+------------+--------------+ | |
| Window 3 | | |
| | | |
+---------------------------+ +------------------+
I want a command that freely cycles between window 1 - 2 - 3 - 4 - and back to 1 again. I don't want to have to think about which frame a window belongs to in order to cycle through them. Does such a command exist?