Compare commits
6 Commits
dd915fa586
...
45f737da37
| Author | SHA1 | Date | |
|---|---|---|---|
| 45f737da37 | |||
| f5f48c0fdf | |||
| b2c3b2bd44 | |||
| cb6ef06d8b | |||
| 1cab699dac | |||
| 62d8713835 |
112
install.sh
112
install.sh
@@ -2,14 +2,41 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo -v || exit 1
|
###################
|
||||||
|
## Spinner stuff ##
|
||||||
|
###################
|
||||||
|
|
||||||
# keep sudo alive until script exits
|
execute_with_spinner() {
|
||||||
while true; do
|
local title="$1"
|
||||||
sudo -n true
|
shift
|
||||||
sleep 60
|
|
||||||
kill -0 "$$" || exit
|
spinner='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
|
||||||
done 2>/dev/null &
|
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 ##
|
## gum style variables ##
|
||||||
@@ -18,7 +45,7 @@ done 2>/dev/null &
|
|||||||
GUM_SPIN_SPINNER="minidot"
|
GUM_SPIN_SPINNER="minidot"
|
||||||
GUM_SPIN_SHOW_OUTPUT="true"
|
GUM_SPIN_SHOW_OUTPUT="true"
|
||||||
|
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
|
|
||||||
####################
|
####################
|
||||||
## Installing gum ##
|
## Installing gum ##
|
||||||
@@ -26,7 +53,7 @@ sudo -v
|
|||||||
|
|
||||||
if ! command -v gum &>/dev/null; then
|
if ! command -v gum &>/dev/null; then
|
||||||
echo "Installing gum"
|
echo "Installing gum"
|
||||||
sudo pacman -S --needed --noconfirm gum
|
execute_with_spinner "Installing gum" sudo pacman -S --needed --noconfirm gum
|
||||||
fi
|
fi
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
@@ -34,19 +61,19 @@ fi
|
|||||||
###################################
|
###################################
|
||||||
|
|
||||||
if ! command -v yay &>/dev/null; then
|
if ! command -v yay &>/dev/null; then
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing yay dependencies" -- \
|
# gum spin --title "Installing yay dependencies" -- \
|
||||||
sudo pacman -S base-devel git --needed --noconfirm
|
execute_with_spinner "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" -- \
|
# gum spin --title "Cloning yay-bin from AUR" -- \
|
||||||
git clone https://aur.archlinux.org/yay-bin.git $TEMP_DIR/yay
|
execute_with_spinner "Cloning yay-bin from AUR" git clone https://aur.archlinux.org/yay-bin.git $TEMP_DIR/yay
|
||||||
cd $TEMP_DIR/yay
|
cd $TEMP_DIR/yay
|
||||||
|
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing yay" -- \
|
# gum spin --title "Installing yay" -- \
|
||||||
makepkg -si --noconfirm
|
execute_with_spinner "Installing yay" makepkg -si --noconfirm
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
@@ -86,9 +113,9 @@ mapfile -t extratools < <(
|
|||||||
## Installing stow ##
|
## Installing stow ##
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing GNU Stow" -- \
|
# gum spin --title "Installing GNU Stow" -- \
|
||||||
yay -S --needed --noconfirm stow
|
execute_with_spinner "Installing GNU Stow" yay -S --needed --noconfirm stow
|
||||||
|
|
||||||
######################
|
######################
|
||||||
## Applying configs ##
|
## Applying configs ##
|
||||||
@@ -97,9 +124,9 @@ yay -S --needed --noconfirm stow
|
|||||||
for choice in "${desktop[@]}"; do
|
for choice in "${desktop[@]}"; do
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
"Niri")
|
"Niri")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing niri alongside required packages" -- \
|
# gum spin --title "Installing niri alongside required packages" -- \
|
||||||
yay -S --needed --noconfirm \
|
execute_with_spinner "Installing niri and required packages" yay -S --needed --noconfirm \
|
||||||
niri \
|
niri \
|
||||||
ly \
|
ly \
|
||||||
nautilus \
|
nautilus \
|
||||||
@@ -111,7 +138,7 @@ for choice in "${desktop[@]}"; do
|
|||||||
qt6ct-kde \
|
qt6ct-kde \
|
||||||
xdg-desktop-portal-gnome
|
xdg-desktop-portal-gnome
|
||||||
|
|
||||||
stow niri qt6ct --override
|
stow niri qt6ct --adopt
|
||||||
|
|
||||||
curl -fsSL https://install.danklinux.com | sh
|
curl -fsSL https://install.danklinux.com | sh
|
||||||
|
|
||||||
@@ -121,9 +148,9 @@ for choice in "${desktop[@]}"; do
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"KDE Plasma")
|
"KDE Plasma")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing KDE Plasma" -- \
|
# gum spin --title "Installing KDE Plasma" -- \
|
||||||
pacman -S --needed --noconfirm plasma kde-applications
|
execute_with_spinner "Installing KDE Plasma" pacman -S --needed --noconfirm plasma kde-applications
|
||||||
sudo systemctl enable sddm
|
sudo systemctl enable sddm
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -132,9 +159,9 @@ done
|
|||||||
for choice in "${tools[@]}"; do
|
for choice in "${tools[@]}"; do
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
"Terminal")
|
"Terminal")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Terminal packages..." -- \
|
# gum spin --title "Installing Terminal packages..." -- \
|
||||||
yay -S --needed --noconfirm \
|
"Installing Terminal packages" yay -S --needed --noconfirm \
|
||||||
fastfetch \
|
fastfetch \
|
||||||
hyfetch \
|
hyfetch \
|
||||||
neovim \
|
neovim \
|
||||||
@@ -147,52 +174,53 @@ for choice in "${tools[@]}"; do
|
|||||||
wl-clipboard \
|
wl-clipboard \
|
||||||
zoxide \
|
zoxide \
|
||||||
reflector
|
reflector
|
||||||
stow fastfetch hyfetch nvim zsh --override
|
stow fastfetch hyfetch nvim zsh --adopt
|
||||||
|
|
||||||
# gum spin --title "Updating Tealdeer database" -- \
|
# gum spin --title "Updating Tealdeer database" -- \
|
||||||
tldr --update
|
execute_with_spinner "Updating Tealdeer database" tldr --update
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Terminal Emulator")
|
"Terminal Emulator")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Terminal Emulator..." -- \
|
# gum spin --title "Installing Terminal Emulator..." -- \
|
||||||
yay -S --needed --noconfirm \
|
execute_with_spinner "Installing Terminal Emulator" yay -S --needed --noconfirm \
|
||||||
ghostty
|
ghostty
|
||||||
stow ghostty --override
|
stow ghostty --adopt
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Gaming")
|
"Gaming")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing Gaming Packages..." -- \
|
# gum spin --title "Installing Gaming Packages..." -- \
|
||||||
yay -S --needed --noconfirm \
|
execute_with_spinner "Installing Gaming packages" yay -S --needed --noconfirm \
|
||||||
mangohud \
|
mangohud \
|
||||||
gamemode \
|
gamemode \
|
||||||
steam \
|
steam \
|
||||||
prismlauncher \
|
prismlauncher \
|
||||||
heroic-games-launcher-bin \
|
heroic-games-launcher-bin \
|
||||||
arrpc
|
arrpc
|
||||||
stow mangohud --override
|
stow mangohud --adopt
|
||||||
|
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --spinner minidot --title "Applying arrpy systemd fix..." -- \
|
# 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
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing VR Gaming Packages..." -- \
|
# gum spin --title "Installing VR Gaming Packages..." -- \
|
||||||
yay -S --needed --noconfirm \
|
execute_with_spinner "Installing VR Gaming packages" yay -S --needed --noconfirm \
|
||||||
alvr-launcher-bin \
|
alvr-launcher-bin \
|
||||||
wlx-overlay-s-bin
|
wlx-overlay-s-bin
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Hamr Sticker Picker")
|
"Hamr Sticker Picker")
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing hamr..." -- \
|
# gum spin --title "Installing hamr..." -- \
|
||||||
yay -S --needed --noconfirm \
|
execute_with_spinner "Installing hamr" yay -S --needed --noconfirm \
|
||||||
hamr
|
hamr
|
||||||
|
|
||||||
stow hamr-sticker-picker --override
|
stow hamr-sticker-picker --adopt
|
||||||
|
|
||||||
systemctl --user enable hamr.service
|
systemctl --user enable hamr.service
|
||||||
systemctl --user add-wants niri.service hamr.service
|
systemctl --user add-wants niri.service hamr.service
|
||||||
@@ -207,12 +235,12 @@ for choice in "${extratools[@]}"; do
|
|||||||
case "$choice" in
|
case "$choice" in
|
||||||
"Godot")
|
"Godot")
|
||||||
extrapkgs+=("godots-bin")
|
extrapkgs+=("godots-bin")
|
||||||
stow godot --override
|
stow godot --adopt
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Fuzzel")
|
"Fuzzel")
|
||||||
extrapkgs+=("fuzzel")
|
extrapkgs+=("fuzzel")
|
||||||
stow fuzzel --override
|
stow fuzzel --adopt
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Btop") extrapkgs+=("btop") ;;
|
"Btop") extrapkgs+=("btop") ;;
|
||||||
@@ -230,6 +258,8 @@ extpkgstr=$(
|
|||||||
echo "${extrapkgs[*]}"
|
echo "${extrapkgs[*]}"
|
||||||
)
|
)
|
||||||
|
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
# gum spin --title "Installing extra packages" -- \
|
# gum spin --title "Installing extra packages" -- \
|
||||||
yay -S --needed --noconfirm "$extpkgstr"
|
execute_with_spinner "Installing extra packages" yay -S --needed --noconfirm "$extpkgstr"
|
||||||
|
|
||||||
|
git reset --hard HEAD
|
||||||
|
|||||||
2
setup.sh
2
setup.sh
@@ -17,7 +17,7 @@ if ! command -v yay &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing packages"
|
echo "Installing packages"
|
||||||
sudo -v
|
sudo -v || exit 1
|
||||||
yay -S --noconfirm --needed - <$DOTFILES_DIR/packages.txt
|
yay -S --noconfirm --needed - <$DOTFILES_DIR/packages.txt
|
||||||
|
|
||||||
echo "Changing default shell"
|
echo "Changing default shell"
|
||||||
|
|||||||
Reference in New Issue
Block a user