26 lines
616 B
Bash
Executable File

#!/usr/bin/env bash
source /etc/default/waydroid-launcher
if [ "$(systemctl is-active waydroid-container.service)" == 'active' ]; then
killall -9 weston
pkexec /usr/bin/waydroid-container-stop
exit
fi
killall -9 weston
pkexec /usr/bin/waydroid-container-start
if [ -z "$(pgrep weston)" ]; then
/usr/bin/weston --socket=weston-waydroid --width=${WAYDROID_WIDTH} --height=${WAYDROID_HEIGHT} &> /dev/null &
fi
sleep 2 &&
export XDG_SESSION_TYPE='wayland'
export WAYLAND_DISPLAY='weston-waydroid'
/usr/bin/waydroid $@ &
while [ -n "$(pgrep weston)" ];do
sleep 1
done
pkexec /usr/bin/waydroid-container-stop