diff --git a/bin/omarchy-install-battlenet b/bin/omarchy-install-battlenet deleted file mode 100755 index bf0f7088..00000000 --- a/bin/omarchy-install-battlenet +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Install Battle.net via Lutris (Wine + DXVK handled by the Lutris install recipe) -# omarchy:requires-sudo=true - -set -e - -omarchy-pkg-add lutris wine-staging wine-mono wine-gecko winetricks python-protobuf -omarchy-install-vulkan-lib32 -omarchy-install-nvidia-lib32 - -# Lutris ships with `#!/usr/bin/env python3`, which resolves to mise's Python and -# fails to import the lutris module. Pin the shebang to the system Python. -sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/lutris - -echo "" -echo "Lutris will open the Battle.net installer. Click Install and follow the prompts." - -setsid lutris lutris:install/battlenet >/dev/null 2>&1 & diff --git a/bin/omarchy-install-geforce-now b/bin/omarchy-install-gaming-geforce-now similarity index 100% rename from bin/omarchy-install-geforce-now rename to bin/omarchy-install-gaming-geforce-now diff --git a/bin/omarchy-install-vulkan-lib32 b/bin/omarchy-install-gaming-gpu-lib32 similarity index 61% rename from bin/omarchy-install-vulkan-lib32 rename to bin/omarchy-install-gaming-gpu-lib32 index 76e4ae92..e0986764 100755 --- a/bin/omarchy-install-vulkan-lib32 +++ b/bin/omarchy-install-gaming-gpu-lib32 @@ -1,6 +1,6 @@ #!/bin/bash -# omarchy:summary=Install lib32 Vulkan drivers for any detected Intel/AMD GPUs (no-op otherwise). +# omarchy:summary=Install lib32 graphics drivers (Vulkan + NVIDIA) for any detected GPUs. # omarchy:requires-sudo=true set -e @@ -17,4 +17,10 @@ for vendor in "${!VULKAN_DRIVERS[@]}"; do fi done +if omarchy-hw-nvidia-gsp; then + PACKAGES+=(lib32-nvidia-utils) +elif omarchy-hw-nvidia-without-gsp; then + PACKAGES+=(lib32-nvidia-580xx-utils) +fi + [[ ${#PACKAGES[@]} -gt 0 ]] && omarchy-pkg-add "${PACKAGES[@]}" diff --git a/bin/omarchy-install-gaming-heroic-launcher b/bin/omarchy-install-gaming-heroic-launcher new file mode 100755 index 00000000..34d2fbb6 --- /dev/null +++ b/bin/omarchy-install-gaming-heroic-launcher @@ -0,0 +1,11 @@ +#!/bin/bash + +# omarchy:summary=Install Heroic Games Launcher (Epic, GOG, Amazon Prime Gaming) with graphics drivers. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-add heroic-games-launcher-bin +omarchy-install-gaming-gpu-lib32 + +setsid gtk-launch heroic >/dev/null 2>&1 & diff --git a/bin/omarchy-install-gaming-lutris b/bin/omarchy-install-gaming-lutris new file mode 100755 index 00000000..45bb8695 --- /dev/null +++ b/bin/omarchy-install-gaming-lutris @@ -0,0 +1,22 @@ +#!/bin/bash + +# omarchy:summary=Install Lutris with Wine + DXVK for running Windows games (Battle.net, EA, Ubisoft Connect, etc.) +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-add lutris umu-launcher wine-staging wine-mono wine-gecko winetricks python-protobuf +omarchy-install-gaming-gpu-lib32 + +# Lutris ships with `#!/usr/bin/env python3`, which resolves to mise's Python and +# fails to import the lutris module. Pin the shebang to the system Python. +sudo sed -i '/env python3/ c\#!/bin/python3' /usr/bin/lutris + +cat <<'EOF' + +Lutris will open and auto-fetch its DXVK and VKD3D runtimes in the background +(watch the bottom status bar). Once that finishes, click the + to add or install games. + +EOF + +setsid lutris >/dev/null 2>&1 & diff --git a/bin/omarchy-install-retroarch b/bin/omarchy-install-gaming-retroarch similarity index 100% rename from bin/omarchy-install-retroarch rename to bin/omarchy-install-gaming-retroarch diff --git a/bin/omarchy-install-steam b/bin/omarchy-install-gaming-steam similarity index 82% rename from bin/omarchy-install-steam rename to bin/omarchy-install-gaming-steam index 57c3e446..e08b26f5 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-gaming-steam @@ -6,8 +6,7 @@ set -e omarchy-pkg-add steam -omarchy-install-vulkan-lib32 -omarchy-install-nvidia-lib32 +omarchy-install-gaming-gpu-lib32 echo "" echo "Steam will start automatically now. This might take a while..." diff --git a/bin/omarchy-install-gaming-xbox-cloud b/bin/omarchy-install-gaming-xbox-cloud new file mode 100755 index 00000000..958cc025 --- /dev/null +++ b/bin/omarchy-install-gaming-xbox-cloud @@ -0,0 +1,9 @@ +#!/bin/bash + +# omarchy:summary=Install Xbox Cloud Gaming as a web app and launch it. + +set -e + +omarchy-webapp-install "Xbox Cloud Gaming" "https://www.xbox.com/en-US/play" "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/xbox.png" + +setsid omarchy-launch-webapp "https://www.xbox.com/en-US/play" >/dev/null 2>&1 & diff --git a/bin/omarchy-install-gaming-xbox-controllers b/bin/omarchy-install-gaming-xbox-controllers new file mode 100755 index 00000000..9e1ecb73 --- /dev/null +++ b/bin/omarchy-install-gaming-xbox-controllers @@ -0,0 +1,35 @@ +#!/bin/bash + +# omarchy:summary=Install support for using Xbox controllers with Steam/RetroArch/etc. +# omarchy:requires-sudo=true + +set -e + +# Install xpadneo to ensure controllers work out of the box +omarchy-pkg-add linux-headers xpadneo-dkms + +# Prevent xpad/xpadneo driver conflict +echo blacklist xpad | sudo tee /etc/modprobe.d/blacklist-xpad.conf >/dev/null +echo hid_xpadneo | sudo tee /etc/modules-load.d/xpadneo.conf >/dev/null + +# Ensure user is in the input group (controllers need it) +needs_reboot=false +if ! id -nG "$USER" | grep -qw input; then + sudo usermod -aG input "$USER" + needs_reboot=true +fi + +# Swap drivers in the running kernel so a reboot isn't needed otherwise +if lsmod | grep -q '^xpad '; then + sudo modprobe -r xpad 2>/dev/null || needs_reboot=true +fi + +if $needs_reboot; then + gum confirm "Reboot needed to finish setup. Reboot now?" && sudo reboot now + exit 0 +fi + +sudo modprobe hid_xpadneo + +echo "" +echo "Now you can pair your Xbox controller with Bluetooth using Super + Ctrl + B." diff --git a/bin/omarchy-install-nvidia-lib32 b/bin/omarchy-install-nvidia-lib32 deleted file mode 100755 index ca9e4367..00000000 --- a/bin/omarchy-install-nvidia-lib32 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Install the lib32 NVIDIA driver matching the detected GPU generation (no-op if no NVIDIA). -# omarchy:requires-sudo=true - -set -e - -if omarchy-hw-nvidia-gsp; then - omarchy-pkg-add lib32-nvidia-utils -elif omarchy-hw-nvidia-without-gsp; then - omarchy-pkg-add lib32-nvidia-580xx-utils -fi diff --git a/bin/omarchy-install-xbox-controllers b/bin/omarchy-install-xbox-controllers deleted file mode 100755 index be5e97d9..00000000 --- a/bin/omarchy-install-xbox-controllers +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Install support for using Xbox controllers with Steam/RetroArch/etc. -# omarchy:requires-sudo=true - -set -e - -# Install xpadneo to ensure controllers work out of the box -omarchy-pkg-add linux-headers -omarchy-pkg-aur-add xpadneo-dkms - -# Prevent xpad/xpadneo driver conflict -echo blacklist xpad | sudo tee /etc/modprobe.d/blacklist-xpad.conf >/dev/null -echo hid_xpadneo | sudo tee /etc/modules-load.d/xpadneo.conf >/dev/null - -# Give user access to game controllers -sudo usermod -a -G input $USER - -# Modules need to be loaded -gum confirm "Install requires reboot. Ready?" && sudo reboot now diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 07f96740..5c18ee88 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -386,13 +386,15 @@ show_install_ai_menu() { } show_install_gaming_menu() { - case $(menu "Install" " Steam\n RetroArch\n󰍳 Minecraft\n Battle.net\n󰢹 NVIDIA GeForce NOW\n󰖺 Xbox Controller [AUR]") in - *Steam*) present_terminal omarchy-install-steam ;; - *RetroArch*) present_terminal omarchy-install-retroarch ;; + case $(menu "Install" " Steam\n RetroArch\n󰍳 Minecraft\n󰢹 NVIDIA GeForce NOW\n Xbox Cloud Gaming\n󰖺 Xbox Controller (󰂯)\n Lutris (Battle.net)\n󱓟 Heroic (Epic Games)") in + *Steam*) present_terminal omarchy-install-gaming-steam ;; + *RetroArch*) present_terminal omarchy-install-gaming-retroarch ;; *Minecraft*) install_and_launch "Minecraft" "minecraft-launcher" "minecraft-launcher" ;; - *Battle.net*) present_terminal omarchy-install-battlenet ;; - *GeForce*) present_terminal omarchy-install-geforce-now ;; - *Xbox*) present_terminal omarchy-install-xbox-controllers ;; + *GeForce*) present_terminal omarchy-install-gaming-geforce-now ;; + *"Xbox Cloud"*) present_terminal omarchy-install-gaming-xbox-cloud ;; + *Xbox*) present_terminal omarchy-install-gaming-xbox-controllers ;; + *Lutris*) present_terminal omarchy-install-gaming-lutris ;; + *Heroic*) present_terminal omarchy-install-gaming-heroic ;; *) show_install_menu ;; esac } @@ -465,11 +467,12 @@ show_install_elixir_menu() { } show_remove_menu() { - case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰵮 Development\n󰏓 Preinstalls\n Dictation\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in + case $(menu "Remove" "󰣇 Package\n Web App\n TUI\n󰵮 Development\n Gaming\n󰏓 Preinstalls\n Dictation\n󰸌 Theme\n󰍲 Windows\n󰈷 Fingerprint\n Fido2") in *Package*) terminal omarchy-pkg-remove ;; *Web*) present_terminal omarchy-webapp-remove ;; *TUI*) present_terminal omarchy-tui-remove ;; *Development*) show_remove_development_menu ;; + *Gaming*) show_remove_gaming_menu ;; *Preinstalls*) present_terminal omarchy-remove-preinstalls ;; *Dictation*) present_terminal omarchy-voxtype-remove ;; *Theme*) present_terminal omarchy-theme-remove ;; @@ -480,6 +483,20 @@ show_remove_menu() { esac } +show_remove_gaming_menu() { + case $(menu "Remove" " Steam\n RetroArch\n󰍳 Minecraft\n󰢹 NVIDIA GeForce NOW\n Xbox Cloud Gaming\n󰖺 Xbox Controller (󰂯)\n Lutris (Battle.net)\n󱓟 Heroic (Epic Games)") in + *Steam*) present_terminal omarchy-remove-gaming-steam ;; + *RetroArch*) present_terminal omarchy-remove-gaming-retroarch ;; + *Minecraft*) present_terminal omarchy-remove-gaming-minecraft ;; + *GeForce*) present_terminal omarchy-remove-gaming-geforce-now ;; + *"Xbox Cloud"*) present_terminal omarchy-remove-gaming-xbox-cloud ;; + *Xbox*) present_terminal omarchy-remove-gaming-xbox-controllers ;; + *Lutris*) present_terminal omarchy-remove-gaming-lutris ;; + *Heroic*) present_terminal omarchy-remove-gaming-heroic ;; + *) show_remove_menu ;; + esac +} + show_remove_development_menu() { case $(menu "Remove" "󰫏 Ruby on Rails\n JavaScript\n Go\n PHP\n Python\n Elixir\n Zig\n Rust\n Java\n .NET\n OCaml\n Clojure\n Scala") in *Rails*) present_terminal "omarchy-remove-dev-env ruby" ;; diff --git a/bin/omarchy-pkg-drop b/bin/omarchy-pkg-drop index 06e396cd..0cbbfca6 100755 --- a/bin/omarchy-pkg-drop +++ b/bin/omarchy-pkg-drop @@ -4,8 +4,13 @@ # omarchy:args= # omarchy:requires-sudo=true +installed=() for pkg in "$@"; do if pacman -Q "$pkg" &>/dev/null; then - sudo pacman -Rns --noconfirm "$pkg" + installed+=("$pkg") fi done + +if (( ${#installed[@]} > 0 )); then + sudo pacman -Rns --noconfirm "${installed[@]}" +fi diff --git a/bin/omarchy-remove-gaming-geforce-now b/bin/omarchy-remove-gaming-geforce-now new file mode 100755 index 00000000..9947ee10 --- /dev/null +++ b/bin/omarchy-remove-gaming-geforce-now @@ -0,0 +1,12 @@ +#!/bin/bash + +# omarchy:summary=Remove the GeForce NOW Flatpak app and its data. + +set -e + +if command -v flatpak >/dev/null && flatpak info com.nvidia.geforcenow &>/dev/null; then + flatpak uninstall -y --delete-data com.nvidia.geforcenow +fi + +echo "" +echo "GeForce NOW removed." diff --git a/bin/omarchy-remove-gaming-heroic-launcher b/bin/omarchy-remove-gaming-heroic-launcher new file mode 100755 index 00000000..7247c247 --- /dev/null +++ b/bin/omarchy-remove-gaming-heroic-launcher @@ -0,0 +1,17 @@ +#!/bin/bash + +# omarchy:summary=Remove Heroic Games Launcher and its game libraries, configs, and caches. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop heroic-games-launcher-bin + +rm -rf \ + "$HOME/.config/heroic" \ + "$HOME/.local/share/heroic" \ + "$HOME/.cache/heroic" \ + "$HOME/Games/Heroic" + +echo "" +echo "Heroic and its data have been removed." diff --git a/bin/omarchy-remove-gaming-lutris b/bin/omarchy-remove-gaming-lutris new file mode 100755 index 00000000..18253890 --- /dev/null +++ b/bin/omarchy-remove-gaming-lutris @@ -0,0 +1,21 @@ +#!/bin/bash + +# omarchy:summary=Remove Lutris, Wine, umu-launcher, and all their configs and caches. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop lutris wine-staging wine-mono wine-gecko winetricks python-protobuf umu-launcher + +rm -rf \ + "$HOME/.config/lutris" \ + "$HOME/.local/share/lutris" \ + "$HOME/.cache/lutris" \ + "$HOME/.local/share/umu" \ + "$HOME/.cache/umu" \ + "$HOME/.wine" \ + "$HOME/.cache/wine" \ + "$HOME/.cache/winetricks" + +echo "" +echo "Lutris, Wine, umu-launcher, and their configs have been removed." diff --git a/bin/omarchy-remove-gaming-minecraft b/bin/omarchy-remove-gaming-minecraft new file mode 100755 index 00000000..1e439213 --- /dev/null +++ b/bin/omarchy-remove-gaming-minecraft @@ -0,0 +1,17 @@ +#!/bin/bash + +# omarchy:summary=Remove the Minecraft launcher along with its worlds, mods, and caches. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop minecraft-launcher + +rm -rf \ + "$HOME/.minecraft" \ + "$HOME/.config/Minecraft Launcher" \ + "$HOME/.local/share/minecraft-launcher" \ + "$HOME/.cache/minecraft" + +echo "" +echo "Minecraft and its data have been removed." diff --git a/bin/omarchy-remove-gaming-retroarch b/bin/omarchy-remove-gaming-retroarch new file mode 100755 index 00000000..d3c101c8 --- /dev/null +++ b/bin/omarchy-remove-gaming-retroarch @@ -0,0 +1,33 @@ +#!/bin/bash + +# omarchy:summary=Remove RetroArch, all libretro cores, and its config/saves. Leaves ~/Games/roms and ~/Games/bios alone. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop \ + retroarch \ + retroarch-assets-glui retroarch-assets-ozone retroarch-assets-xmb \ + libretro-beetle-pce libretro-beetle-pce-fast libretro-beetle-psx libretro-beetle-psx-hw libretro-beetle-supergrafx \ + libretro-blastem \ + libretro-bsnes libretro-bsnes-hd libretro-bsnes2014 \ + libretro-core-info \ + libretro-desmume libretro-dolphin libretro-flycast \ + libretro-gambatte libretro-genesis-plus-gx \ + libretro-kronos \ + libretro-mame libretro-mame2016 libretro-melonds libretro-mesen libretro-mesen-s libretro-mgba libretro-mupen64plus-next \ + libretro-nestopia \ + libretro-overlays \ + libretro-parallel-n64 libretro-picodrive libretro-play libretro-ppsspp \ + libretro-sameboy libretro-scummvm libretro-shaders-slang libretro-snes9x \ + libretro-yabause \ + libretro-fbneo-git + +rm -rf \ + "$HOME/.config/retroarch" \ + "$HOME/.local/share/retroarch" \ + "$HOME/.cache/retroarch" + +echo "" +echo "RetroArch and its cores have been removed." +echo "ROMs and BIOS files at ~/Games/roms and ~/Games/bios were left in place." diff --git a/bin/omarchy-remove-gaming-steam b/bin/omarchy-remove-gaming-steam new file mode 100755 index 00000000..1b20ec22 --- /dev/null +++ b/bin/omarchy-remove-gaming-steam @@ -0,0 +1,17 @@ +#!/bin/bash + +# omarchy:summary=Remove Steam and all of its game libraries, configs, and caches. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop steam + +rm -rf \ + "$HOME/.steam" \ + "$HOME/.local/share/Steam" \ + "$HOME/.config/steam" \ + "$HOME/.cache/steam" + +echo "" +echo "Steam and its data have been removed." diff --git a/bin/omarchy-remove-gaming-xbox-cloud b/bin/omarchy-remove-gaming-xbox-cloud new file mode 100755 index 00000000..7a42d357 --- /dev/null +++ b/bin/omarchy-remove-gaming-xbox-cloud @@ -0,0 +1,7 @@ +#!/bin/bash + +# omarchy:summary=Remove the Xbox Cloud Gaming web app. + +set -e + +omarchy-webapp-remove "Xbox Cloud Gaming" diff --git a/bin/omarchy-remove-gaming-xbox-controllers b/bin/omarchy-remove-gaming-xbox-controllers new file mode 100755 index 00000000..d20af7e6 --- /dev/null +++ b/bin/omarchy-remove-gaming-xbox-controllers @@ -0,0 +1,13 @@ +#!/bin/bash + +# omarchy:summary=Remove the xpadneo Xbox controller driver and undo its module/blacklist config. +# omarchy:requires-sudo=true + +set -e + +omarchy-pkg-drop xpadneo-dkms + +sudo rm -f /etc/modprobe.d/blacklist-xpad.conf /etc/modules-load.d/xpadneo.conf + +echo "" +echo "Xbox controller support removed. Reboot to fully unload xpadneo and restore xpad."