conditional shortcut to put window to where it should be

Hi! I’ve arranged my desktop the way I like it, and I’m trying to set up a workflow:

• When I select an app, a shortcut should move its window to the center of the screen.

• Pressing a different shortcut would return that window to its original position.

The challenge is that I sometimes need to center multiple apps, so a simple “restore last position” doesn’t work. Ideally, I’d like conditional placements; e.g., my browser always goes here, email goes there, so that when I press the restore shortcut, the active window automatically snaps to its designated position on the screen.

Is there a way to set this up?

In BTT, the Wait For Condition action is very useful. I set the condition to focused_windows_app_name with the application name, and then chain an action that moves the window to the desired position. In this way, I have created several layouts for a specific type of work.

I don’t use Restore Last Position at all. I simply call a different layout, where the same application can be in a different place.