From e056d23088fb7811777ab85ee71dae376a8e18f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Z=C3=BCrn?= Date: Sat, 5 Apr 2025 18:09:36 +0200 Subject: [PATCH] surface install --- data/surface/arch_surface.conf | 4 +++ data/surface/arch_surface_fallback.conf | 4 +++ data/surface/loader.conf | 2 ++ data/surface/sleep.sh | 48 +++++++++++++++++++++++++ install_aur_packages.sh | 1 + install_plymouth.sh | 5 +++ linux-surface.sh | 16 +++++++++ yay.sh | 6 ++++ 8 files changed, 86 insertions(+) create mode 100644 data/surface/arch_surface.conf create mode 100644 data/surface/arch_surface_fallback.conf create mode 100644 data/surface/loader.conf create mode 100755 data/surface/sleep.sh create mode 100644 install_aur_packages.sh create mode 100644 install_plymouth.sh create mode 100644 linux-surface.sh create mode 100644 yay.sh diff --git a/data/surface/arch_surface.conf b/data/surface/arch_surface.conf new file mode 100644 index 0000000..c2a25cb --- /dev/null +++ b/data/surface/arch_surface.conf @@ -0,0 +1,4 @@ +title Arch Linux Surface (linux) +linux /vmlinuz-linux +initrd /initramfs-linux-surface.img +options root=PARTUUID=3c787bf0-4b4a-4fb1-92ec-1660507ff3d6 rw rootfstype=ext4 quiet splash \ No newline at end of file diff --git a/data/surface/arch_surface_fallback.conf b/data/surface/arch_surface_fallback.conf new file mode 100644 index 0000000..b8adeb1 --- /dev/null +++ b/data/surface/arch_surface_fallback.conf @@ -0,0 +1,4 @@ +title Arch Linux Surface (linux) +linux /vmlinuz-linux +initrd /initramfs-linux-surface-fallback.img +options root=PARTUUID=3c787bf0-4b4a-4fb1-92ec-1660507ff3d6 rw rootfstype=ext4 \ No newline at end of file diff --git a/data/surface/loader.conf b/data/surface/loader.conf new file mode 100644 index 0000000..5f31059 --- /dev/null +++ b/data/surface/loader.conf @@ -0,0 +1,2 @@ +tiemout 0 +default arch_surface.conf \ No newline at end of file diff --git a/data/surface/sleep.sh b/data/surface/sleep.sh new file mode 100755 index 0000000..bd04b50 --- /dev/null +++ b/data/surface/sleep.sh @@ -0,0 +1,48 @@ +#!/bin/bash +## REMARK: +# - above shebang is required for scripting file +# - 1st arg passed to executable file is either "pre" (mean that the entry of a power operation) or "post" (mean that the exit of a power operation) +# - 2nd arg passed to executable file is either "suspend", "hibernate", "hybrid-sleep", or "suspend-then-hibernate", depends on what power operation is operating +# - SYSTEMD_SLEEP_ACTION environment variable is helpful for "suspend-then-hibernate", it has value of either "suspend", "hibernate", or "suspend-after-failed-hibernate" +case $1 in + pre) + case $2 in + hibernate) + ;; + hybrid-sleep) + ;; + suspend) + ;; + suspend-then-hibernate) + case $SYSTEMD_SLEEP_ACTION in + suspend) + ;; + hibernate) + ;; + suspend-after-failed-hibernate) + ;; + esac + ;; + esac + ;; + post) + case $2 in + hibernate) + ;; + hybrid-sleep) + ;; + suspend) + ;; + suspend-then-hibernate) + case $SYSTEMD_SLEEP_ACTION in + suspend) + ;; + hibernate) + ;; + suspend-after-failed-hibernate) + ;; + esac + ;; + esac + ;; +esac \ No newline at end of file diff --git a/install_aur_packages.sh b/install_aur_packages.sh new file mode 100644 index 0000000..5f237e9 --- /dev/null +++ b/install_aur_packages.sh @@ -0,0 +1 @@ +yay -S visual-studio-code-bin onlyoffice-bin teamviewer localsend diff --git a/install_plymouth.sh b/install_plymouth.sh new file mode 100644 index 0000000..4c24332 --- /dev/null +++ b/install_plymouth.sh @@ -0,0 +1,5 @@ +sudo pacman -S plymouth +yay -S plymouth-theme-arch-agua + +sed -i -e 's/HOOKS=(base/HOOKS=(base plymouth/' ~/.zshrc +sudo mkinitcpio -P \ No newline at end of file diff --git a/linux-surface.sh b/linux-surface.sh new file mode 100644 index 0000000..4656459 --- /dev/null +++ b/linux-surface.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +curl -s https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | sudo pacman-key --add - + +sudo bash -c 'echo "[linux-surface]" >> /etc/pacman.conf && echo "Server = https://pkg.surfacelinux.com/arch/" >> /etc/pacman.conf'/etc/mkinitcpio.d +sudo pacman-key --lsign-key 56C464BAAC421453 + +sudo pacman -Syu +sudo pacman -S linux-surface linux-surface-headers iptsd + +sudo cp data/surface/sleep.sh /usr/lib/systemd/system-sleep/surface_sleep.sh + +sudo mkinitcpio -P + +sudo cp data/surface/arch_surface.conf /boot/loader/entries/arch_surface.conf +sudo cp data/surface/arch_surface_fallback.conf /boot/loader/entries/arch_surface_fallback.conf diff --git a/yay.sh b/yay.sh new file mode 100644 index 0000000..5aec4f2 --- /dev/null +++ b/yay.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd /tmp +git clone https://aur.archlinux.org/yay.git +cd yay +makepkg -si