Was able to get around it by adding this to my script before calling setActiveAppBounds:
await applescript(`
tell application "System Events"
tell process "Kit" to set its visible to false
end tell
`);
setActiveAppBounds({ top, left, right, bottom })
Not sure if it would make sense to add that to setActiveAppBounds's script or not. Maybe there's a better way to grab the second frontmost process? AppleScript scares me.
Thanks @ryanomackey . I'm working on a new custom window type for Script Kit that can better handle window focus/spaces/etc. Hopefully I can tackle this as well.
Hi 👋
First off, love this project. Post Sonoma upgrade though, it looks like
setActiveAppBounds
is seeing Kit as the "frontmost" app here:https://github.com/johnlindquist/kit/blob/1827ac44a6ae33f771348bae144b4f38dfe97152/src/lib/desktop.ts#L314
Was able to get around it by adding this to my script before calling
setActiveAppBounds
:Not sure if it would make sense to add that to
setActiveAppBounds
's script or not. Maybe there's a better way to grab the second frontmost process? AppleScript scares me.