Refactored install.sh a bit
This commit is contained in:
51
install.sh
51
install.sh
@@ -4,47 +4,31 @@ set -e
|
|||||||
|
|
||||||
DOTSDIR=$(pwd)
|
DOTSDIR=$(pwd)
|
||||||
|
|
||||||
#########################
|
|
||||||
## gum style variables ##
|
|
||||||
#########################
|
|
||||||
|
|
||||||
# GUM_SPIN_SPINNER="minidot"
|
|
||||||
# GUM_SPIN_SHOW_OUTPUT="true"
|
|
||||||
|
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
|
|
||||||
####################
|
#####################
|
||||||
## Updating Repos ##
|
## Updating System ##
|
||||||
####################
|
#####################
|
||||||
|
|
||||||
sudo pacman -Syy
|
sudo pacman -Syyu --noconfirm
|
||||||
|
|
||||||
####################
|
#############################
|
||||||
## Installing gum ##
|
## Installing dependencies ##
|
||||||
####################
|
#############################
|
||||||
|
|
||||||
if ! command -v gum &>/dev/null; then
|
sudo pacman -S --noconfirm --needed gum stow base-devel git
|
||||||
echo "Installing gum"
|
|
||||||
sudo pacman -S --needed --noconfirm gum
|
|
||||||
fi
|
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
## Installing yay & dependencies ##
|
## Installing yay & dependencies ##
|
||||||
###################################
|
###################################
|
||||||
|
|
||||||
if ! command -v yay &>/dev/null; then
|
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)
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
|
||||||
# gum spin --title "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
|
cd "$TEMP_DIR"/yay
|
||||||
|
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing yay" -- \
|
|
||||||
makepkg -si --noconfirm
|
makepkg -si --noconfirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -89,14 +73,6 @@ mapfile -t extratools < <(
|
|||||||
"MPV"
|
"MPV"
|
||||||
)
|
)
|
||||||
|
|
||||||
#####################
|
|
||||||
## Installing stow ##
|
|
||||||
#####################
|
|
||||||
|
|
||||||
sudo -v || exit 1
|
|
||||||
# gum spin --title "Installing GNU Stow" -- \
|
|
||||||
yay -S --needed --noconfirm stow
|
|
||||||
|
|
||||||
######################
|
######################
|
||||||
## Applying configs ##
|
## Applying configs ##
|
||||||
######################
|
######################
|
||||||
@@ -105,7 +81,6 @@ for choice in "${desktop[@]}"; do
|
|||||||
case "$choice" in
|
case "$choice" in
|
||||||
"Niri")
|
"Niri")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing niri alongside required packages" -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
niri \
|
niri \
|
||||||
nautilus \
|
nautilus \
|
||||||
@@ -149,7 +124,6 @@ for choice in "${desktop[@]}"; do
|
|||||||
|
|
||||||
"KDE Plasma")
|
"KDE Plasma")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing KDE Plasma" -- \
|
|
||||||
pacman -S --needed --noconfirm plasma kde-applications
|
pacman -S --needed --noconfirm plasma kde-applications
|
||||||
sudo systemctl enable sddm
|
sudo systemctl enable sddm
|
||||||
;;
|
;;
|
||||||
@@ -160,7 +134,6 @@ for choice in "${tools[@]}"; do
|
|||||||
case "$choice" in
|
case "$choice" in
|
||||||
"Terminal")
|
"Terminal")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Terminal packages..." -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
fastfetch \
|
fastfetch \
|
||||||
hyfetch \
|
hyfetch \
|
||||||
@@ -178,11 +151,8 @@ for choice in "${tools[@]}"; do
|
|||||||
imagemagick \
|
imagemagick \
|
||||||
tree
|
tree
|
||||||
|
|
||||||
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
|
||||||
# git clone https://github.com/ohmyzsh/ohmyzsh "$HOME"/.oh-my-zsh
|
|
||||||
stow fastfetch hyfetch nvim zsh --adopt
|
stow fastfetch hyfetch nvim zsh --adopt
|
||||||
|
|
||||||
# gum spin --title "Updating Tealdeer database" -- \
|
|
||||||
tldr --update
|
tldr --update
|
||||||
|
|
||||||
chsh -s /bin/zsh "$USER"
|
chsh -s /bin/zsh "$USER"
|
||||||
@@ -190,7 +160,6 @@ for choice in "${tools[@]}"; do
|
|||||||
|
|
||||||
"Terminal Emulator")
|
"Terminal Emulator")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Terminal Emulator..." -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
ghostty
|
ghostty
|
||||||
stow ghostty --adopt
|
stow ghostty --adopt
|
||||||
@@ -198,7 +167,6 @@ for choice in "${tools[@]}"; do
|
|||||||
|
|
||||||
"Gaming")
|
"Gaming")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Gaming Packages..." -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
mangohud \
|
mangohud \
|
||||||
gamemode \
|
gamemode \
|
||||||
@@ -218,14 +186,12 @@ for choice in "${tools[@]}"; do
|
|||||||
|
|
||||||
sudo -v || exit 1
|
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 cp /usr/lib/systemd/user/arrpc.service /etc/systemd/system/arrpc.service
|
||||||
sudo systemctl enable arrpc --now
|
sudo systemctl enable arrpc --now
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"VR Gaming")
|
"VR Gaming")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing VR Gaming Packages..." -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
alvr-launcher-bin \
|
alvr-launcher-bin \
|
||||||
wayvr
|
wayvr
|
||||||
@@ -233,7 +199,6 @@ for choice in "${tools[@]}"; do
|
|||||||
|
|
||||||
"Hamr Sticker Picker")
|
"Hamr Sticker Picker")
|
||||||
sudo -v || exit 1
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing hamr..." -- \
|
|
||||||
yay -S --needed --noconfirm \
|
yay -S --needed --noconfirm \
|
||||||
hamr
|
hamr
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user