Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use waydroid props from config file #8

Merged
merged 1 commit into from
Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions includes.container/usr/bin/ewaydroid
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,24 @@
export XDG_RUNTIME_DIR="/run/host/${XDG_RUNTIME_DIR}"
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/host/$(echo "${DBUS_SESSION_BUS_ADDRESS}" | cut -d '=' -f2-)"

source ~/.config/waydroid-props

if [[ "$1" != "init" && ! $# -eq 0 ]]; then
if waydroid status | grep STOPPED; then
waydroid session start &
sleep 7
fi

waydroid prop set persist.waydroid.multi_windows ${multi_window:-true}
waydroid prop set persist.waydroid.cursor_on_subsurface ${cursor_on_subsurface:-false}
if [[ ! -z ${height_padding+x} ]]; then waydroid prop set persist.waydroid.height_padding ${height_padding}; fi
if [[ ! -z ${width_padding+x} ]]; then waydroid prop set persist.waydroid.width_padding ${width_padding}; fi
if [[ ! -z ${width+x} ]]; then waydroid prop set persist.waydroid.width ${width}; fi
if [[ ! -z ${height+x} ]]; then waydroid prop set persist.waydroid.height ${height}; fi
waydroid prop set persist.waydroid.suspend ${suspend_:-true}
waydroid prop set persist.waydroid.uevent ${uevent:-false}
waydroid prop set persist.waydroid.fake_touch ${fake_touch:-""}
waydroid prop set persist.waydroid.fake_wifi ${fake_wifi:-""}
fi

waydroid "$@"