Question: How to get behaviour similar to Alt+Tab in Windows
With shodc focus -n it only cycles between two containers, if theres more than two then they won't be cycled thru.
shodc focus -c -n doesn't help either.
I want to cycle thru all the containers just like how Alt+Tab and Alt+Shift+Tab work in Windows.
Performing alt-tab via a remote controller (shodc) is kind of a botch, because the window manager cannot know when the user is done cycling the containers for it to reorganize the focus history so that the next time the user presses alt-tab, the previously focused container can raise above the others.
The most obvious solution is to implement alt-tab in shod itself (by using the modifier supplied via -m in case the user prefers to press win-tab rather than alt-tab) rather via X11 messages. I'm working on this solution now.
also show a small preview when switching containers thru the modifier.
also show a small preview when switching containers thru the modifier.
Miniatures/previews would require lots of code and can be done by a different application, like alttab.
Basically, there are two ways the Alt-Tab behavior can be implemented: as a list of windows (with miniatures or not); or by pushing the actual windows back and forth on the window stack. The first option can be done by a second application (shod exports its list of windows/containers, so application can easily read it). The second option, however, has to be done by the wm itself, because only the window manager has direct control over the stack of windows.
I made some changes to shod that can make this second option (kinda) work. You can bind (using sxhkd(1) or other program) Alt-Tab to shodc focus -cp and Alt-Shift-Tab to shodc focus -cn. This will not work as in Windows™, however. I'll work on that later.
But, if miniatures is more of your thing, you can use alttab (the program I linked above).
shod focus -cp lets you walk thru all the containers, but shod focus -cn only does it for the top two containers. I've binded Super+N to shod focus -cp and it works as Alt+Tab for me.
I just implemented alt-tab.
I also reworked on the code and split it into some files (rather than a single large one).
Found and fixed some bugs while doing that.
thanks