AkurAI Build
Menu

cosmic-mobile

public

Latest change d22956783f74f68f3d7eff1dd31f885aaf0fbe3e - Checkpoint BúiOS prototype and document clean-worktree workflow by AkurAI Build

#!/bin/sh
# Resize only this QEMU process's visible window; ignore GTK helper windows.
set -eu
pid=$1
tries=0
while kill -0 "$pid" 2>/dev/null && [ "$tries" -lt 120 ]; do
 window=$(xdotool search --onlyvisible --pid "$pid" --class qemu 2>/dev/null | sort -n | tr '\n' ' ')
 for id in $window; do
  xdotool windowsize "$id" 450 900
  exit 0
 done
 tries=$((tries + 1))
 sleep 0.5
done
printf 'Visible QEMU window not found for sizing\n' >&2
exit 1