Open mrob95 opened 4 years ago
I made a start on porting the necessary COM interfaces to pure python today, using the C++ as a reference
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 :-)
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.
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 ^^
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
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:
GetCurrentDesktopNumber()
- returns the number of the current desktop (first desktop is number 0 and they count up)GoToDesktopNumber(int number)
- switch to a different desktopGetDesktopCount()
- return the number of desktops activeMoveWindowToDesktopNumber(HWND window, int number)
- move a window id (usually but not necessarily the active window) to a different desktoppresumably 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()
orui.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