Last active
October 13, 2024 14:40
-
-
Save mkg20001/74825938f660510a1013a28f967f286b to your computer and use it in GitHub Desktop.
Waydroid in non-wayland desktop (requires cage)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
if [ -v INSIDE ]; then | |
sleep 10s | |
waydroid show-full-ui | |
exit 0 | |
fi | |
# don't spawn display in main xdg runtime dir, as this causes wayland-supporting apps to spawn in cage | |
NEW_XDG=$(mktemp -d) | |
# fix audio | |
for f in $XDG_RUNTIME_DIR/pulse* $XDG_RUNTIME_DIR/pipewire*; do | |
ln -s "$f" "$NEW_XDG/$(basename "$f")" | |
done | |
# NOTE: this is compatible with multi-window mode! | |
# enable with: waydroid prop set persist.waydroid.multi_windows true | |
# NOTE: resize window to maximum (if not already maximized) BEFORE sleep 10s is over | |
# otherwise waydroid won't pick the size up | |
XDG_RUNTIME_DIR="$NEW_XDG" XKB_DEFAULT_LAYOUT=de INSIDE=1 cage -s -m extend -- bash "$(readlink -f "$0")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment