talonvoice / talon

Issue Tracker for the main Talon app
85 stars 0 forks source link

Windows virtual desktop control #146

Open mrob95 opened 4 years ago

mrob95 commented 4 years ago

Although windows allows you to create new virtual desktops it is missing some pretty important keyboard shortcuts to make this feature usable. By default there is no way to switch to a different desktop by number and no way to move a window to a different desktop (other than by opening the task view and dragging stuff around, which is not really feasible hands-free).

This project implements the necessary extra functionality as a dll. I don't think this is already packaged in any of the pywin libraries but I haven't done an extensive search. https://github.com/Ciantic/VirtualDesktopAccessor

The functions from this which I find useful and which would be nice to have in talon are:

presumably as part of the ui subsystem. I don't really have strong opinions about how the API should look, the first three are just simple functions, so e.g. ui.current_desktop_number() or ui.windows_desktops.current(). The fourth could either be another method on the window object e.g. ui.active_window().switch_desktop(3) or a function taking in a window ID.

My grammar for this is here https://github.com/mrob95/talon_vda/blob/master/window_ctrl.py

mrob95 commented 4 years ago

I made a start on porting the necessary COM interfaces to pure python today, using the C++ as a reference

mrob95 commented 4 years ago

Okay I've been testing the last couple of days and it seems to be working fine. I'm happy for you either to just add this to the list of included pip packages or to use it to create a talon API :-)

https://github.com/mrob95/py-VirtualDesktopAccessor

lunixbochs commented 4 years ago

Is it ok if I hold off on making a decision + turning this into an API? I'm trying to keep new feature scope down for actually launching the beta. Your virtualenv should remain intact for now.

mrob95 commented 4 years ago

No worries. I am happy to write a grammar and support it if there are problems but I understand if you'd rather not have another potential bug factory on the worst platform ^^

lunixbochs commented 4 years ago

this is just a post-release thing in my mind - I'm willing to entertain it but I need to focus on stabilizing what's already there, especially as there's no VDA api on any OS right now

I'm getting pretty close to a feature freeze I'm happy with, so the beta will hopefully soon just be a matter of fixing bugs and polishing before I can actually start releasing stuff to the public