|
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')
}
}) |
Answered by
kasper
Oct 18, 2024
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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.