Layout Spiral has inverted next_window and prev_window logic
See original GitHub issueThe issue:
Your Qtile version (qtile --version): 0.21.1.dev9+g634a470a
- When I use key or mouse binding to change to next or prev window on layout Spiral, it seems to be the only one with inverted logic.
lazy.group.prev_window()
does not go to prev window. - Also I am not sure if rearranging the windows by minimizing and unminimizing a window that brings it to front does interfere with the window list too. I wish the next_window and prev_window would always follow what the current window order on screen is and not when it was created. Maybe this is another topic.
This behavior is not documented and there seem to be no option to change it, so I believe it is a bug. If not, then this is a request to change the behavior or give me option to invert that logic right in the layout settings, so I don’t need to make exceptions everywhere else with .when(layout='spiral')
. Which does not work with mouse_callbacks anyway I think. I switch between different layouts and this one sticks out with this logic to me, as it is not consistent to all other layouts I tried for longer period of time (5 or so).
Just tried this right now. Created a new terminal window to get qtile version and using next_window() will go back in history to this Firefox window. So clearly it is inverted. Here first my layout settings:
layout.Spiral(
border_focus = layout_default['border_focus'],
border_normal = layout_default['border_normal'],
border_width = layout_default['border_width'],
margin = layout_default['margin'],
clockwise = False,
# 'after_current', 'before_current', 'top', 'bottom'
new_client_position = 'top',
# main_pane_ratio = None,
main_pane_ratio = 0.47,
main_pane = 'left',
# ratio = 0.6180469715698392,
ratio = 0.42,
ratio_increment = 0.08,
),
Required:
- I have searched past issues to see if this bug has already been reported.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (16 by maintainers)
@thingsiplay , you could try writing a function for it. Something like
{'Button5': lazy.function(my_function_for_button5)}
This is not unique to
spiral
. For example incolumns
next is considered to be down the column and columns are ordered left to right, regardless of the whether the new window is above or below.Good idea! I was so focused on solving this problem itself, that I forgot to write a function as I usually do. This simple solution just works. Hopefully this issue did not take too much of your time. Next time I discuss it before doing issues. Thank you. And not sure if this should be closed now.