From 42034a950fcb9e540f877cca5d218c343c334d46 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 3 May 2026 22:53:34 +0200 Subject: [PATCH] Add Battle.net installer via Lutris --- bin/omarchy-install-battlenet | 19 +++++++++++++++++++ bin/omarchy-install-nvidia-lib32 | 12 ++++++++++++ bin/omarchy-install-steam | 23 +++-------------------- bin/omarchy-install-vulkan-lib32 | 20 ++++++++++++++++++++ bin/omarchy-menu | 3 ++- 5 files changed, 56 insertions(+), 21 deletions(-) create mode 100755 bin/omarchy-install-battlenet create mode 100755 bin/omarchy-install-nvidia-lib32 create mode 100755 bin/omarchy-install-vulkan-lib32 diff --git a/bin/omarchy-install-battlenet b/bin/omarchy-install-battlenet new file mode 100755 index 00000000..bf0f7088 --- /dev/null +++ b/bin/omarchy-install-battlenet @@ -0,0 +1,19 @@ +#!/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-nvidia-lib32 b/bin/omarchy-install-nvidia-lib32 new file mode 100755 index 00000000..ca9e4367 --- /dev/null +++ b/bin/omarchy-install-nvidia-lib32 @@ -0,0 +1,12 @@ +#!/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-steam b/bin/omarchy-install-steam index 5765ea84..57c3e446 100755 --- a/bin/omarchy-install-steam +++ b/bin/omarchy-install-steam @@ -5,26 +5,9 @@ set -e -PACKAGES=(steam) - -# Pick the lib32 vulkan provider matching detected GPU(s) so pacman doesn't prompt. -if omarchy-hw-nvidia-gsp; then - PACKAGES+=(lib32-nvidia-utils) -elif omarchy-hw-nvidia-without-gsp; then - PACKAGES+=(lib32-nvidia-580xx-utils) -fi - -declare -A VULKAN_DRIVERS=( - [Intel]=lib32-vulkan-intel - [AMD]=lib32-vulkan-radeon -) -for vendor in "${!VULKAN_DRIVERS[@]}"; do - if lspci | grep -iE "(VGA|Display).*$vendor" >/dev/null; then - PACKAGES+=("${VULKAN_DRIVERS[$vendor]}") - fi -done - -omarchy-pkg-add "${PACKAGES[@]}" +omarchy-pkg-add steam +omarchy-install-vulkan-lib32 +omarchy-install-nvidia-lib32 echo "" echo "Steam will start automatically now. This might take a while..." diff --git a/bin/omarchy-install-vulkan-lib32 b/bin/omarchy-install-vulkan-lib32 new file mode 100755 index 00000000..76e4ae92 --- /dev/null +++ b/bin/omarchy-install-vulkan-lib32 @@ -0,0 +1,20 @@ +#!/bin/bash + +# omarchy:summary=Install lib32 Vulkan drivers for any detected Intel/AMD GPUs (no-op otherwise). +# omarchy:requires-sudo=true + +set -e + +PACKAGES=() + +declare -A VULKAN_DRIVERS=( + [Intel]=lib32-vulkan-intel + [AMD]=lib32-vulkan-radeon +) +for vendor in "${!VULKAN_DRIVERS[@]}"; do + if lspci | grep -iE "(VGA|Display).*$vendor" >/dev/null; then + PACKAGES+=("${VULKAN_DRIVERS[$vendor]}") + fi +done + +[[ ${#PACKAGES[@]} -gt 0 ]] && omarchy-pkg-add "${PACKAGES[@]}" diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 9933b5da..4a1b8565 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -386,10 +386,11 @@ show_install_ai_menu() { } show_install_gaming_menu() { - case $(menu "Install" " Steam\n RetroArch\n󰍳 Minecraft\n󰢹 NVIDIA GeForce NOW\n󰖺 Xbox Controller [AUR]") in + 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 ;; *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 ;; *) show_install_menu ;;