#!/bin/bash

bold_magenta='\033[1;35m'
reset='\033[0m'

print() {
  echo -e "${bold_magenta}$1${reset}"
}

newline() {
  echo ""
}

newline
print "🔄 Updating system..."
sudo apt update && sudo apt full-upgrade -y

newline
print "📦 Installing core tools and XFCE environment..."
sudo apt install -y \
  git curl wget unzip zip zsh bash-completion gnupg lsb-release \
  build-essential software-properties-common apt-transport-https \
  ca-certificates xfce4 xfce4-goodies lightdm network-manager-gnome \
  neofetch htop vlc file-roller p7zip-full python3 python3-pip \
  kitty bat micro geany mplayer xfconf

newline
print "📦 Removing XFCE bloat (Parole, Xfburn, Exfalso, etc)..."
sudo apt purge -y parole xfburn exfalso ristretto xterm xsane \
  gnome-disk-utility orage mousepad thunderbird xfce4-screensaver
sudo apt autoremove -y

newline
print "🔧 Setting Super key to open Whisker Menu..."
xfconf-query -c xfce4-keyboard-shortcuts -n -p "/commands/custom/<Super>" -t string -s "xfce4-popup-whiskermenu"

newline
print "🎨 Installing vivid and applying 'one-dark' LS_COLORS..."
curl -LO https://github.com/sharkdp/vivid/releases/latest/download/vivid_0.9.0_amd64.deb
sudo apt install -y ./vivid_0.9.0_amd64.deb && rm ./vivid_0.9.0_amd64.deb
mkdir -p ~/.config
if ! grep -q 'LS_COLORS' ~/.bashrc; then
  echo 'export LS_COLORS="$(vivid generate one-dark)"' >> ~/.bashrc
fi

newline
print "✅ Setup complete! Reboot and enjoy your lightweight Debian XFCE!"
