Todd1561/TANWindowMgr

Feature Request: CLI options

Closed this issue · 2 comments

yz778 commented

Add CLI options to Save and Restore

Example:
TANWindowMgr.exe -save preset1
TANWindowMgr.exe -restore preset1

Reason:
Makes it really easy to have a batch file/powershell script to launch a set of apps and use TAN to snap windows into position.

I've added this functionality in the latest 1.2 release. Details can be found in the readme.

Your syntax seems to suggest the ability to save different profiles. This isn't in the scope of the project at the moment, but I can consider that if there's interest. For now you can save all detected windows, restore from the config file and optionally exit TANWindowMgr after loading the program. The last option should be useful in your scripting example where I don't imagine you'd want to leave the program running in the tray. If you do you can omit that switch.

yz778 commented

This is perfect thank you!

My use case for this: I have a triple monitor setup and each time my computer goes to sleep / resume the windows are re-positioned away from my main monitor. I have to then re-arrange everything each time. Your tool, and now with the CLI options solved the problem!

I will now investigate options for automatically calling this on entering sleep and resuming from sleep through Task Scheduler.