diff options
Diffstat (limited to 'distro')
| -rwxr-xr-x | distro/arch.sh | 55 |
1 files changed, 18 insertions, 37 deletions
diff --git a/distro/arch.sh b/distro/arch.sh index 72971ef..ef896a3 100755 --- a/distro/arch.sh +++ b/distro/arch.sh @@ -137,28 +137,11 @@ zstd #shellcheck disable=SC2046 pacman -S --needed $(echo "$pkgs" | awk '{print $1}' | tr '\n' ' ') -fn="/etc/systemd/logind.conf" -bak="$fn.$(date +%s)" -cp "$fn" "$bak" -ed "$fn" <<EOF -/^\[Login -/^KillUserProcesses= -d -i -KillUserProcesses=yes -. -/^HandleLidSwitch= -d -i -HandleLidSwitch=ignore -. -w -q -EOF -if diff -q "$fn" "$bak" >/dev/null ; then - rm "$bak" -fi +grep -q '^KillUserProcesses=yes' /etc/systemd/logind.conf || \ + echo "You may want to set KillUserProcesses=yes in /etc/systemd/logind.conf" +grep -q '^HandleLidSwitch=ignore' /etc/systemd/logind.conf || \ + echo "You may want to set HandleLidSwitch=ignore in /etc/systemd/logind.conf" cat > /etc/udev/rules.d/99-removable.rules <<EOF # /etc/udev/rules.d/99-removable.rules @@ -166,22 +149,6 @@ ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized} EOF -cat > /etc/pacman.d/hooks/95-bootbackup.hook <<EOF -# /etc/pacman.d/hooks/95-bootbackup.hook -[Trigger] -Operation = Upgrade -Operation = Install -Operation = Remove -Type = Path -Target = usr/lib/modules/*/vmlinuz - -[Action] -Depends = rsync -Description = Backing up /boot... -When = PostTransaction -Exec = /bin/sh -c 'tar -C / -cf /.bootbackup."\$(date +%m.%d.%Y)".tar boot' -EOF - cat > /etc/modprobe.d/v4l2loopback.conf <<EOF options v4l2loopback video_nr=10,11,12 card_label="OBS Virtual Camera,Extra Loopback 1,Extra Loopback 2" EOF @@ -189,3 +156,17 @@ EOF cat > /etc/modules-load.d/v4l2loopback.conf <<EOF v4l2loopback EOF + + +case $(lspci | grep VGA) in + *Intel*) + # OpenCL Drivers + pacman -S --needed intel-compute-runtime + ;; + *AMD*) + ;; + *Nvidia*) + ;; + *) + echo "No GPU detected" +esac |
