import "@johnlindquist/kit"
const activeScreen = await getActiveScreen()
const {
  workArea: {
    height,
    width,
    x: workAreaX,
    y: workAreaY
  }
} = activeScreen
const activeAppBounds = await getActiveAppBounds()
const { top, left, right, bottom } = activeAppBounds
const windowHeight = bottom - top
const windowYCenter = windowHeight / 2
const windowWidth = right - left
const windowXCenter = windowWidth / 2
setActiveAppPosition({
  x: workAreaX + (width / 2) - windowXCenter,
  y: workAreaY + (height / 2) - windowYCenter
})