AkurAI Build
Menu

cosmic-mobile

public

Latest change 16acc3a41125e141918efa987648c01cdff0c336 - Expose isolated guest test controls by AkurAI Build

#!/bin/sh
set -eu
sleep 12
mount -t 9p -o trans=virtio,version=9p2000.L captures /mnt
export NIRI_SOCKET=$(printf '%s' /run/user/1000/niri.*.sock)
# Test-only Unix IPC bridge through the dedicated captures directory. No network.
while test ! -f /mnt/stop-control; do
 if test -f /mnt/request; then
  read -r action argument < /mnt/request
  rm /mnt/request
  case "$action" in
   windows) niri msg -j windows > /mnt/windows.json ;;
   home) niri msg action focus-workspace home ;;
   overview) niri msg action open-overview ;;
   close) niri msg action close-window --id "$argument" ;;
   focus) niri msg action focus-window --id "$argument" ;;
   spawn) niri msg action spawn -- alacritty ;;
   shot) niri msg action screenshot-screen --path "/mnt/$argument.png" ;;
  esac
  touch /mnt/done
 fi
 sleep 0.2
done