232 lines
4.9 KiB
Bash
Executable File
232 lines
4.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
#########################
|
|
## gum style variables ##
|
|
#########################
|
|
|
|
GUM_SPIN_SPINNER="minidot"
|
|
GUM_SPIN_SHOW_OUTPUT="true"
|
|
|
|
sudo -v || exit 1
|
|
|
|
####################
|
|
## Installing gum ##
|
|
####################
|
|
|
|
if ! command -v gum &>/dev/null; then
|
|
echo "Installing gum"
|
|
sudo pacman -S --needed --noconfirm gum
|
|
fi
|
|
|
|
###################################
|
|
## Installing yay & dependencies ##
|
|
###################################
|
|
|
|
if ! command -v yay &>/dev/null; then
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing yay dependencies" -- \
|
|
sudo pacman -S base-devel git --needed --noconfirm
|
|
|
|
TEMP_DIR=$(mktemp -d)
|
|
|
|
# gum spin --title "Cloning yay-bin from AUR" -- \
|
|
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" -- \
|
|
makepkg -si --noconfirm
|
|
|
|
cd -
|
|
fi
|
|
|
|
#############################
|
|
## Configuration Selection ##
|
|
#############################
|
|
|
|
mapfile -t desktop < <(
|
|
gum choose --header="Choose desktop configuration:" \
|
|
"Niri" \
|
|
"KDE Plasma" \
|
|
"None"
|
|
)
|
|
|
|
mapfile -t tools < <(
|
|
gum choose --header="Choose tools to install:" --no-limit \
|
|
"Terminal" \
|
|
"Terminal Emulator" \
|
|
"Gaming" \
|
|
"VR Gaming" \
|
|
"Hamr Sticker Picker"
|
|
)
|
|
|
|
mapfile -t extratools < <(
|
|
gum choose --header="Choose extra tools to install:" --no-limit \
|
|
"Godot" \
|
|
"Btop" \
|
|
"Fuzzel" \
|
|
"Ncdu" \
|
|
"Linja Pona [Font]" \
|
|
"Vesktop" \
|
|
"Nextcloud" \
|
|
"Zen Browser" \
|
|
"Tailscale"
|
|
)
|
|
|
|
#####################
|
|
## Installing stow ##
|
|
#####################
|
|
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing GNU Stow" -- \
|
|
yay -S --needed --noconfirm stow
|
|
|
|
######################
|
|
## Applying configs ##
|
|
######################
|
|
|
|
for choice in "${desktop[@]}"; do
|
|
case "$choice" in
|
|
"Niri")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing niri alongside required packages" -- \
|
|
yay -S --needed --noconfirm \
|
|
niri \
|
|
ly \
|
|
nautilus \
|
|
gnome-keyring \
|
|
brightnessctl \
|
|
cava \
|
|
candy-icons-git \
|
|
power-profiles-daemon \
|
|
qt6ct-kde \
|
|
xdg-desktop-portal-gnome
|
|
|
|
stow niri qt6ct --adopt
|
|
|
|
curl -fsSL https://install.danklinux.com | sh
|
|
|
|
xdg-mime default org.gnome.nautilus.desktop inode/directory
|
|
|
|
sudo systemctl enable ly@tty1
|
|
;;
|
|
|
|
"KDE Plasma")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing KDE Plasma" -- \
|
|
pacman -S --needed --noconfirm plasma kde-applications
|
|
sudo systemctl enable sddm
|
|
;;
|
|
esac
|
|
done
|
|
|
|
for choice in "${tools[@]}"; do
|
|
case "$choice" in
|
|
"Terminal")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing Terminal packages..." -- \
|
|
yay -S --needed --noconfirm \
|
|
fastfetch \
|
|
hyfetch \
|
|
neovim \
|
|
zsh \
|
|
eza \
|
|
fzf \
|
|
tealdeer \
|
|
ttf-sourcecodepro-nerd \
|
|
vim \
|
|
wl-clipboard \
|
|
zoxide \
|
|
reflector
|
|
stow fastfetch hyfetch nvim zsh --adopt
|
|
|
|
# gum spin --title "Updating Tealdeer database" -- \
|
|
tldr --update
|
|
;;
|
|
|
|
"Terminal Emulator")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing Terminal Emulator..." -- \
|
|
yay -S --needed --noconfirm \
|
|
ghostty
|
|
stow ghostty --adopt
|
|
;;
|
|
|
|
"Gaming")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing Gaming Packages..." -- \
|
|
yay -S --needed --noconfirm \
|
|
mangohud \
|
|
gamemode \
|
|
steam \
|
|
prismlauncher \
|
|
heroic-games-launcher-bin \
|
|
arrpc
|
|
stow mangohud --adopt
|
|
|
|
sudo -v || exit 1
|
|
# gum spin --spinner minidot --title "Applying arrpy systemd fix..." -- \
|
|
sudo cp /usr/lib/systemd/user/arrpc.service /etc/systemd/system/arrpc.service &&
|
|
sudo systemctl enable arrpc --now
|
|
;;
|
|
|
|
"VR Gaming")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing VR Gaming Packages..." -- \
|
|
yay -S --needed --noconfirm \
|
|
alvr-launcher-bin \
|
|
wlx-overlay-s-bin
|
|
;;
|
|
|
|
"Hamr Sticker Picker")
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing hamr..." -- \
|
|
yay -S --needed --noconfirm \
|
|
hamr
|
|
|
|
stow hamr-sticker-picker --adopt
|
|
|
|
systemctl --user enable hamr.service
|
|
systemctl --user add-wants niri.service hamr.service
|
|
systemctl --user start hamr.service
|
|
;;
|
|
esac
|
|
done
|
|
|
|
extrapkgs=()
|
|
|
|
for choice in "${extratools[@]}"; do
|
|
case "$choice" in
|
|
"Godot")
|
|
extrapkgs+=("godots-bin")
|
|
stow godot --adopt
|
|
;;
|
|
|
|
"Fuzzel")
|
|
extrapkgs+=("fuzzel")
|
|
stow fuzzel --adopt
|
|
;;
|
|
|
|
"Btop") extrapkgs+=("btop") ;;
|
|
"Ncdu") extrapkgs+=("ncdu") ;;
|
|
"Linja Pona [Font]") extrapkgs+=("otf-linja-pona") ;;
|
|
"Vesktop") extrapkgs+=("vesktop") ;;
|
|
"Nextcloud") extrapkgs+=("nextcloud-client") ;;
|
|
"Zen Browser") extrapkgs+=("zen-browser-bin") ;;
|
|
"Tailscale") extrapkgs+=("tailscale") ;;
|
|
esac
|
|
done
|
|
|
|
extpkgstr=$(
|
|
IFS=" "
|
|
echo "${extrapkgs[*]}"
|
|
)
|
|
|
|
sudo -v || exit 1
|
|
# gum spin --title "Installing extra packages" -- \
|
|
yay -S --needed --noconfirm "$extpkgstr"
|
|
|
|
git reset --hard HEAD
|