Trigger when new window is opened (allows to set preferred layouts for some apps)

Hello,

One feature I would really like is to be able to set a preferred layout for some apps. However, I would still like the possibility to resize them as needed. Therefore, the trigger when a window gets activated doesn’t work.

With a trigger for a new window, I could then set the window to my preferred position.

The trigger when app gets started also doesn’t work, since the app might already be running in the background or have another window already open.

Ideally, the trigger would have a condition on the window name, but I guess I could achieve the same by other means, like conditional activation groups.

I hope you like this idea and wish you a very nice evening / day!

you could use the save / restore window layout action for this, but yes you'd need to experiment a bit with the best trigger conditions

Thank you for your quick reply!

Do you mean I could use the save / restore window layout action today, or once the new window trigger would be implemented?

Today, I manage to do some things with the “when new window gets activated” trigger, but unfortunately, that leads to some strange and some very annoying behaviour (for instance when a script in Excel launches an AppleScript, the window looses focus and the prompts don’t appear in the foreground as they are supposed to).

That’s why I thought a “new window” trigger might be helpful. And searching in the forum, I saw that some other use cases might benefit from it, too (although some have workarounds).

By the way, this is tightly linked to yesterday’s feature request, that would allow to resize a window that doesn’t have the focus:

Have a great evening

ah yes I get your point now.

I'll think about how to create such a trigger. I think in theory it could be done already via the script output did change trigger by regularly querying the visible window list variable and checking for differences, however that's probably not very performant.
Maybe I can keep track of window numbers and check whether they are "standard" windows or something like that.

1 Like

That would be wonderful! Thank you very much!