Hi all,
I've used Openbox for five years or more, but for three months of that time I used ctwm. I made my own, keyboard-centric config file that worked very well. With that config, I'd gotten ctwm to be almost identical to Openbox, but I believe using less memory. There was just one problem: The alt+Tab function. With Openbox Alt+Tab works just like Windows 95, KDE, Xfce, LXDE, and the like. Which is to say that there's a stack of windows on the current workspace, with the current (focused) window at the top and the last to be current at the bottom. When you promote a window to be current (give it focus), the one that was current falls to #2. If you promote one besides #2 to current, the one that was just current becomes #2 and the former current before then becomes #3. This is very, very intuitive for your fingers.. Ctwm has no stack, but instead arranges all the windows in a ring, so you keep going forward or backward around the ring. It would seem that would be just as good as the stack, but after 3 months I still wasn't facile with the ring. Getting to the window I wanted still required too much time and too much thought, to the point where sometimes the thought required would make me forget what work I needed to do in that window. The lack of an Alt+Tab that works like Openbox or Win95 or KDE singlehandedly forced me to go back to Openbox. I don't think this stack based behavior would be difficult to add to Openbox. The window stack could be a linked list, with each element having an "above" and a "below" pointer, except the bottom one has a null "below" pointer and the top one has a null "above" pointer. add_element() would simply make a new element (malloc()) and, if the window it's made for gets focus (is current), it's attached at the top, otherwise the bottom. Another function would be move_to_top(), where the selected window's element is moved to the top, and its former "below" element becomes directly attached to its former "above" element. There would also be a delete_element() that would free() an element after joining its "below" to its "above". The way Openbox works is when you press Alt+Tab, the current stack is displayed via the corresponding windows' icons, and the highlight is placed on the second to the top. This display stays visible and active as long as your thumb is on the Alt key. Each additional Tab press makes the highlight go down one. If Tab is pressed while the highlight is on the bottom icon, the highlight goes to the top one. Once you release Tab and then Alt, whatever window corresponded to the highlighted icon gets moved to the top and its window gets focus. As I remember, there's no facility in ctwm to show such a nice stack of icons, but from the ring arrangement, it can be set to show an outline of the window that would get focus if you let go. That's good enough --- It could be made intuitive. I'm sure it would be more complicated than I make it out to be. I don't know offhand how to code the consecutive releasing of the Tab key while the Alt remains pressed. SteveT Steve Litt Autumn 2020 featured book: Thriving in Tough Times http://www.troubleshooters.com/thrive
