Compare commits

...

3 Commits

Author SHA1 Message Date
0861bf8855 Merge branch 'main' into rotom 2026-01-09 01:33:19 +01:00
8a59d90006 Fucking hell 2 2026-01-09 01:33:13 +01:00
16aaa9f5bb Fucking hell 2 2026-01-09 01:33:06 +01:00

View File

@@ -2,42 +2,6 @@
set -e
###################
## Spinner stuff ##
###################
execute_with_spinner() {
local title="$1"
shift
spinner='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
local i=0
draw_status() {
tput sc
tput cup $(($(tput lines) - 1)) 0
printf "%s %s" "${spinner:i++%${#spinner}:1}" "$title"
tput el
tput rc
}
while sleep 0.05; do
draw_status
done &
SPIN_PID=$!
"$@"
local status=$?
kill "$SPIN_PID"
wait "$SPIN_PID" 2>/dev/null || true
echo
return $status
}
#########################
## gum style variables ##
#########################
@@ -53,7 +17,7 @@ sudo -v || exit 1
if ! command -v gum &>/dev/null; then
echo "Installing gum"
execute_with_spinner "Installing gum" sudo pacman -S --needed --noconfirm gum
sudo pacman -S --needed --noconfirm gum
fi
###################################
@@ -63,17 +27,19 @@ fi
if ! command -v yay &>/dev/null; then
sudo -v || exit 1
# gum spin --title "Installing yay dependencies" -- \
execute_with_spinner "Installing yay dependencies" sudo pacman -S base-devel git --needed --noconfirm
sudo pacman -S base-devel git --needed --noconfirm
TEMP_DIR=$(mktemp -d)
# gum spin --title "Cloning yay-bin from AUR" -- \
execute_with_spinner "Cloning yay-bin from AUR" git clone https://aur.archlinux.org/yay-bin.git $TEMP_DIR/yay
git clone https://aur.archlinux.org/yay-bin.git $TEMP_DIR/yay
cd $TEMP_DIR/yay
sudo -v || exit 1
# gum spin --title "Installing yay" -- \
execute_with_spinner "Installing yay" makepkg -si --noconfirm
makepkg -si --noconfirm
cd -
fi
#############################
@@ -115,7 +81,7 @@ mapfile -t extratools < <(
sudo -v || exit 1
# gum spin --title "Installing GNU Stow" -- \
execute_with_spinner "Installing GNU Stow" yay -S --needed --noconfirm stow
yay -S --needed --noconfirm stow
######################
## Applying configs ##
@@ -126,7 +92,7 @@ for choice in "${desktop[@]}"; do
"Niri")
sudo -v || exit 1
# gum spin --title "Installing niri alongside required packages" -- \
execute_with_spinner "Installing niri and required packages" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
niri \
ly \
nautilus \
@@ -150,7 +116,7 @@ for choice in "${desktop[@]}"; do
"KDE Plasma")
sudo -v || exit 1
# gum spin --title "Installing KDE Plasma" -- \
execute_with_spinner "Installing KDE Plasma" pacman -S --needed --noconfirm plasma kde-applications
pacman -S --needed --noconfirm plasma kde-applications
sudo systemctl enable sddm
;;
esac
@@ -161,7 +127,7 @@ for choice in "${tools[@]}"; do
"Terminal")
sudo -v || exit 1
# gum spin --title "Installing Terminal packages..." -- \
"Installing Terminal packages" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
fastfetch \
hyfetch \
neovim \
@@ -177,13 +143,13 @@ for choice in "${tools[@]}"; do
stow fastfetch hyfetch nvim zsh --adopt
# gum spin --title "Updating Tealdeer database" -- \
execute_with_spinner "Updating Tealdeer database" tldr --update
tldr --update
;;
"Terminal Emulator")
sudo -v || exit 1
# gum spin --title "Installing Terminal Emulator..." -- \
execute_with_spinner "Installing Terminal Emulator" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
ghostty
stow ghostty --adopt
;;
@@ -191,7 +157,7 @@ for choice in "${tools[@]}"; do
"Gaming")
sudo -v || exit 1
# gum spin --title "Installing Gaming Packages..." -- \
execute_with_spinner "Installing Gaming packages" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
mangohud \
gamemode \
steam \
@@ -209,7 +175,7 @@ for choice in "${tools[@]}"; do
"VR Gaming")
sudo -v || exit 1
# gum spin --title "Installing VR Gaming Packages..." -- \
execute_with_spinner "Installing VR Gaming packages" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
alvr-launcher-bin \
wlx-overlay-s-bin
;;
@@ -217,7 +183,7 @@ for choice in "${tools[@]}"; do
"Hamr Sticker Picker")
sudo -v || exit 1
# gum spin --title "Installing hamr..." -- \
execute_with_spinner "Installing hamr" yay -S --needed --noconfirm \
yay -S --needed --noconfirm \
hamr
stow hamr-sticker-picker --adopt
@@ -260,6 +226,6 @@ extpkgstr=$(
sudo -v || exit 1
# gum spin --title "Installing extra packages" -- \
execute_with_spinner "Installing extra packages" yay -S --needed --noconfirm "$extpkgstr"
yay -S --needed --noconfirm "$extpkgstr"
git reset --hard HEAD