mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
29 lines
660 B
Bash
Executable File
29 lines
660 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# omarchy:summary=Install lib32 graphics drivers (Vulkan + NVIDIA) for any detected GPUs.
|
|
# omarchy:requires-sudo=true
|
|
|
|
set -e
|
|
|
|
echo "Installing lib32 graphics drivers..."
|
|
|
|
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
|
|
|
|
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[@]}"
|