aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2025-12-10 13:42:50 +0530
committerkrolxon <krolyxon@tutanota.com>2025-12-10 13:42:50 +0530
commit80cda2bb654d0a3403437d9daeebd255764970df (patch)
treeceacb7f5c5fdad321ad8c18f3bbe2f737a3fd40e /install.sh
parent371950d9007f8a2bfed903e28e255976d92c76f1 (diff)
install.sh: split packages into seperate files
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh170
1 files changed, 32 insertions, 138 deletions
diff --git a/install.sh b/install.sh
index 687cf61..4f3b577 100755
--- a/install.sh
+++ b/install.sh
@@ -1,152 +1,39 @@
#!/bin/env bash
-pkg_utils=(
- "fd"
- "ffmpegthumbnailer"
- "foot"
- "fuzzel"
- "fzf"
- "gammastep"
- "ghostscript"
- "gobject-introspection"
- "gparted"
- "grub"
- "gvfs"
- "gvfs-mtp"
- "imagemagick"
- "imlib2"
- "jq"
- "kanshi"
- "lf"
- "libnotify"
- "libreoffice-fresh"
- "lua"
- "lvm2"
- "man-db"
- "meson"
- "mpc"
- "mpd"
- "mpd-mpris"
- "mpv"
- "ncdu"
- "ncmpcpp"
- "ntfs-3g"
- "nwg-look"
- "pacman-contrib"
- "pamixer"
- "pavucontrol"
- "pcmanfm"
- "pipewire"
- "pipewire-pulse"
- "progress"
- "python-gobject"
- "python-pip"
- "python-virtualenv"
- "qpdf"
- "reflector"
- "ripgrep"
- "rsync"
- "sshfs"
- "stow"
- "tesseract"
- "torbrowser-launcher"
- "transmission-cli"
- "noto-fonts"
- "noto-fonts-cjk"
- "noto-fonts-emoji"
- "ttf-jetbrains-mono-nerd"
- "tree"
- "unzip"
- "waybar"
- "wget"
- "woff2-font-awesome"
- "wtype"
- "xarchiver"
- "xdg-user-dirs"
- "yt-dlp"
- "zathura"
- "zathura-pdf-mupdf"
- "zip"
- "zola"
- "zsh"
- "zsh-autosuggestions"
-)
-
-pkg_dev_tools=(
- "git"
- "neovim"
- "platformio-core"
- "tmux"
- "nodejs"
- "lazygit"
-)
-
-pkg_optional=(
- "keepassxc"
- "obsidian"
- "syncthing"
- "newsboat"
- "obs-studio"
- "telegram-desktop"
-)
-
-pkg_nvidia=(
- "nvidia"
- "nvidia-utils"
-)
-
-pkg_desktop=(
- "hypridle"
- "hyprland"
- "hyprlock"
- "hyprpaper"
- "hyprpicker"
- "hyprpolkitagent"
- "hyprshot"
- "xdg-desktop-portal-hyprland"
- "swaync"
- "waybar"
-)
-
-pkg_aur=(
- "envycontrol"
- "htop-vim"
- "jmtpfs"
- "keepmenu"
- "keyd-git"
- "librewolf-bin"
- "python-pywal16"
- "tokyonight-gtk-theme-git"
- "zsh-fast-syntax-highlighting-git"
-)
-
-
-# Install necessary desktop packages
+currentDir="$(dirname "$(readlink -f "$0")")"
+cd "$currentDir"
+
+## Install necessary desktop packages
+source "$currentDir/packages/pkg_desktop.sh"
+source "$currentDir/packages/pkg_utils.sh"
sudo pacman -S --needed "${pkg_desktop[@]}" "${pkg_utils[@]}"
-# Install dev tools
-read -rp "Do you wish to development tools? [y/n]" install_dev_tools
+## Install dev tools
+read -rp "Do you wish to install development tools? [y/N]" install_dev_tools
+source "$currentDir/packages/pkg_dev_tools.sh"
if [[ $install_dev_tools == y ]]; then
sudo pacman -S --needed "${pkg_dev_tools[@]}"
fi
-# Install optional packages
-read -rp "Do you wish to install optional packages? [y/n]" install_optional_pkg
+## Install optional packages
+read -rp "Do you wish to install optional packages? [y/N]" install_optional_pkg
if [[ $install_optional_pkg == y ]]; then
+ source "$currentDir/packages/pkg_optional.sh"
sudo pacman -S --needed "${pkg_optional[@]}"
fi
-# Install nvidia drivers
-read -rp "Do you wish to install Nvidia drivers? [y/n]" install_nvidia_drivers
+## Install nvidia drivers
+read -rp "Do you wish to install Nvidia drivers? [y/N]" install_nvidia_drivers
if [[ $install_nvidia_drivers == y ]]; then
+ source "$currentDir/packages/pkg_nvidia.sh"
sudo pacman -S --needed "${pkg_nvidia[@]}"
fi
-# Install aur packages
-read -rp "Do you wish to install aur packages? [y/n]" install_aur_pkg
-# Install paru if it isn't already installed
+## Install aur packages
+read -rp "Do you wish to install aur packages? [y/N]" install_aur_pkg
if [[ $install_aur_pkg == y ]]; then
+ ## Install paru if it isn't already installed
if ! command -v paru >/dev/null 2>&1; then
echo "Installing paru..."
git clone https://aur.archlinux.org/paru-bin.git
@@ -157,14 +44,15 @@ if [[ $install_aur_pkg == y ]]; then
else
echo "Skipping paru (already in PATH)"
fi
-# Install aur packages
-paru -S --needed "${pkg_aur[@]}"
+ ## Install aur packages
+ source "$currentDir/packages/pkg_aur.sh"
+ paru -S --needed "${pkg_aur[@]}"
fi
-# Setup dotfiles
+## Setup dotfiles
echo "⚠️ WARNING: This will DELETE any conflicting files and replace them with symlinks from this repo."
-echo " Make sure your dotfiles repo is the source of truth / already backed up."
+echo "Make sure you have already backed up all your existing config files (~/.config)"
read -rp "Continue with stow (y/N): " confirm
if [[ "$confirm" =~ ^[Yy]$ ]]; then
echo "Detecting conflicts..."
@@ -194,10 +82,11 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
echo "✅ Dotfiles stowed with overwrite."
fi
else
- echo "Aborted"
+ echo "Aborted stow"
fi
-# Setup neovim dotfiles
+
+## Setup neovim dotfiles
read -rp "Clone neovim dotfiles as well? (y/N): " confirm
if [[ "$confirm" =~ ^[Yy]$ ]]; then
echo "Taking backup of neovim config (if already exists)"
@@ -208,7 +97,7 @@ if [[ "$confirm" =~ ^[Yy]$ ]]; then
git clone --depth=1 git@github.com:krolyxon/nvim.git ~/.config/nvim
fi
-# Change default shell to zsh
+## Change default shell to zsh
if [[ "$SHELL" != "$(which zsh)" ]]; then
read -rp "Change default shell to ZSH? (y/N): " confirm
if [[ "$confirm" =~ ^[Yy]$ ]]; then
@@ -218,3 +107,8 @@ if [[ "$SHELL" != "$(which zsh)" ]]; then
else
echo "Skipping: zsh is already the default shell"
fi
+
+
+printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' =
+echo ""
+echo "Done! 😊"