layout sublet - cycling & swapping windows
Added by Suraj Kurapati almost 14 years ago
Hello,
I'm using the layout v0.15 sublet and I want to change the order of windows:
- Swap the currently focused window with the first one (to make it the "main" window) in the current view.
- Cycle the list of windows left (
list = list[1..-1].push(list[0])
) or right (list = list[0..-2].unshift(list[-1])
) in the current view.
Thanks for your consideration.
Replies (3)
RE: layout sublet - cycling & swapping windows - Added by Christoph Kappel almost 14 years ago
Hello,
in order to add this I need to rewrite the whole sublet, because currently it just uses the client list supplied by subtle. Generally views have no real idea about the clients they display, you just can check if a client is visible on a certain view.
I shouldn't have written this sublet, I am not a friend of any of the layouts used in there. ;)
I will think about it.
RE: layout sublet - cycling & swapping windows - Added by Suraj Kurapati almost 14 years ago
Perhaps you could re-use the existing concept of W-r (raise) and W-l (lower) to change the order of windows when a layout is applied?
Yesterday, before I knew about the layout sublet, I was planning to implement something like it. I planned to support these actions (inspired by Xmonad usage tutorial at http://xmonad.org/tour.html):
- raise & lower current client
- cycle left & right all clients
- make current client the "main" one
- swap current client with the nearest one in <direction> (where the user would press a <direction> key indicating north/south/east/west)
The third item introduces the concept of a "main" client in each layout. In left-tiling layout, the left-most client is the "main" one. In top-tiling layout, the top-most client is the "main" one. And so on.
RE: layout sublet - cycling & swapping windows - Added by Christoph Kappel almost 14 years ago
Well, it is possible to add it to the sublet, but that requires that you keep a list per view. One of the key concepts in subtle that there is no other list than just the main client list and every view is just a loose set. Retagging directly changes what a view can show without any other list or array manipulations.
Maybe it is sufficient to store just the changes and use the list subtle provides. In fact I tried this approach once, subtle is really old and I tried many tiling algorithms which all sucked in one or another way.
Raise and lower change the actual list and should change the order in that sublet too. I tried it but apparently I saw no changes.