Combine Space switching with app manipulation

I always have Safari in Desktop space #3 (Safari is almost always the only app in that space). Often, when I switch to this space, Safari isn't activated. So I created a macro with the following purpose: Switch to Space #3. If Safari is running: activate it and activate the address bar.

This works perfectly. There is just a strange gray square below the address bar after simulating Cmd+L. I can close it by simulating ESC, but what's the purpose of this square? Can I prevent it from appearing?



Switch to Desktop space #3.kmmacros (5.6 KB)

It's a Safari feature that can show things in there like Siri suggestions, etc. Send the Escape key after you send ⌘L, and it'll go away.

-rob.

If you've set Safari to open new windows/tabs like this in preferences:

image

Then that's what will be shown in that pop-up below the address bar. Mine looks like this:

I'm assuming you've left your settings blank which is why your pop-up is empty.

1 Like

I have changed the logic to:


Switch to Desktop space #3.kmmacros (5.9 KB)

If Safari is at the front, I can browse in the active page or press Cmd+L to change the page.

If it's not at the front, it's quite likely that I want to visit another page/search for something on the web. Then the address bar is activated (accepting input).

Let's see if this is what I really want ;).

By changing this action, a minimized Safari is restored:

In Space #2 I have my Airmail:


Switch to Desktop space #2.kmmacros (7.3 KB)

To Do: I have my messaging apps (Wire, Signal, Skype, iMessage, WhatsApp) in Space #4. So I'll create a macro to tile and arrange them, when Space #4 is entered.