Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycle through windows indefinitly #85

Closed
sweenu opened this issue Jul 1, 2019 · 6 comments
Closed

Cycle through windows indefinitly #85

sweenu opened this issue Jul 1, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@sweenu
Copy link

sweenu commented Jul 1, 2019

On chunkwm, I used to be able to cycle through my windows with chunkc tiling::window --focus next.
It seems like with yabai, when focusing the last opened window, doing yabai -m window --focus next won't go back to the first one but do nothing. I cannot cycle through my windows like I used to.
Is there another way to accomplish that?

@dominiklohmann
Copy link
Collaborator

See #7.

I think a good alternative might be adding first_node and last_node to the WINDOW_SEL options, so that you can use them as fallback triggers. Having these options allows for more flexible scripting anyways and even enables custom multi-monitor wrapping.

# cycle forward
yabai -m window --focus next || yabai -m window --focus first_node

# cycle backwards
yabai -m window --focus prev || yabai -m window --focus last_node

I'm not sure if last_node and first_node are good names, but last is already taken. Maybe it'd be better to rename last to something else instead and just use first and last.

@sweenu
Copy link
Author

sweenu commented Jul 3, 2019

I did not see this issue, sorry.

last could be replace by something like previous if we were to have first and last.

@koekeishiya
Copy link
Owner

previous is already taken in the form of prev / next. I won't be adding anything any time soon that would require renaming/breaking existing options. I'm not opposed to adding first_node/last_node or something else that makes sense.

@dominiklohmann
Copy link
Collaborator

Some possible wordings:

  • first_node, last_node
  • begin, end
  • front, back
  • top_left, bottom_right
  • leftmost, rightmost
  • first, last (with current last being renamed to recent)

I'm definitely in favour of adding this feature. The selectors should make sense for spaces and displays, too, so monitor/space wraparound can also be implemented.

I also think that while you're right about not wanting to rename existing configurations and scripts, the word last makes much more sense here than what it's currently used for and the required change is minimal. Consider this a vote in favour of first, last, recent and a minor version bump.

@koekeishiya
Copy link
Owner

koekeishiya commented Jul 4, 2019

first, last (with current last being renamed to recent)

That seems fine, however

and a minor version bump.

Minor version is meant for added features that are non-breaking. Breaking is a major version bump, if I am to follow the rules of semantic versioning.

I suppose if we are to get pedantic about this you could argue that it isn't a breaking change, but an alteration of behaviour - the command is still working, which in my mind is acceptable by a patch increment in the versioning scheme.

@koekeishiya koekeishiya added enhancement New feature or request addressed on master; not released Fixed upstream, but not yet released labels Jul 6, 2019
@koekeishiya
Copy link
Owner

koekeishiya commented Jul 6, 2019

Fixed on master.

Added first and last. Existing last renamed to recent. I've decided to release this under a normal patch increment, as per my last comment. People can feel free to write me angry emails if they wish to do so, but I don't think this change warrants a major version bump in any way.

@koekeishiya koekeishiya removed the addressed on master; not released Fixed upstream, but not yet released label Jul 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants