talonhub / community

Voice command set for Talon, community-supported.
MIT License
645 stars 783 forks source link

[FR] Command to swap between multiple open windows from the same app #456

Closed xavier630 closed 2 weeks ago

xavier630 commented 3 years ago

For example, I often have multiple Google Chrome windows open as separate spaces. The command "focus chrome" will open one of the windows, but I am missing a way to switch between them to the other one.

Coming from a Mac perspective but there is likely a similar problem for windows users

Please let me know if there is indeed a way to do this and I just don't know it (I've had no luck with commands like window next)

lunixbochs commented 3 years ago

On Mac does command back tick work for you?

xavier630 commented 3 years ago

As far as I can tell, this doesn't work if your windows are using Mac 'Spaces', only if the Chrome windows are part of a desktop.

Also, arguably, there should be a first-class toggle, even if that did work (like the 'focus app' command) - one advantage of this would be that it's an adapter layer so you can swap OS and still be able to cycle through apps.

Edit: I guess you meant it could be a command override for window next for mac

ym-han commented 3 years ago

Might be able to get what you want by using Contexts (https://contexts.co/) and adding voice bindings to keyboard shortcuts defined in Contexts. I just started using Contexts myself, and have been finding it pretty nice.

astropuffin commented 3 years ago

This works perfectly on Mac with window next but not at all on Windows. I wrote a focus command (see https://github.com/knausj85/knausj_talon/pull/443) but that only works for windows. I have no idea how to make a unified voice interface for this, as the different OSs seem to function very differently.

knausj85 commented 3 years ago

I presently use Easy Window Switcher for this functionality on Windows.

On Fri, Jun 4, 2021 at 4:51 PM Joseph Mente @.***> wrote:

This works perfectly on Mac with window next but not at all on Windows. I wrote a focus command (see #443 https://github.com/knausj85/knausj_talon/pull/443) but that only works for windows. I have no idea how to make a unified voice interface for this, as the different OSs seem to function very differently.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/knausj85/knausj_talon/issues/456#issuecomment-855075090, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSPSBGZO5DPMYS72UZN3JDTRFKHBANCNFSM46CDBD2Q .

xavier630 commented 3 years ago

Just to be clear @astropuffin, window next does not work on mac with 'spaces' as far as I can tell

xavier630 commented 3 years ago

And that focus command you made for Windows looks potentially pretty useful

xavier630 commented 3 years ago

For now, I can probably put all apps into desktops and stop using spaces, but it would be awesome if window next could swap to windows which are open in spaces. I think that from a Mac perspective, that would solve this FR

lunixbochs commented 3 years ago

You might be able to loop through ui.active_app().windows() in some meaningful way and call focus() on specific ones.

xavier630 commented 3 years ago

I'll close this since the workaround of not using Spaces works and open a separate issue on Talon itself that app.window_next() doesn't work on Mac Spaces

xavier630 commented 3 years ago

https://github.com/talonvoice/talon/issues/341

lunixbochs commented 3 years ago

Reopening, as it's up to knausj_talon to do something more specific than press cmd-` if it wants different behavior here.

pokey commented 3 years ago

Might be nice to use #470 once it's merged to allow focusing windows by name

xavier630 commented 3 years ago

ui.active_app().windows() seems to include extra "windows" with no titles (maybe leftover somehow from closed windows). I restarted Chrome and they went away . Like this first one:

image

knausj85 commented 2 weeks ago

Addressed by https://github.com/talonhub/community/pull/1271