mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-03-23 10:20:54 +00:00
feat: Improve Waydroid launcher, automatically initialize Waydroid if not initialized and use first-launch as a default param
This commit is contained in:
parent
d10c15a206
commit
5f5f74d924
@ -7,6 +7,11 @@ if [ "$(systemctl is-active waydroid-container.service)" == 'active' ]; then
|
|||||||
pkexec /usr/bin/waydroid-container-stop
|
pkexec /usr/bin/waydroid-container-stop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if Waydroid is initialized, initialize if not
|
||||||
|
if grep -qz 'not initialized' <<< $(/usr/bin/waydroid status); then
|
||||||
|
/usr/bin/ujust init-waydroid
|
||||||
|
fi
|
||||||
|
|
||||||
# Launch Weston
|
# Launch Weston
|
||||||
killall -9 weston
|
killall -9 weston
|
||||||
pkexec /usr/bin/waydroid-container-start
|
pkexec /usr/bin/waydroid-container-start
|
||||||
@ -18,7 +23,8 @@ fi
|
|||||||
sleep 2 &&
|
sleep 2 &&
|
||||||
export XDG_SESSION_TYPE='wayland'
|
export XDG_SESSION_TYPE='wayland'
|
||||||
export WAYLAND_DISPLAY='weston-waydroid'
|
export WAYLAND_DISPLAY='weston-waydroid'
|
||||||
/usr/bin/waydroid $@ &
|
LAUNCH_PARAM=$@
|
||||||
|
/usr/bin/waydroid ${LAUNCH_PARAM:-first-launch} &
|
||||||
|
|
||||||
# Fix controllers, we know Waydroid has started because surfaceflinger is running
|
# Fix controllers, we know Waydroid has started because surfaceflinger is running
|
||||||
while [ "" == "$(pgrep surfaceflinger)" ]; do
|
while [ "" == "$(pgrep surfaceflinger)" ]; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user