forked from ublue-os/bluefin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# vim: set ft=make : | ||
|
||
alias configure-waydroid := setup-waydroid | ||
|
||
# Launch Waydroid configuration helper | ||
setup-waydroid ACTION="": | ||
#!/usr/bin/bash | ||
source /usr/lib/ujust/ujust.sh | ||
IMAGE_INFO="/usr/share/ublue-os/image-info.json" | ||
IMAGE_NAME=$(jq -r '."image-name"' < $IMAGE_INFO) | ||
OPTION={{ ACTION }} | ||
if [ "$OPTION" == "help" ]; then | ||
echo "Usage: ujust configure-waydroid <option>" | ||
echo " <option>: Specify the quick option to skip the prompt" | ||
echo " Use 'init' to select Initialize Waydroid" | ||
echo " Use 'configure' to select Configure Waydroid" | ||
echo " Use 'gpu' to choose Select GPU for Waydroid" | ||
echo " Use 'integration' to enable desktop window integration for Waydroid" | ||
echo " Use 'reset' to select Configure Waydroid" | ||
exit 0 | ||
elif [ "$OPTION" == "" ]; then | ||
echo "${bold}Waydroid Setup${normal}" | ||
echo "Please read the $(Urllink "https://docs.bazzite.gg/Installing_and_Managing_Software/Waydroid_Setup_Guide/" "Waydroid setup documentation") before continuing" | ||
OPTION=$(Choose "Initialize Waydroid" "Configure Waydroid" "Select GPU for Waydroid" "Reset Waydroid (also removes waydroid-related files from user folder)") | ||
fi | ||
if [[ "${OPTION,,}" =~ ^init ]]; then | ||
if [[ ! $IMAGE_NAME =~ "deck" && ! $IMAGE_NAME =~ "ally" ]]; then | ||
sudo systemctl enable --now waydroid-container | ||
fi | ||
sudo waydroid init -c 'https://ota.waydro.id/system' -v 'https://ota.waydro.id/vendor' | ||
echo "Waydroid has been initialized, please run waydroid once before you Configure Waydroid" | ||
elif [[ "${OPTION,,}" =~ ^configure ]]; then | ||
git clone https://github.com/ublue-os/waydroid_script.git --depth 1 /tmp/waydroid_script | ||
python -m venv /tmp/waydroid_script/venv | ||
source /tmp/waydroid_script/venv/bin/activate | ||
sudo pip install -r /tmp/waydroid_script/requirements.txt | ||
sudo /tmp/waydroid_script/main.py | ||
deactivate | ||
sudo rm -rf /tmp/waydroid_script | ||
elif [[ "${OPTION,,}" =~ gpu ]]; then | ||
sudo /usr/bin/waydroid-choose-gpu | ||
elif [[ "${OPTION,,}" =~ integration ]]; then | ||
waydroid prop set persist.waydroid.multi_windows true | ||
elif [[ "${OPTION,,}" =~ ^reset ]]; then | ||
echo "Resetting Waydroid" | ||
bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid' | ||
echo "Waydroid has been reset" | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ | |
"tmux", | ||
"usbmuxd", | ||
"wireguard-tools", | ||
"waydroid", | ||
"xprop", | ||
"wl-clipboard", | ||
"zsh" | ||
|