So happy to see so much more active development in windows stuff these days, for a while it looked like all the cool stuff was happening in the apple ecosystem, I’m happy to see developers starting to trust windows again.
One of the things that I’d love to see in this that fancy zones is missing is the ability of windows to remember where they should be after I reconnect to my dock. Like maybe I run some shortcut right before I disconnect the dock that stores window locations and then when I reconnect I click the shortcut again to restore them to those monitors.
> One of the things that I’d love to see in this that fancy zones is missing is the ability of windows to remember where they should be after I reconnect to my dock.
When I worked in an office, and had frequent meetings I had to take my laptop to, it irked me enough to come up with my own solution:
Oh wow, the hwnd approach is an awesome idea! I suffer from a different issue - my monitor has a displayport and 2 hdmi inputs, and when you activate one of the hdmi inputs, the other sends a "monitor disconnected" signal to its host, which messes up the layout. It would be awesome to have an app that constantly remembers the layout, and once it detects a change in the number of monitors, or a resolution change, it stops doing it until the monitor returns, and it does, it restores windows to the saved places. Sounds easy enouch, and I'll probably create this app myself based on examples from your code.
I had wanted to do that, but when I created it I was using a proprietary ThinkPad dock and Windows 7, and I couldn't find an easy way to detect when connected/disconnected. Might be a way now with Win10 and Type-C docks.
The tools included in the PsTools suite, which are downloadable as a package, are: PsExec - execute processes remotely,
PsFile - shows files opened remotely,
PsGetSid - display the SID of a computer or a user,
PsInfo - list information about a system,
PsPing - measure network performance,
PsKill - kill processes by name or process ID,
PsList - list detailed information about processes,
PsLoggedOn - see who's logged on locally and via resource sharing (full source is included),
PsLogList - dump event log records,
PsPasswd - changes account passwords,
PsService - view and control services,
PsShutdown - shuts down and optionally reboots a computer,
PsSuspend - suspends processes,
PsUptime - shows you how long a system has been running since its last reboot (PsUptime's functionality has been incorporated into PsInfo)
what do you mean by reconnect to my dock?
Feel free to open an issue if you'd like and I'll try and to my best to implement it.
edit: I think I understand, WinWM has a hotkey called refresh after you move windows you can use it to return all windows to the current layout.
Worth remembering that you can configure a machine to either mirror a display (I would expect the most common case) or extend the desktop (new display becomes display #2).
It is also not uncommon to dock a laptop at a workstation with dual or triple monitors.
One of the things that I’d love to see in this that fancy zones is missing is the ability of windows to remember where they should be after I reconnect to my dock. Like maybe I run some shortcut right before I disconnect the dock that stores window locations and then when I reconnect I click the shortcut again to restore them to those monitors.