Skip to content

Instantly share code, notes, and snippets.

@Geofferey
Created June 24, 2023 08:44
Show Gist options
  • Save Geofferey/240bc14515001c5ffc122afe6286bd0a to your computer and use it in GitHub Desktop.
Save Geofferey/240bc14515001c5ffc122afe6286bd0a to your computer and use it in GitHub Desktop.
#!/bin/sh
PRIMARY_USER=geofferey
sleep 1
waydroid session stop
weston --socket=waydroid-0 &
## experiment for switching VT using touchegg gestures
#DISPLAY=$(ps -u $(id -u) -o pid= | xargs -I PID -r cat /proc/PID/environ 2> /dev/null | tr '\0' '\n' | grep ^DISPLAY=: | sort -u |cut -d '=' -f 2) touchegg &
sleep 6
PRIMARY_VT=$(loginctl |grep ${PRIMARY_USER} |grep tty |cut -d 'y' -f 3 | head -n1)
if [ ! -e /tmp/waydroid-weston-session.tmp ]; then
touch /tmp/waydroid-weston-session.tmp
gdmflexiserver || true
elif [ ! -z ${PRIMARY_VT} ]; then
chvt ${PRIMARY_VT}
else
gdmflexiserver || true
fi
sleep 1
WAYLAND_DISPLAY=waydroid-0 waydroid show-full-ui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment