Pop ALL Simulator windows to front upon Build and Run

Just a little quality-of-life thing:

When I Build and Run in Nova, ONE window comes forward... might be the log, might be the memory map, might be the actual Simulator. Whichever I last touched.

But whatever views I currently have open, I always want them ALL, which means a Build and Run often needs an extra trip to the Dock to click them forward through my clutter of art and code and reference windows.

Not sure how cross-platform this request is!

6 Likes

I have the same issue on Mac, would love to see all windows up front as well!

1 Like

I'm not at my Mac to confirm the Simulator has a "Bring All to Top" menu item, but you can use Hammerspoon to script (using Lua) your desired behaviour.

In fact, it's one of their examples:
https://www.hammerspoon.org/go/#appevents

There's also an app called Front & Center that brings this (classic Macintosh) behaviour back to macOS.

https://hypercritical.co/front-and-center/

1 Like

Yes that's in the menu—and I click the dock instead as a shortcut for that.

I'm pretty sure something could be rigged up using AppleScript too.

Still, if it's easy to make the Simulator just do this, that would be simplest! It's not a functionality I want for all windows system-wide, but Simulator's windows—if I have them open—have no use on their own, only as a set together. They could even just be panes of one big window and I'd be happy.

The current behavior often doesn't show the Simulator display at all when you Run, because what I last clicked had been the Console.

Not something I'd suggest spending a ton of development time on, but I mention it in the hopes that it's easy.

1 Like

I would like the main simulator window to always receive the group focus on start. It upsets me deeply when I go to use simulator keys, and it's typing in the logger... Gah! AGAIN!!

2 Likes

Agreed--that's yet another step, having to click the Simulator after it appears.

The Hammerspoon solution would be best then. It would be automatic, only when the specified app gains focus.

If the Hammerspoon code doesn't do that, I'll modify it so that it does asap.

Whilst I can see the issues, such changes amount to implementing non-standard behaviour in macOS and would confuse some people. For that reason, I think it's best to have a personal solution. IMHO

1 Like

I'm thinking of Photoshop, where all your tools and info displays come forward together with the image window. Or how the system font and color pickers come forward with their associated window (TextEdit, Notes). It's nice in cases where it makes sense.

Hammerspoon sounds pretty cool though! I tend keep my OS super lean, but all options are on the table!

I have to say I would love that too, without having to rig any special shenanigans. Don’t want to install anything more than I need. Macs have become bad enough as it is.

2 Likes

Apologies if my previous replies don't align with your point of view. :dove:

Here's some Hammerspoon Lua code to:

  1. bring all Simulator windows to front when the app is activated (same as the Hammerspoon example)
  2. raise the main Simulator window to the front of all Simulator windows (one new line added by me)

Works great, just as requested.

Feel free to use it, or not, depending on your preferences.

-- Playdate Simulator window management
function applicationWatcher(appName, eventType, appObject)
	if (eventType == hs.application.watcher.activated) then
		if (appName == "Playdate Simulator") then
			-- Bring all Playdate Simulator windows forward when one gets activated
			appObject:selectMenuItem({"Window", "Bring All to Front"})
			-- Raise main Simulator window to the front of all Simulator windows
			hs.window.find("Simulator"):raise() 
		end
	end
end
appWatcher = hs.application.watcher.new(applicationWatcher)
appWatcher:start()

The thread will stay open as a SDK Feature Request.

1 Like

Nice! Thanks for taking the time to give the code. I’ll give it a try. It’s one of these things that don’t seem important but repeated dozens of times a day and it adds up. This should be quite helpful.

I've added this to our internal tracker. Seems like a reasonable preference when launching into the debugger.

5 Likes

Thank you very much!