From c40ccfaa702d0b423a3c3b89cfa765d582c82ff5 Mon Sep 17 00:00:00 2001 From: Adrien Bouvais Date: Tue, 7 Oct 2025 18:46:23 +0000 Subject: [PATCH] Update install.sh --- install.sh | 95 ++++++++++++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 50 deletions(-) diff --git a/install.sh b/install.sh index c77b48a..160164c 100755 --- a/install.sh +++ b/install.sh @@ -1,66 +1,61 @@ #!/bin/bash -# Install pacman packages -for package in \ - scrcpy \ +set -e + +echo "--- Installing essential pacman packages ---" +sudo pacman -S --noconfirm --needed \ base-devel \ + git \ + scrcpy \ lazygit \ - starship \ - ; do - sudo pacman -S --noconfirm $package - clear -done + starship -git clone https://aur.archlinux.org/yay.git -cd yay -makepkg -si -cd ~ +if ! command -v yay &> /dev/null; then + echo "--- yay not found, installing... ---" + git clone https://aur.archlinux.org/yay.git /tmp/yay + (cd /tmp/yay && makepkg -si --noconfirm) + rm -rf /tmp/yay +else + echo "--- yay is already installed. ---" +fi -# Install yay packages -for package in \ - python-pywal16 \ - python-pywalfox \ - swww waybar \ - myfetch \ - neovim \ - python-pywalfox \ - hypridle \ - hyprshot \ - hyprlock \ - pyprland \ +echo "--- Installing AUR and official repository packages with yay ---" +yay -S --noconfirm --needed \ + niri \ + swayidle \ + swaylock-effects \ + grim \ + slurp \ swaync \ wlogout \ - nerd-fonts \ + ttf-firacode-nerd \ + myfetch \ + neovim \ htop \ nvtop \ yazi \ discord \ - firefox \ - ; do - yay -S --noconfirm $package - clear -done + firefox -# Install Configs -sudo cp -rf ~/Dotfiles/.config/* ~/.config/ -sudo cp ~/Dotfiles/.bashrc ~/.bashrc +echo "--- Copying configuration files from ~/Dotfiles ---" +if [ -d "$HOME/Dotfiles" ]; then + cp -r "$HOME/Dotfiles/.config/"* "$HOME/.config/" + + cp "$HOME/Dotfiles/.bashrc" "$HOME/.bashrc" + + mkdir -p "$HOME/wallpapers" + cp -r "$HOME/Dotfiles/wallpapers/"* "$HOME/wallpapers/" +else + echo "WARNING: ~/Dotfiles directory not found. Skipping config installation." +fi -git config --global user.email "adrien.bouvais.pro@gmail.com" +echo "--- Configuring Git and SSH ---" git config --global user.name "adrien" -ssh-keygen -t rsa -b 4096 -C "adrien.bouvais.pro@gmail.com" -f ~/.ssh/id_rsa -N "" +git config --global user.email "git@bouvais.lu" -# Wallpaper -mkdir ~/wallpapers -sudo cp -rf ~/Dotfiles/wallpapers/* ~/wallpapers/ -wal -i ~/wallpapers/pywallpaper.jpg -pywalfox install - -swww img ~/.config/pywallpaper.jpg --transition-type any --transition-fps 60 --transition-duration .5 -wal -i ~/.config/pywallpaper.jpg -n --cols16 -swaync-client --reload-css -cat ~/.cache/wal/colors-kitty.conf > ~/.config/kitty/current-theme.conf -pywalfox update -hyprctl reload - -echo "Dont forget to add Pywalfox extension to Firefox https://addons.mozilla.org/en-US/firefox/addon/pywalfox/" -echo "Then run 'pywalfox update'" +if [ ! -f "$HOME/.ssh/id_rsa" ]; then + echo "--- Generating a new SSH key ---" + ssh-keygen -t rsa -b 4096 -C "git@bouvais.com" -f "$HOME/.ssh/id_rsa" -N "" +else + echo "--- SSH key already exists, skipping generation. ---" +fi \ No newline at end of file