From 2bbf68b58338cda1e0415d09a674a5eccc0e0d16 Mon Sep 17 00:00:00 2001 From: Tulili Date: Fri, 11 Aug 2023 09:17:29 -0300 Subject: [PATCH] feat(yafti): granular waydroid + gaming config --- usr/bin/refresh-yafti | 3 ++ usr/share/applications/Yafti.desktop | 6 ++++ usr/share/ublue-os/firstboot/yafti.yml | 5 +++- usr/share/ublue-os/just/setup.just | 29 +++++++++++++------ .../applications/ForceWaydroid.desktop | 0 .../applications/KillWaydroid.desktop | 8 +++++ 6 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 usr/bin/refresh-yafti create mode 100644 usr/share/applications/Yafti.desktop rename usr/share/{ => ublue-os/malachite}/applications/ForceWaydroid.desktop (100%) create mode 100644 usr/share/ublue-os/malachite/applications/KillWaydroid.desktop diff --git a/usr/bin/refresh-yafti b/usr/bin/refresh-yafti new file mode 100644 index 0000000000..3d8039bb6a --- /dev/null +++ b/usr/bin/refresh-yafti @@ -0,0 +1,3 @@ +#!/bin/sh +rm -r "$HOME/.config/yafti" +yafti /usr/share/ublue-os/firstboot/yafti.yml \ No newline at end of file diff --git a/usr/share/applications/Yafti.desktop b/usr/share/applications/Yafti.desktop new file mode 100644 index 0000000000..404993597b --- /dev/null +++ b/usr/share/applications/Yafti.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Name=Yafti +Exec=sh /usr/bin/refresh-yafti +Icon=fish +Categories=System \ No newline at end of file diff --git a/usr/share/ublue-os/firstboot/yafti.yml b/usr/share/ublue-os/firstboot/yafti.yml index b5b8fb8506..86271bff18 100644 --- a/usr/share/ublue-os/firstboot/yafti.yml +++ b/usr/share/ublue-os/firstboot/yafti.yml @@ -21,6 +21,7 @@ screens: default: false packages: - Setup Gamebox Container: just --unstable setup gamebox + - Setup Steam-only session: just --unstable setup steam-session Nimbus: description: Development toolbox meant for coding! default: false @@ -37,7 +38,9 @@ screens: description: Android support with GApps, ARM translation, and Widevine out of the box default: false packages: - - Setup remotes: just --unstable setup waydroid + - Setup waydroid: just --unstable setup waydroid + - Setup waydroid-only session: just --unstable setup waydroid-session + - Setup shortcuts: just --unstable setup waydroid-shortcut Remote: description: Sets up proper remote access to this system! default: false diff --git a/usr/share/ublue-os/just/setup.just b/usr/share/ublue-os/just/setup.just index b0c4936091..b9dfa0ae03 100644 --- a/usr/share/ublue-os/just/setup.just +++ b/usr/share/ublue-os/just/setup.just @@ -1,7 +1,14 @@ -waydroid: +aydroid: pkexec waydroid init -s GAPPS -c https://ota.waydro.id/system -v https://ota.waydro.id/vendor pkexec sh -c 'git clone https://github.com/casualsnek/waydroid_script /tmp/wrscript && python3 -m venv /tmp/wrscript/venv && /tmp/wrscript/venv/bin/pip install -r /tmp/wrscript/requirements.txt && /tmp/wrscript/venv/bin/python3 /tmp/wrscript/main.py -a 11 install smartdock libndk widevine && /tmp/wrscript/venv/bin/python3 /tmp/wrscript/main.py -a 11 hack hidestatusbar' +waydroid-shortcut: + mkdir -p $HOME/.local/share/applications + cp /usr/share/ublue-os/malachite/applications/*Waydroid* $HOME/.local/share/applications + +waydroid-session: + pkexec sh -c 'mkdir -p /usr/local/share/wayland-sessions && cp /usr/share/ublue-os/malachite/sessions/waydroid-session.desktop /usr/local/share/wayland-sessions' + cockpit: pkexec sh -c 'systemctl try-restart sshd && podman container runlabel --name cockpit-ws RUN quay.io/cockpit/ws && podman container runlabel INSTALL quay.io/cockpit/ws && systemctl enable cockpit.service' @@ -9,10 +16,13 @@ ubuntu-theme: dconf load / < /usr/share/ublue-os/malachite/dconf/ubuntu.ini fish: - pkexec usermod -s /usr/bin/fish $USER + pkexec usermod -s /usr/bin/fish "$USER" curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish fish -c 'omf install bobthefish' +nushell: + pkexec usermod -s /usr/bin/nushell "$USER" + dotfiles: git clone https://github.com/TheLocehiliosan/yadm.git ~/.local/share/yadm-clone mkdir -p $HOME/.local/bin @@ -32,12 +42,13 @@ positivo-touchscreen: printf 'SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", ENV{WL_OUTPUT}="silead_ts", ENV{LIBINPUT_CALIBRATION_MATRIX}="2.0994971271086835 0.0 -0.009475882227217559 0.0 3.2251959199264215 -0.002555450541782298 0.0 0.0 1.0"' | pkexec tee -a /etc/udev/rules.d/99-positivo-touchscreen.rules nimbus: - distrobox create -i ghcr.io/tulilirockz/nimbus:latest -n nimbus -Y - distrobox-enter -n nimbus -- 'paru -Syu --noconfirm visual-studio-code-bin' - distrobox-enter -n nimbus -- 'distrobox-export --app code && distrobox-export --bin /usr/sbin/code' - distrobox-enter -n nimbus -- 'distrobox-export --bin /usr/sbin/gh' - distrobox-enter -n nimbus -- 'distrobox-export --bin /usr/sbin/glab' + distrobox create -i ghcr.io/tulilirockz/nimbus:latest -n nimbus -Y + distrobox-enter -n nimbus -- 'paru -Syu --noconfirm visual-studio-code-bin' + distrobox-enter -n nimbus -- 'distrobox-export --app code && distrobox-export --bin /usr/sbin/code' gamebox: - distrobox create -i ghcr.io/ublue-os/bazzite-arch:latest -n gamebox -Y - distrobox-enter -n gamebox -- 'distrobox-export --app steam ; distrobox export --app lutris ; distrobox-export --bin protontricks ; distrobox-export --bin lutris' + distrobox create -i ghcr.io/ublue-os/bazzite-arch:latest -n gamebox -Y + distrobox-enter -n gamebox -- 'distrobox-export --app steam ; distrobox export --app lutris ; distrobox-export --bin protontricks ; distrobox-export --bin lutris' + +steam-session: + pkexec sh -c 'mkdir -p /usr/local/share/wayland-sessions && cp /usr/share/ublue-os/malachite/sessions/steam-session.desktop /usr/local/share/wayland-sessions' \ No newline at end of file diff --git a/usr/share/applications/ForceWaydroid.desktop b/usr/share/ublue-os/malachite/applications/ForceWaydroid.desktop similarity index 100% rename from usr/share/applications/ForceWaydroid.desktop rename to usr/share/ublue-os/malachite/applications/ForceWaydroid.desktop diff --git a/usr/share/ublue-os/malachite/applications/KillWaydroid.desktop b/usr/share/ublue-os/malachite/applications/KillWaydroid.desktop new file mode 100644 index 0000000000..e011be2524 --- /dev/null +++ b/usr/share/ublue-os/malachite/applications/KillWaydroid.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Waydroid Kill Server +Exec=/usr/bin/pkexec waydroid container stop +Icon=waydroid +Categories=X-WayDroid-App; +X-Purism-FormFactor=Workstation;Mobile; +