mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-31 06:32:57 +00:00
26 lines
595 B
Bash
26 lines
595 B
Bash
#!/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 --xwayland --width="${WAYDROID_WIDTH}" --height="${WAYDROID_HEIGHT}" &> /dev/null &
|
|
fi
|
|
|
|
sleep 2 &&
|
|
export XDG_SESSION_TYPE='wayland'
|
|
export DISPLAY=':1'
|
|
/usr/bin/waydroid show-full-ui &
|
|
while [ -n "$(pgrep weston)" ];do
|
|
sleep 1
|
|
done
|
|
|
|
pkexec /usr/bin/waydroid-container-stop
|