Macos: Detect when new/first joplin window opened

While registering a new plugin we pass the callback to onStart so any code that we want to run when joplin starts can go there
in my usecase it works good in Linux and Windows but Macos doesn't quits app when closing the window.
so is there a way we can listen to when first window of joplin is opened ?

usecase:
actually I developed a plugin named homenote to open a specified note each time joplin is launched, but as expected on macos it only works when opening joplin after quiting it with command+q which is rare in my usage behaviour.
homenote github issue