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

Consistent Talon screen order #336

Closed
AndreasArvidsson opened this issue Jul 1, 2021 · 11 comments
Closed

Consistent Talon screen order #336

AndreasArvidsson opened this issue Jul 1, 2021 · 11 comments

Comments

@AndreasArvidsson
Copy link

AndreasArvidsson commented Jul 1, 2021

Screens have now no clear distinction of their ordering or numbering. This means that features like the window snap or screen capture have no common understanding of what is the first or second screen.

knausj window snap used the function sorted_screens. Would be nice if this was a core talon action instead that all features could use to get the same definition of the ordering.
https://github.com/knausj85/knausj_talon/blob/0414eddd348a0314101978c4ed7eaf3cbfc00373/code/window_snap.py#L17

@lunixbochs
Copy link

lunixbochs commented Jul 1, 2021

Subsequent calls to ui.screens() should return screens in a consistent order already. Are you requesting that I sort those screens by a different criteria? Right now I think it's based on the OS's screen numbering in some way.

@AndreasArvidsson
Copy link
Author

AndreasArvidsson commented Jul 1, 2021

Consistency is great, but maybe it's not in the order you want. The numbering in the OS is often connected to display output and not physical placement/ordering which is problematic for fluent voice commands.

I want to be able to redefine the order like the knausj sorted_screens and then reuse that in multiple places. Of course an user.sorted_screens can be used, but I would prepare a more standardized way of doing this.

@lunixbochs
Copy link

lunixbochs commented Jul 1, 2021

I can sort the screens by position by default but I otherwise think it's more trouble than it's worth to make the order completely customizable in core Talon.

@AndreasArvidsson
Copy link
Author

I think that the OS ordering probably is best by default. You might want that ordering and this should probably be a user thing since people have all kinds of strange screen setups and which screen should have which number is quite personal. Should #1 be the middle screen in a row of 3 or the most left one for example. Always the main screen? I think that is probably best left to the user and your default is fine.

I'm going to use a user.sorted_screens for now if you feel like this isn't a talon core thing. It was just a thought.

@lunixbochs
Copy link

lunixbochs commented Jul 1, 2021

I think knausj (and you) overriding the order is a pretty clear indicator users don't want the OS order (as that means approximately every user is currently using the knausj order)

I would probably do something like presort into a 2d grid, then pick numbers based on column then row distance from the main screen, e.g.

5  6  7 8
2 (1) 3 4

Talon itself will use screen numbers for stuff like multimonitor eye tracking, so it's probably best if the default is good enough that people won't typically change it.

@AndreasArvidsson
Copy link
Author

AndreasArvidsson commented Jul 1, 2021

Yeah but everyone might not want the same order and someone might even want the OS ordering. The nice thing about actions is that you can redefine them to your liking.

But if you can make the default good enough that is probably not an issue. I personally like your ordering above.

@lunixbochs
Copy link

lunixbochs commented Jul 1, 2021

I believe actions are a particularly bad fit for this API in the larger ecosystem. For example, actions aren't available to be called during Talon startup. Also it would be very confusing if a plugin you installed overrode this.

@AndreasArvidsson
Copy link
Author

Ok fair enough. Then I think your idea of ordering is a nice solution to my problem.

@lunixbochs
Copy link

lunixbochs commented Jul 1, 2021

For me to be happy here I think I'd want a good heuristic for how to group staggered or vertical monitors into rows. Top left pixel of the monitor isn't great in some cases.

@AndreasArvidsson
Copy link
Author

I agree. It's not always as straightforward as rows and cols.

@lunixbochs lunixbochs changed the title Talon should make a core get sorted/numbered screens action Consistent Talon screen order Oct 25, 2021
@lunixbochs
Copy link

this just landed in beta, with a regression test to ensure that the ordering should remain reasonable under various conditions. let me know if you have any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants