49

I am trying to find a way to have a button or key combination that, when pushed, would rearrange all the windows on the desktop to a pre-determined state. There are five programs that need to be arranged to fit in a certain way. I first thought of AutoHotkey, but honestly I have no idea how to approach that method.

8 Answers 8

13

DisplayFusion can create monitor profiles that memorize and recall desktop placement and resolution as well as program window placement. You might be able to take advantage of that latter feature.

2
21

I just open sourced an app that can remember and restore window layouts. See https://github.com/adamsmith/WindowsLayoutSnapshot.

4
  • 2
    Awesome, @Adam. Simple, but awesome. Thanks a lot, but is it possible to launch it via hotkey? Maybe your program has some command line parameter? The docs show nothing about it. Sep 29, 2014 at 21:01
  • 5
    author no longer maintains this. perhaps consider a fork, e.g. github.com/lapo-luchini/WindowsLayoutSnapshot/tree/v1.3.0.0
    – TT--
    Oct 2, 2018 at 14:05
  • 1
    NB: "Snapshots are not stored across app instances (or, thus, restarts)" and also the automatically taken snapshots seem to eventually overwrite manually created ones in the list.
    – TT--
    Oct 4, 2018 at 22:31
  • My work machine prevents full-blown "setup" installation of programs; this is the only program in this thread that worked, since there's no installer - just stick the EXE in the startup fodler. Great solution
    – Dylan
    Apr 15, 2022 at 19:57
14

I had this same problem so I built a small application to take care of it. Free, no ads, just works. You can find it under my "Freeware" section, called "TAN Window Manager". I use it everyday.

Simply place a shortcut to the program in your startup folder so it runs at boot. Open all the programs you want to save and place them where you want. Right-click the TAN Window Manager icon that will be in your tray and click 'Save Window Locations'. In the popup check the windows you want to save and click 'Save'. Now you can use the 'Restore Window Locations' button to magically move your saved windows back to where you placed them. The program is a standalone EXE, no install routine, just place the EXE anywhere you like.

Todd

Edit: Now on GitHub https://github.com/Todd1561/TANWindowMgr

7
  • 1
    I just installed your program on my Windows 10 machine that uses two monitors, 1° = 1920x1200 in portrait mode, 2° = 4k in landscape. I had to convince my antivirus program it was safe, but after that it seems to work as advertised. Feb 22, 2019 at 12:41
  • Cool, glad it worked for you, thanks for commenting. I’ll have to look into what’s involved to get it ‘trusted’ by the various A/V programs. But rest assured it’s safe. Looks like it’s my only app I didn’t upload the source. I’ll add that later today.
    – Todd1561
    Feb 23, 2019 at 14:45
  • I have seen that you uploaded the source very recently. I tried the application (after convincing the anti-virus), but could not quite get the Windows back. Does not seem to be able to cope with multiple windows of the same type. For instance, two Chrome windows or multiple file managers. But great job so far. Keep it up! Jun 7, 2020 at 20:05
  • Yes, that is an unfortunate drawback to this program, with multiple instances of the same program the instance that had focus most recently will get re-positioned when you restore the window layout. It's been on my list to address for a while but for my needs it hasn't been a big problem. I'll at least make a note of this in the readme and open a issue on the GitHub page. Thanks for commenting!
    – Todd1561
    Jun 8, 2020 at 21:09
  • I didn't see an exe in the GitHub repo. Am I missing something there?
    – VanAlbert
    Dec 16, 2020 at 17:50
10

WinSize2 is a program written in AutoHotKey that can make Windows remember window position, size and more. The program gives you the ability to save the window size and location for any program or folder.

To save any window position, click on the Windows title bar to make sure the window is active and press the hotkey Ctrl+Alt+Z. A tooltip message will confirm that the position has been saved. Now if you close the window and open it again, the program window will be automatically resized and moved to the position where you saved it.

You can edit the behavior and position of any previously saved window by right-clicking on the tray icon and choosing “Special Parameters”.

enter image description here

Here you can manually enter window position coordinates and size, force the window to open maximized, minimized, full screen or hidden, make it “always on top” and even enter a delay between opening the window and resizing.

WinSize2 works on all versions of Windows right from 95 to 7.

enter image description here

3
  • 2
    Looked promising but doesn't work. I opened one of the applications hit the hotkey. It 'saved'. I brought up the dialog and checked 'always' and when I relaunch the application it launches in maximize like normal. Feb 1, 2011 at 17:41
  • @MrStatic: I have no experience using this app but looking at the "Rating and Reviews" on the project page, I can say the program should work without problems. Maybe you could reexamine the settings of the program (there seems to be a lot of settings!) and retry. This is all I can say at the moment. Feb 1, 2011 at 18:15
  • 1
    It didn't work for me either. Behavior was very odd, some windows it put in wrong places, others it just did nothing with, others would open then resize then move to the (correct) position. ALl in all I found it to be pretty useless.
    – Colin Jack
    Sep 7, 2011 at 21:10
6

So far my favorite solution so far is a program by DeskSoft called "WindowManager", as found here: http://www.desksoft.com/WindowManager.htm

Takes a little bit to understand its interface, but once you do you will realize how much flexibility it has with how simplistic the task is. You choose how it finds the types of windows you want to arrange (name, process name, etc) then it will try to arrange it for you, and you can use a hotkey if the window changes after it is launched, for example.

I really wish this was an optional Windows feature, being that the OS is called Windows after all, but I digress. It seems they tried to use the snap feature to do this sort of thing, but this program is much more reliable and flexible in my experience.

2
  • I've been looking for something like this for way too long and for $15 it's a steal. It especially helps with multiple monitors as windows 10 refuses to remember my setup.
    – Jacksonkr
    Nov 30, 2022 at 17:53
  • Concerning that their website has words to the effect of "your virus scanner will think this is a virus, but it's not, so disable your virus scanner". Our security team scanned, and denied, this installer d.t. a couple of trojans. Have asked them for comment.
    – Sepster
    Oct 31, 2023 at 7:27
4

As @AdamSmith, but from command line, I have designed a program to save and restore the windows, too.

Here it is, on another thread, if you need it (.exe files and .ahk source code).

3

I tested some software recommended in this thread on Amazon Workspaces (on Win 10) run on Macbook Pro Air M1 with connected 2 extended monitors (4K and 1080p):

  1. TAN Window Manager - it can restore window position, but CANNOT handle restoring window's initial resolution
  2. WindowLayoutSnapshot - same as #1
  3. WindowManager - best choice so far - it restores both window's position and resolution
1
  • 1
    +1 for WindowManager. It's pay-to-play, with a 30 day demo, but can properly restore multiple instances of the same app (e.g., VS Code)
    – 2Toad
    Jun 23, 2021 at 22:24
2

Download winLayout.exe

To save current window positions on multiple monitors:

winLayout save

To restore window positions:

winLayout restore

It's no frills, just a single .exe file. To make it easy to run, create a task bar short cut for it.

Disclaimer: I am the author.

3
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    Aug 27, 2019 at 17:18
  • 10
    @DavidPostill > If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. Interesting philosophical question. Can the same answer apply to two different questions? I'd have thought the answer is yes? "What is your favourite food?" / "What solid food is made at a dairy?" The answer to both is "Cheese"... Sep 26, 2019 at 9:00
  • Installed the app on Win11 64; does not work at all. Oct 18, 2023 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .