-
Hi all, I have been trying to figure out how the best way to position the application that I just open. I.E If I open an app, I want the app to be position left half of the monitor. If anyone can share some light will be much appreciate it. Cheers, UPDATE: I tried the code below with "Notes" app it works well. It recognise the const IDAppLaunch = Event.on('appDidLaunch', (app) => {
const name = app.name()
const main = app.mainWindow()
// 👍🏾 This works
if (name === 'Notes' && main) {
tilePosition('rightHalf')
}
// ❌ This is not working
if (name === 'Zed' && main) {
tilePosition('leftHalf')
}
}) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@s-en-o Hi! You might want to try if adding some delay between the event firing and getting the window would help. Apps behave very differently in terms of having focus or setting the main window. |
Beta Was this translation helpful? Give feedback.
@s-en-o Hi! You might want to try if adding some delay between the event firing and getting the window would help. Apps behave very differently in terms of having focus or setting the main window.