diff options
Diffstat (limited to 'arch/install.sh')
| -rwxr-xr-x | arch/install.sh | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/arch/install.sh b/arch/install.sh new file mode 100755 index 0000000..c7b24bc --- /dev/null +++ b/arch/install.sh @@ -0,0 +1,191 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Usage: ./install.sh [-y] +# -y Auto-accept all optional component prompts + +AUTO_YES=false +while getopts "y" opt; do + case $opt in + y) AUTO_YES=true ;; + esac +done + +ask() { + # ask <prompt> — returns 0 (yes) or 1 (no). Always yes if -y was passed. + if $AUTO_YES; then return 0; fi + read -rp "$1 [y/N] " ans + [[ "${ans,,}" == "y" ]] +} + +# ── Core WM ─────────────────────────────────────────────────────────────────── +pacman_packages=( + hyprland + hyprlock + hypridle + xdg-desktop-portal-hyprland + xdg-desktop-portal-gtk + polkit-gnome +) + +# ── Audio ───────────────────────────────────────────────────────────────────── +pacman_packages+=( + pipewire + pipewire-alsa + pipewire-pulse + pipewire-jack + wireplumber + pamixer + playerctl + pavucontrol +) + +# ── Display / input ─────────────────────────────────────────────────────────── +pacman_packages+=( + grim + slurp + wl-clipboard + brightnessctl + ydotool + chafa +) + +# ── Notifications ───────────────────────────────────────────────────────────── +pacman_packages+=( + mako + libnotify +) + +# ── Launcher ────────────────────────────────────────────────────────────────── +pacman_packages+=( + bemenu + bemenu-wayland +) + +# ── Shell / CLI ─────────────────────────────────────────────────────────────── +pacman_packages+=( + fish + tmux + starship + zoxide + fzf + ripgrep + fd + bat + eza + btop + yazi + direnv + tealdeer + jq + cliphist +) + +# ── Fonts ───────────────────────────────────────────────────────────────────── +pacman_packages+=( + ttf-jetbrains-mono-nerd + noto-fonts + noto-fonts-emoji + noto-fonts-cjk +) + +# ── GTK / cursor ────────────────────────────────────────────────────────────── +pacman_packages+=( + papirus-icon-theme + gnome-themes-extra + gnome-keyring + gsettings-desktop-schemas +) + +# ── Bluetooth ───────────────────────────────────────────────────────────────── +pacman_packages+=( + bluez + bluez-utils +) + +# ── Network / misc ──────────────────────────────────────────────────────────── +pacman_packages+=( + networkmanager + openssh + wget + socat + curl + git +) + +# ── AUR packages ────────────────────────────────────────────────────────────── +aur_packages=( + ghostty # terminal + sesh # tmux session manager + eww # bar + adw-gtk3 # GTK theme + bibata-cursor-theme + wl-kbptr # keyboard pointer (Super+G / Super+M binds) + pinfo # info page viewer (used in fish aliases) + asusctl # keyboard backlight + wallust # dynamic color generation from wallpaper + hyprland-workspaces # eww workspace widget with active-state JSON + socat # Hyprland IPC streaming (eww deflisten scripts) +) + +# ── Install core ────────────────────────────────────────────────────────────── +echo "==> Installing pacman packages..." +sudo pacman -S --needed "${pacman_packages[@]}" + +echo "==> Installing AUR packages (via yay)..." +yay -S --needed "${aur_packages[@]}" + +# ── Optional: Spotify + Spicetify ──────────────────────────────────────────── +echo "" +if ask "==> Install Spotify + Spicetify (wallust auto-theming)?"; then + yay -S --needed spotify spicetify-cli + + echo "==> Fixing Spotify permissions for Spicetify..." + sudo chmod a+wr /opt/spotify + sudo chmod -R a+wr /opt/spotify/Apps + + echo "==> Applying Spicetify wallust theme..." + spicetify config current_theme wallust color_scheme Base + spicetify backup apply + + echo " Spotify + Spicetify installed and themed." +fi + +# ── Optional: Neovim dev environment ───────────────────────────────────────── +echo "" +if ask "==> Install Neovim dev environment (LSP, formatters, linters)?"; then + sudo pacman -S --needed \ + neovim \ + clang \ + lua-language-server \ + stylua \ + python-black \ + python-isort \ + cppcheck \ + ruff + + yay -S --needed \ + pyright \ + haskell-language-server + + echo "==> Stowing nvim config..." + cd ~/dotfiles/arch && stow nvim + + echo " Neovim dev environment installed." + echo " Open nvim and run :Lazy to install plugins." +fi + +# ── Groups ──────────────────────────────────────────────────────────────────── +# input → ydotool (/dev/uinput access) +# video → brightnessctl (screen + keyboard backlight without sudo) +echo "" +echo "==> Adding $(whoami) to groups: input, video..." +sudo usermod -aG input,video "$(whoami)" + +echo "" +echo "==> Done. Next steps:" +echo " cd ~/dotfiles/arch" +echo " rm ~/.config/hypr/hyprland.conf # remove autogenerated config" +echo " stow hyprland ghostty eww fish mako git scripts wallust spicetify nvim" +echo " chsh -s /usr/bin/fish" +echo " Log out and back in for group changes to take effect" |