From cda37e127df0be7455a5b6da377583dd91c2e95e Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:49:36 +0100 Subject: [PATCH] feat(just): move install application recipes to its own file --- Containerfile | 1 + .../usr/share/ublue-os/just/80-bazzite.just | 111 ----------------- .../share/ublue-os/just/81-bazzite-apps.just | 114 ++++++++++++++++++ 3 files changed, 115 insertions(+), 111 deletions(-) create mode 100644 system_files/desktop/shared/usr/share/ublue-os/just/81-bazzite-apps.just diff --git a/Containerfile b/Containerfile index d54cba55..e688b142 100644 --- a/Containerfile +++ b/Containerfile @@ -493,6 +493,7 @@ RUN /tmp/image-info.sh && \ sed -i 's@\[Desktop Entry\]@\[Desktop Entry\]\nNoDisplay=true@g' /usr/share/applications/discover_overlay.desktop && \ cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \ echo "import \"/usr/share/ublue-os/just/80-bazzite.just\"" >> /usr/share/ublue-os/justfile && \ + echo "import \"/usr/share/ublue-os/just/81-bazzite-apps.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/84-bazzite-virt.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/85-bazzite-image.just\"" >> /usr/share/ublue-os/justfile && \ echo "import \"/usr/share/ublue-os/just/90-bazzite-de.just\"" >> /usr/share/ublue-os/justfile && \ diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just b/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just index d5d43d58..4f2c9d3f 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just @@ -96,60 +96,6 @@ setup-sunshine ACTION="": fi fi -# Install LACT for overclocking & undervolting AMD GPUs -install-lact: - #!/usr/bin/bash - IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) - ublue-update --wait - if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then - echo 'Installing LACT Libadwaita...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-libadwaita.*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - else - echo 'Installing LACT...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-[0-9].*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - fi - rpm-ostree install --apply-live -y /tmp/lact.rpm - sudo systemctl enable --now lactd - rm /tmp/lact.rpm - echo 'Complete.' - -# Install SteamCMD (https://developer.valvesoftware.com/wiki/SteamCMD) -get-steamcmd: - echo 'Installing SteamCMD...' - wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -O /tmp/steamcmd.tar.gz - mkdir -p ~/.steam - tar -xvzf /tmp/steamcmd.tar.gz -C ~/.steam - rm /tmp/steamcmd.tar.gz - -# Install OpenRazer for Razer gaming hardware -install-openrazer: - sudo wget https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo -O /etc/yum.repos.d/hardware:razer.repo && \ - ublue-update --wait && \ - rpm-ostree install -y openrazer-meta razergenie && \ - if ! grep -q "plugdev" /etc/group; then \ - sudo bash -c 'grep "plugdev" /lib/group >> /etc/group' \ - ; fi && \ - sudo usermod -a -G plugdev $USER && \ - echo "Please reboot to apply needed changes." - -# Install Wootility for configuring Wooting Keyboards -get-wootility: - #!/usr/bin/bash - if grep -q 'it.mijorus.gearlever' <<< $(flatpak list); then - wget "https://api.wooting.io/public/wootility/download?os=linux&branch=lekker" -O $HOME/Downloads/wootility.AppImage - flatpak run it.mijorus.gearlever $HOME/Downloads/wootility.AppImage - else - wget "https://api.wooting.io/public/wootility/download?os=linux&branch=lekker" -O $HOME/Desktop/wootility.AppImage - chmod +x $HOME/Desktop/wootility.AppImage - fi - # Patch a bug in some 32-bit Source 1.x titles that causes them to crash at startup patch-source1-tcmalloc: #!/usr/bin/bash @@ -169,16 +115,6 @@ patch-gmod: /tmp/patch-gmod/GModCEFCodecFix-Linux rm -rf /tmp/patch-gmod -# Install Adwaita-for-Steam theme for CSS Loader (https://github.com/tkashkin/Adwaita-for-Steam) -install-adwaita-for-steam: - #!/usr/bin/bash - if [ -d "$HOME/homebrew/themes" ]; then - rm -rf "$HOME/homebrew/themes/Adwaita-for-Steam" - git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam" - else - echo 'Please install Decky Loader & CSS Loader first' - fi - # Force-enable AMD pstate pstate-force-enable: rpm-ostree kargs --append-if-missing=amd_pstate=active @@ -284,53 +220,6 @@ configure-watchdog ACTION="": rpm-ostree kargs $WATCHDOG_KARGS fi -# Install Oversteer for Logitech steering wheels -install-oversteer: distrobox-check-fedora - distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y kylegospo/oversteer && \ - sudo dnf install -y oversteer && \ - distrobox-export --app oversteer' - -# Install Solaar for Logitech Mice, Keyboards, and Trackpads -install-solaar: distrobox-check-fedora - distrobox-enter -n fedora -- bash -c 'sudo dnf install -y \ - solaar && \ - distrobox-export --app solaar' && \ - mkdir -p ~/.config/autostart && \ - rm -f ~/.config/autostart/fedora-solaar.desktop && \ - cp ~/.local/share/applications/fedora-solaar.desktop ~/.config/autostart/fedora-solaar.desktop - -# Install Resilio Sync, a file synchronization utility powered by BitTorrent -install-resilio-sync: distrobox-check-fedora - distrobox-enter -n fedora -- 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc' && \ - distrobox-enter -n fedora -- 'sudo wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/resilio-sync.repo -O /etc/yum.repos.d/resilio-sync.repo' && \ - distrobox-enter -n fedora -- 'sudo dnf install -y resilio-sync' && \ - mkdir -p ~/.config/systemd/user/ && \ - rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \ - wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \ - systemctl --user daemon-reload && \ - systemctl enable --user --now fedora-resilio-sync.service - -# Install scrcpy, a utility that mirrors Android devices (video and audio) connected via USB or over TCP/IP -install-scrcpy: distrobox-check-fedora - distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y zeno/scrcpy && \ - sudo dnf install -y scrcpy && \ - distrobox-export --app scrcpy' - -# Install OpenTabletDriver, an open source, cross-platform, user-mode tablet driver -install-opentabletdriver: - #!/usr/bin/bash - source /usr/lib/ujust/ujust.sh - if grep -qvz "arch" <<< $(distrobox list); then \ - Assemble noconfirmcreate "" "arch"; \ - fi && \ - distrobox enter -n arch -- ' paru -S opentabletdriver --noconfirm' && \ - mkdir -p ~/.config/systemd/user/ && \ - rm -f ~/.config/systemd/user/arch-opentabletdriver.service && \ - wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/OpenTabletDriver/opentabletdriver.service -O ~/.config/systemd/user/arch-opentabletdriver.service && \ - systemctl --user daemon-reload && \ - systemctl enable --user --now arch-opentabletdriver.service && \ - distrobox enter -n arch -- 'distrobox-export --app otd-gui' - # Add virtual audio channels/sinks named Game, Voice, Browser and Music which you can split audio to using qpwgraph, helvum, carla or other pipewire patchbays for use in OBS and other use cases setup-virtual-channels: #!/bin/bash diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/81-bazzite-apps.just b/system_files/desktop/shared/usr/share/ublue-os/just/81-bazzite-apps.just new file mode 100644 index 00000000..619f52b6 --- /dev/null +++ b/system_files/desktop/shared/usr/share/ublue-os/just/81-bazzite-apps.just @@ -0,0 +1,114 @@ +# vim: set ft=make : + +# Install LACT for overclocking & undervolting AMD GPUs +install-lact: + #!/usr/bin/bash + IMAGE_INFO="/usr/share/ublue-os/image-info.json" + BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) + ublue-update --wait + if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then + echo 'Installing LACT Libadwaita...' + wget \ + $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ + jq -r ".assets[] | select(.name | test(\"lact-libadwaita.*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ + -O /tmp/lact.rpm + else + echo 'Installing LACT...' + wget \ + $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ + jq -r ".assets[] | select(.name | test(\"lact-[0-9].*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ + -O /tmp/lact.rpm + fi + rpm-ostree install --apply-live -y /tmp/lact.rpm + sudo systemctl enable --now lactd + rm /tmp/lact.rpm + echo 'Complete.' + +# Install SteamCMD (https://developer.valvesoftware.com/wiki/SteamCMD) +get-steamcmd: + echo 'Installing SteamCMD...' + wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz -O /tmp/steamcmd.tar.gz + mkdir -p ~/.steam + tar -xvzf /tmp/steamcmd.tar.gz -C ~/.steam + rm /tmp/steamcmd.tar.gz + +# Install OpenRazer for Razer gaming hardware +install-openrazer: + sudo wget https://download.opensuse.org/repositories/hardware:/razer/Fedora_$(rpm -E %fedora)/hardware:razer.repo -O /etc/yum.repos.d/hardware:razer.repo && \ + ublue-update --wait && \ + rpm-ostree install -y openrazer-meta razergenie && \ + if ! grep -q "plugdev" /etc/group; then \ + sudo bash -c 'grep "plugdev" /lib/group >> /etc/group' \ + ; fi && \ + sudo usermod -a -G plugdev $USER && \ + echo "Please reboot to apply needed changes." + + +# Install Wootility for configuring Wooting Keyboards +get-wootility: + #!/usr/bin/bash + if grep -q 'it.mijorus.gearlever' <<< $(flatpak list); then + wget "https://api.wooting.io/public/wootility/download?os=linux&branch=lekker" -O $HOME/Downloads/wootility.AppImage + flatpak run it.mijorus.gearlever $HOME/Downloads/wootility.AppImage + else + wget "https://api.wooting.io/public/wootility/download?os=linux&branch=lekker" -O $HOME/Desktop/wootility.AppImage + chmod +x $HOME/Desktop/wootility.AppImage + fi + +# Install Adwaita-for-Steam theme for CSS Loader (https://github.com/tkashkin/Adwaita-for-Steam) +install-adwaita-for-steam: + #!/usr/bin/bash + if [ -d "$HOME/homebrew/themes" ]; then + rm -rf "$HOME/homebrew/themes/Adwaita-for-Steam" + git clone https://github.com/tkashkin/Adwaita-for-Steam.git --single-branch "$HOME/homebrew/themes/Adwaita-for-Steam" + else + echo 'Please install Decky Loader & CSS Loader first' + fi + +# Install Oversteer for Logitech steering wheels +install-oversteer: distrobox-check-fedora + distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y kylegospo/oversteer && \ + sudo dnf install -y oversteer && \ + distrobox-export --app oversteer' + +# Install Solaar for Logitech Mice, Keyboards, and Trackpads +install-solaar: distrobox-check-fedora + distrobox-enter -n fedora -- bash -c 'sudo dnf install -y \ + solaar && \ + distrobox-export --app solaar' && \ + mkdir -p ~/.config/autostart && \ + rm -f ~/.config/autostart/fedora-solaar.desktop && \ + cp ~/.local/share/applications/fedora-solaar.desktop ~/.config/autostart/fedora-solaar.desktop + +# Install Resilio Sync, a file synchronization utility powered by BitTorrent +install-resilio-sync: distrobox-check-fedora + distrobox-enter -n fedora -- 'sudo rpm --import https://linux-packages.resilio.com/resilio-sync/key.asc' && \ + distrobox-enter -n fedora -- 'sudo wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/resilio-sync.repo -O /etc/yum.repos.d/resilio-sync.repo' && \ + distrobox-enter -n fedora -- 'sudo dnf install -y resilio-sync' && \ + mkdir -p ~/.config/systemd/user/ && \ + rm -f ~/.config/systemd/user/fedora-resilio-sync.service && \ + wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/resilio_sync/fedora-resilio-sync.service -O ~/.config/systemd/user/fedora-resilio-sync.service && \ + systemctl --user daemon-reload && \ + systemctl enable --user --now fedora-resilio-sync.service + +# Install scrcpy, a utility that mirrors Android devices (video and audio) connected via USB or over TCP/IP +install-scrcpy: distrobox-check-fedora + distrobox enter -n fedora -- bash -c 'sudo dnf copr enable -y zeno/scrcpy && \ + sudo dnf install -y scrcpy && \ + distrobox-export --app scrcpy' + +# Install OpenTabletDriver, an open source, cross-platform, user-mode tablet driver +install-opentabletdriver: + #!/usr/bin/bash + source /usr/lib/ujust/ujust.sh + if grep -qvz "arch" <<< $(distrobox list); then \ + Assemble noconfirmcreate "" "arch"; \ + fi && \ + distrobox enter -n arch -- ' paru -S opentabletdriver --noconfirm' && \ + mkdir -p ~/.config/systemd/user/ && \ + rm -f ~/.config/systemd/user/arch-opentabletdriver.service && \ + wget https://raw.githubusercontent.com/ublue-os/bazzite/main/post_install_files/OpenTabletDriver/opentabletdriver.service -O ~/.config/systemd/user/arch-opentabletdriver.service && \ + systemctl --user daemon-reload && \ + systemctl enable --user --now arch-opentabletdriver.service && \ + distrobox enter -n arch -- 'distrobox-export --app otd-gui' +