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

Window navigation #87

Open
marcantonio opened this issue Jan 5, 2025 · 3 comments
Open

Window navigation #87

marcantonio opened this issue Jan 5, 2025 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@marcantonio
Copy link

marcantonio commented Jan 5, 2025

Thanks for this!

Is it possible to navigate between windows directionally? By that I mean something like mod-up would select the window above, mod-left would select the one to the left, etc. This works naturally when windows are side by side with window_next and window_previous, but I'm not sure if cortile understands relative position.

@marcantonio
Copy link
Author

marcantonio commented Jan 12, 2025

I took a shot at this in #89. It's not fully complete, but seems to work well for me. Before I go further, I wanted to see if there's interest in this functionality being merged, and also to make sure the approach satisfactory. Let me know if you'd like anything renamed or otherwise changed. For my use case, I'd bind to mod-up/down/left/right.

Tested on Mint w/ Xfce.

TODO:

  • Handle edge cases where you can move further than you ought to. (Ex: you're already in the top row but can go "up" to Firefox because it has a slightly weird position)
  • Disable in fullscreen and maximized modes

@leukipp leukipp self-assigned this Jan 16, 2025
@leukipp leukipp added the enhancement New feature or request label Jan 16, 2025
@marcantonio
Copy link
Author

I've been using this for a while and ran into one issue. On larger screens, where you'd want to have more than a 2x2 grid, it would get confused as to which was immediately above, below, etc. That is now resolved. I think this is ready to review.

@leukipp
Copy link
Owner

leukipp commented Feb 9, 2025

Thanks a lot for your efforts! 👍🏽
I will have a look at your code if time allows.

In general, relative window navigation is a worthwhile addition and I'm committed to including it in a future version.

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

2 participants