mine-hyprdots/setup.sh

97 lines
2.9 KiB
Bash
Raw Normal View History

2025-04-21 17:53:45 +05:30
#!/bin/bash
set -euo pipefail
cat << EOF
_________ __ ____ ___
/ _____/ _____/ |_| | \______
\_____ \_/ __ \ __\ | /\____ \
/ \ ___/| | | | / | |_> >>>>
/_______ /\___ >__| |______/ | __/
\/ \/ |__|
2025-04-21 18:02:16 +05:30
EOF
CONFIGS="cava kitty dunst fastfetch pacseek hypr hypridle rofi starship tmux waybar yazi"
BACKUP_DIR="$HOME/.config_backup"
LOCAL_BIN="$HOME/.local/bin"
FONT_DIR="$HOME/.local/share/fonts"
DOTS_DIR="$HOME/hyprdots"
2025-04-21 17:53:45 +05:30
echo "==> Backing up existing config files..."
mkdir -p "$BACKUP_DIR"
for dir in $CONFIGS; do
if [ -d "$HOME/.config/$dir" ]; then
echo "=> Backing up $dir to $BACKUP_DIR"
cp -r "$HOME/.config/$dir" "$BACKUP_DIR/$dir"
rm -rf "$HOME/.config/$dir"
fi
done
2025-04-22 15:51:16 +05:30
echo "==> Copying new config files..."
cp -r $CONFIGS "$HOME/.config/"
2025-04-22 15:51:16 +05:30
echo "==> Making Waybar and Rofi scripts executable..."
chmod +x ~/.config/waybar/scripts/*
chmod +x ~/.config/rofi/* || true
echo "==> Copying binaries..."
mkdir -p "$LOCAL_BIN"
cp -r bin/* "$LOCAL_BIN"
chmod +x "$LOCAL_BIN"/*
echo "==> Copying .zshrc..."
cp zsh/.zshrc "$HOME/.zshrc"
2025-04-21 17:53:45 +05:30
echo "==> Making scripts executable..."
chmod +x "$DOTS_DIR"/* || true
2025-04-21 18:02:16 +05:30
# Font Awesome Installation
FA_DIR="$FONT_DIR/fontawesome"
mkdir -p "$FA_DIR"
2025-04-22 15:27:09 +05:30
echo "==> Installing Font Awesome (v5 & v6)..."
if [[ ! -f "$FA_DIR/fa-brands-400.ttf" ]]; then
2025-04-22 15:51:16 +05:30
wget -q https://use.fontawesome.com/releases/v6.7.2/fontawesome-free-6.7.2-desktop.zip
unzip -q fontawesome-free-6.7.2-desktop.zip
mv fontawesome-free-6.7.2-desktop/otfs/*.otf "$FA_DIR/"
rm -rf fontawesome-free-6.7.2-desktop*
2025-04-22 15:51:16 +05:30
wget -q https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip
unzip -q fontawesome-free-5.15.4-desktop.zip
mv fontawesome-free-5.15.4-desktop/otfs/*.otf "$FA_DIR/"
rm -rf fontawesome-free-5.15.4-desktop*
2025-04-22 15:51:16 +05:30
else
echo "✔️ Font Awesome already installed, skipping."
2025-04-22 15:51:16 +05:30
fi
# JetBrains Nerd Font Installation
JB_FONT_DIR="$FONT_DIR/JetBrainsMono"
mkdir -p "$JB_FONT_DIR"
echo "==> Installing JetBrains Nerd Fonts..."
if [[ ! -f "$JB_FONT_DIR/JetBrainsMono-Regular.ttf" ]]; then
2025-04-22 15:51:16 +05:30
wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.zip
unzip -q JetBrainsMono.zip -d JetBrainsMono
mv JetBrainsMono/*.ttf "$JB_FONT_DIR/"
2025-04-22 15:51:16 +05:30
rm -rf JetBrainsMono JetBrainsMono.zip
else
echo "✔️ JetBrains Nerd Font already installed, skipping."
2025-04-22 15:51:16 +05:30
fi
echo "==> Refreshing font cache..."
2025-05-03 12:50:32 +05:30
fc-cache -f -v
2025-04-22 15:51:16 +05:30
echo -e "\n✅ Setup completed successfully!"
echo "==> Installing AUR package manager"
sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git ~/yay && cd ~/yay && makepkg -si
echo "==> Installing some useful packages"
yay -S pacseek
sudo pacman -S dunst libnotify waybar wl-clipboard xdg-desktop-portal-hyprland xdg-desktop-portal brightnessctl pavucontrol tmux slurp grim hyprlock pamixer
echo "==> Wallpaper Dir"
mkdir -p ~/Pictures/Wallpaper