Undocking and re-docking a laptop to external monitors can be frustrating at times, due to the fact that when you undock, Windows moves all open applications to the laptop monitor. When re-docking, the applications don't automatically move back to the external monitor(s). With the latest DisplayFusion 8.0 Beta, you can solve this issue by automatically saving and restoring the window positions using DisplayFusion's new "Triggers" feature. The steps below explain how to configure the Trigger rules in order to achieve this. The two Trigger rules below will make DisplayFusion save the window positions every 2 minutes when docked, and restore the window positions when re-docking.

Enable the "Monitor Profile" checkbox, and choose the Monitor Profile that you created in Step 1.

Below the Actions pane, click "Add," then "Wait." Enter 5000 in the Wait Time dialog, then click OK.

Below the Actions pane, click "Add," then "Run Function." Choose the "Restore Window Positions from Last Save" function from the list, then click OK.

Click OK to save the Trigger rule.

To test this setup, dock your laptop and open some windows on the external monitor(s). Wait more than 2 minutes so that the "Save Window Positions" Trigger has a chance to run, then undock, and re-dock. About 5 seconds after re-docking, DisplayFusion should automatically restore the window positions.

I don't understand how you can say this. This solution is a hack. First of all, now I get a notification every time the window state is saved! Also, if the window positions are lost if last save was done during these 2' intervals. And if I have multiple window profiles then it gets more complicated and unreliable.

I think it would be easier if, instead of restoring windows to their last position, to restore their initial positions by re-applying the window creation rules.

Papadi, I agree that if you have more than one monitor profile you want to save, this is not a good solution. However, you can disable the pop up balloons in advanced settings > General > Don't Show Tray Icon Notification Balloons. I've actually had the balloons disabled for years, so didn't even notice this was happening.

Yes, I would ideally like displayfusion to remember where every window was on every monitor profile, even after the window is closed or the computer restarts. I would love for every window to pop up based on the last known location for that profile. I'm just happy for this baby step (hack).

Quote:Yes, I would ideally like displayfusion to remember where every window was on every monitor profile, even after the window is closed or the computer restarts. I would love for every window to pop up based on the last known location for that profile.

Seconded; this is how I hoped DisplayFusion would work when I first tried it.

Back in the WinXP days, there was a lovely little application that let you reposition application buttons on the taskbar and remember their location---for every time you ran the application. You could also set window location, monitor location, and window size for every time you used that application. This functionality can't be terribly difficult to implement.

An example of what I'm looking for: Every time I open my email program, I want it far left of the leftmost display (my laptop display is always on my left). And I want the taskbar button far left as well, on the proper display's taskbar. And I want that to happen for every monitor profile.

I'm sure people would also like to customize which display they want applications to open or appear on depending on monitor profiles, too. I find the existing functionality unreliable. And the trigger scripts do not seem to work for me.

Are there any news about this topic? This hack never worked on my machine. I don't know why.
Window positions are saved every two minutes (I see the corresponding notification). But for some reason the trigger that is supposed to restore the positions never runs, even though I see that the monitor profile is restored and appears as selected after docking. I added some 'Show Notification' steps to my trigger for debugging purposes and they don't show up either.

Papadi, I had trouble with my initial trigger as well. I don't know what caused it (maybe I had the wrong profile selected or disabled the trigger on accident). I deleted the trigger and started over. The second time everything worked. If you already tried starting over, sorry, I have no other suggestions.

For those having trouble with this, I could not get it to work until I created a monitor profile when the laptop was not docked. The "undocked" profile is not in any trigger or anything, I just created it and saved and after I docked it worked.

Thanks @tpolz!
Another thing is that restoration of the layout takes quite long... it processes roughly one window per second - so it's necessary to not to touch the pc for a while until it finishes layout restoration process.
Could it be optimized in some way? e.g. don't touch the windows which are already in correct place (same position, screen and size as in the saved layout) and restore all the others simultaneously, not one after another?

It doesn't take that long for me. It only takes a second or two to restore all windows to the correct location. Maybe it's just a difference in our hardware? Hopefully, the developers can help you out.

It's quite usual for me to have ~20-30 windows open. But the issue is I'm seeing that even apps which are at the same exact place (screen) and size (maximized) as they have been saved with, they are getting focus one after another, maximizing again.
Maybe it's because after I dock the laptop, one of the external screens becomes the "main" one. Then the OS moves all apps to the main screen, and then DF kicks in to restore the layout. I think DF should just ignore the windows which are already positioned correctly, not focusing them / forcing resize.

I suppose that some more debug info from my side could be useful, I may also try to record a video showing the issue.

That actually clarifies it a bit more. DisplayFusion does leave windows that are already in the right place alone, except if they're maximized or minimized. We used to leave those alone as well, but what we found was that Windows bugs out the maximized/minimized windows sometimes, so leaving them alone would actually end up leaving them in a messed up state, where they're still reported as maximized but aren't actually the correct size. To get around that, we made DisplayFusion restore, then re-maximize or re-minimize the maximized/minimized windows. That way they will definitely be in the correct position after restoring on all systems.

Quote:Yes, I would ideally like displayfusion to remember where every window was on every monitor profile, even after the window is closed or the computer restarts. I would love for every window to pop up based on the last known location for that profile.

Seconded; this is how I hoped DisplayFusion would work when I first tried it.

@Douglas @tpolz If you try the "Window Layout Backup" application does it work as you are hoping? One thing I've noticed is that this application is aware of how many monitors were connected when it saved the layout and it indicates the number of monitors on the saved session so you know which state you are going back to. I'm hoping to move to the native DisplayFusion functionality, but I'd definitely like the ability to simply save periodically (I think it does 5 minutes) and restore to any point in time, but default to the most recent save that matches my current "profile" ie: 'docked at 9:17am' a session is captured due to the timer, then I 'undock at 9:20am' for a meeting and a few snapshots are saved while I'm in the meeting, but when I get back to my desk at 10:04am I want it to restore to the 'docked at 9:17am') state, while leaving the windows that I opened while in my meeting alone if they weren't ones I had open prior to undocking. If I did have them open prior to undocking but I manipulated them I would expect their positions to be restored to the docked state.

This is not working reliably. I even increased the delay before restoring the window positions but it's maybe working 40% of the time. Quite often I see windows beeing focused and re-arranged but sometimes they keep being on the laptop screen (not the external monitors after dock). It also happened to me multiple times that windows did not restore to correct size. Don't know if this has to do with laptop screen beeing 4K and the two external monitors beeing Full HD or now but however this feature (see also all the other comments) needs vast improvement. The integrated DisplayFusion functions for saving/restoring windows are so badly broken it's really horrible and I disabled it again, not to mention the balloon tipps you have to disable (which can not be disabled per script, so you have to disable all of them). All in all the event managment is also so poorly developed. It's a wonder that the taskbars work quite good. For me atm it's more or less the only reason to keep displayfusion isntalled.

I would also love to see a function in DisplayFusion that would simply allow you to continuously save until it detects 1 monitor then wait until it detects the same number of monitors as the monitor profile has and then load it.

I've emailed about this with support, but to add to the discussion I think part of the problem is triggers and part of it is monitor profile detection. DisplayFusion seems to have trouble detecting my monitor profile when I dock unless I save the profile (even when I load the profile manually it will apply the settings but doesn't show that that profile is active). After saving the profile though the triggers still don't save or load the window positions.

Per one of the old suggestions above I mapped a key combo to saving and loading window positions, it worked fine when I did both of them.

I'm running 9.0 Beta 3 by the way. I've checked for updates and looked on Steam, was a little surprised to see that there hasn't been an update announced on Steam for almost a year with all of the changes in Windows 10.

We only post the stable versions to Steam, but you can enable beta update checks right in the DisplayFusion Settings and still get them, even with the Steam version. We're hoping to get 9.0 Beta 4 out this week, and it may help with the issue you're running into, as we're making some changes to how the Monitor Profiles are saved/loaded.

I am having some similar issues with Windows 10. I have tried setting the triggers bound to a specific profile to save on a timer, and restore on profile change, and also on startup -- however it never worked.

I then assigned keybindings to save and restore. When I'm logged in, I can save and restore no issue. However, when I save the layout, then move windows around and sign out -- then sign back in and try to restore, it doesn't do anything.

With the automatic trigger, I was able to add a notification saying the windows were restored when it was executed, so I know it was running.

I added about a 20s delay after startup to restore to ensure all the applications were open.

Any thoughts on this? How are the positions saved? Is it not loading them reliably when logging back in, or in some sort of ephemeral storage?

The positions are saved based on their window handles, which change when the window is closed and re-opened, or the computer is restarted. We did it this way because it's the only 100% unique identifier for a window. However, we're planning to add a related feature that with any luck will be able to store window positions permanently. We'll be sure to post an update here when we've implemented that.

Okay, understood. Could perhaps suffice for my use case to get the new handle when it's executed, purely by saving the caption string. As I'm booting fresh, and letting applications run at startup. My specific case is with an Alienware 15 R3 laptop and the Alienware Graphics Amplifier -- which requires a restart when connecting and disconnecting.

Sorry about the rude language but how the hell do I unsubscribe from this discussion. I'm really just not interested anymore. But neither in the e-mails about new posts in this discussion nor in my profile or in my Discussions there's an "unwatch" function or something.

Who programmed this shitty cms? So please tell me how to unsubscribe or I will block all emails from binaryfortress no matter if I have purchased a license or not, but this is insane.