updated debian files
This commit is contained in:
@@ -2,17 +2,27 @@
|
||||
set -euo pipefail
|
||||
|
||||
##########################
|
||||
# Color helpers
|
||||
# Color helpers (no tput)
|
||||
##########################
|
||||
tput_reset() { tput sgr0; }
|
||||
tput_black() { tput setaf 0; }
|
||||
tput_red() { tput setaf 1; }
|
||||
tput_green() { tput setaf 2; }
|
||||
tput_yellow() { tput setaf 3; }
|
||||
tput_cyan() { tput setaf 4; }
|
||||
tput_purple() { tput setaf 5; }
|
||||
tput_cyan() { tput setaf 6; }
|
||||
tput_gray() { tput setaf 7; }
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[0;33m'
|
||||
CYAN='\033[0;36m'
|
||||
GRAY='\033[0;37m'
|
||||
BOLD='\033[1m'
|
||||
RESET='\033[0m'
|
||||
|
||||
# Disable colors if output is not a terminal
|
||||
if [ ! -t 1 ]; then
|
||||
RED='' GREEN='' YELLOW='' CYAN='' GRAY='' BOLD='' RESET=''
|
||||
fi
|
||||
|
||||
color_red() { printf '%b' "$RED"; }
|
||||
color_green() { printf '%b' "$GREEN"; }
|
||||
color_yellow() { printf '%b' "$YELLOW"; }
|
||||
color_cyan() { printf '%b' "$CYAN"; }
|
||||
color_gray() { printf '%b' "$GRAY"; }
|
||||
color_reset() { printf '%b' "$RESET"; }
|
||||
|
||||
##########################
|
||||
# Use exported variables from main detection script
|
||||
@@ -26,33 +36,152 @@ INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}"
|
||||
# Pause
|
||||
read -n 1 -s -r -p "Press any key to continue"
|
||||
|
||||
# on all DE
|
||||
#################################################################
|
||||
# Create directories (skel + user)
|
||||
#################################################################
|
||||
echo
|
||||
tput setaf 2
|
||||
echo "########################################################################"
|
||||
echo "################### Creating directories"
|
||||
echo "########################################################################"
|
||||
tput sgr0
|
||||
echo
|
||||
##########################
|
||||
# Create directories (skel + user)
|
||||
##########################
|
||||
echo
|
||||
color_green
|
||||
echo "########################################################################"
|
||||
echo "################### Creating directories"
|
||||
echo "########################################################################"
|
||||
color_reset
|
||||
echo
|
||||
|
||||
sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf}
|
||||
mkdir -p \
|
||||
"$HOME"/{.bin,.fonts,.icons,.themes,DATA} \
|
||||
"$HOME/.local/share/"{icons,themes,applications} \
|
||||
"$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch}
|
||||
|
||||
##########################
|
||||
# Remove unwanted packages
|
||||
##########################
|
||||
packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole")
|
||||
|
||||
is_package_installed() {
|
||||
dpkg -s "$1" &> /dev/null
|
||||
}
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
if is_package_installed "$package"; then
|
||||
echo "Removing $package..."
|
||||
sudo apt-get purge -y "$package"
|
||||
else
|
||||
echo "$package is not installed, skipping."
|
||||
fi
|
||||
|
||||
if ! is_package_installed "$package"; then
|
||||
echo "$package successfully removed."
|
||||
else
|
||||
echo "$package is still installed. Check manually."
|
||||
fi
|
||||
|
||||
echo "----------------------------"
|
||||
done
|
||||
|
||||
sudo apt-get autoremove -y
|
||||
|
||||
##########################
|
||||
# Install needed packages
|
||||
##########################
|
||||
# Firmware / headers
|
||||
sudo apt-get install -y dkms linux-headers-$(uname -r)
|
||||
|
||||
# Archive managers
|
||||
sudo apt install -y zip gzip p7zip unace unrar unzip file-roller
|
||||
|
||||
# Fonts
|
||||
sudo apt install -y font-manager fonts-noto fonts-dejavu fonts-droid-fallback \
|
||||
fonts-hack fonts-inconsolata fonts-liberation fonts-roboto fonts-ubuntu fonts-terminus
|
||||
|
||||
# RobotoMono Nerd Font
|
||||
FONT_DIR="$HOME/.local/share/fonts"
|
||||
mkdir -p "$FONT_DIR"
|
||||
ZIP_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip"
|
||||
TMP_DIR="$(mktemp -d)"
|
||||
echo "Downloading RobotoMono Nerd Font..."
|
||||
curl -L "$ZIP_URL" -o "$TMP_DIR/RobotoMono.zip"
|
||||
echo "Extracting..."
|
||||
unzip -q "$TMP_DIR/RobotoMono.zip" -d "$FONT_DIR"
|
||||
rm -rf "$TMP_DIR"
|
||||
echo "Updating font cache..."
|
||||
fc-cache -fv
|
||||
echo "RobotoMono Nerd Font installed successfully in $FONT_DIR"
|
||||
|
||||
# Tools
|
||||
sudo apt install -y wget curl nano fastfetch lolcat bash-completion starship alacritty \
|
||||
hwinfo lshw libpam0g libpam-modules libpam-runtime libpam-modules-bin \
|
||||
avahi-daemon avahi-utils libnss-mdns man-db manpages tree xdg-user-dirs \
|
||||
mate-polkit rsync time bat chrony duf
|
||||
|
||||
# Theming
|
||||
sudo apt install -y bibata-cursor-theme feh arc-theme
|
||||
|
||||
# Surfn icon theme
|
||||
echo "Installing Surfn icon theme..."
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
git clone https://github.com/erikdubois/Surfn.git "$TEMP_DIR/surfn"
|
||||
cp -r "$TEMP_DIR/surfn/surfn-icons/" ~/.icons/
|
||||
rm -rf "$TEMP_DIR"
|
||||
echo "Surfn icon theme installed."
|
||||
|
||||
# Flat Remix Dark GTK theme
|
||||
echo "Installing Flat Remix Dark GTK theme..."
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
cd "$TEMP_DIR"
|
||||
wget -O flat-remix-gtk.tar.gz https://github.com/daniruiz/flat-remix-gtk/archive/refs/heads/master.tar.gz
|
||||
tar -xzf flat-remix-gtk.tar.gz
|
||||
mv flat-remix-gtk-master/themes/* ~/.themes/
|
||||
cd ~
|
||||
rm -rf "$TEMP_DIR"
|
||||
echo "Flat Remix Dark GTK theme installed."
|
||||
|
||||
# Internet
|
||||
sudo apt install -y chromium
|
||||
|
||||
# Enable services
|
||||
sudo systemctl enable avahi-daemon.service
|
||||
sudo systemctl enable chrony
|
||||
sudo systemctl enable fstrim.timer
|
||||
|
||||
##########################
|
||||
# Detect virtualization platform
|
||||
##########################
|
||||
echo "Detecting virtualization platform..."
|
||||
virt_type=$(systemd-detect-virt)
|
||||
|
||||
case "$virt_type" in
|
||||
kvm)
|
||||
echo "Detected KVM. Installing qemu-guest-agent..."
|
||||
sudo apt install -y qemu-guest-agent spice-vdagent
|
||||
sudo systemctl enable qemu-guest-agent.service
|
||||
;;
|
||||
oracle)
|
||||
echo "Detected VirtualBox. Installing virtualbox-guest-utils..."
|
||||
sudo apt install -y virtualbox-guest-utils
|
||||
sudo systemctl enable vboxservice.service
|
||||
;;
|
||||
none)
|
||||
echo "No virtualization detected. Skipping guest utilities."
|
||||
;;
|
||||
*)
|
||||
echo "Virtualization detected: $virt_type, but no install routine defined."
|
||||
;;
|
||||
esac
|
||||
|
||||
##########################
|
||||
# XFCE-specific setup
|
||||
##########################
|
||||
if [[ "$DE" == "xfce" ]]; then
|
||||
echo "Setting up XFCE directories..."
|
||||
sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf}
|
||||
mkdir -p \
|
||||
"$HOME"/{.bin,.fonts,.icons,.themes,DATA} \
|
||||
"$HOME/.local/share/"{icons,themes,applications} \
|
||||
"$HOME/.config/"{autostart,gtk-{3.0,4.0},variety,fish,neofetch}
|
||||
mkdir -p "$HOME/.config/"{xfce4,xfce4/xfconf}
|
||||
|
||||
# Packages to remove
|
||||
packages=("vim" "vim-runtime" "vim-common" "vim-tiny" "mousepad" "parole")
|
||||
|
||||
# Function to check if a package is installed
|
||||
is_package_installed() {
|
||||
dpkg -s "$1" &> /dev/null
|
||||
}
|
||||
# Cleanup unwanted packages
|
||||
echo "Removing unwanted packages from XFCE..."
|
||||
packages=("xfburn" "xfce4-screenshooter" "xfce4-notes")
|
||||
sudo apt-mark manual xfce4-goodies
|
||||
|
||||
# Iterate over each package
|
||||
for package in "${packages[@]}"; do
|
||||
if is_package_installed "$package"; then
|
||||
echo "Removing $package..."
|
||||
@@ -61,7 +190,6 @@ read -n 1 -s -r -p "Press any key to continue"
|
||||
echo "$package is not installed, skipping."
|
||||
fi
|
||||
|
||||
# Optional double-check
|
||||
if ! is_package_installed "$package"; then
|
||||
echo "$package successfully removed."
|
||||
else
|
||||
@@ -71,228 +199,8 @@ read -n 1 -s -r -p "Press any key to continue"
|
||||
echo "----------------------------"
|
||||
done
|
||||
|
||||
# Remove leftover dependencies
|
||||
sudo apt-get autoremove -y
|
||||
|
||||
# install needed packages
|
||||
#firmwares
|
||||
sudo apt-get install -y \
|
||||
dkms \
|
||||
linux-headers-$(uname -r)
|
||||
|
||||
#archive-managers
|
||||
sudo apt install -y zip gzip p7zip unace unrar unzip
|
||||
|
||||
#fonts
|
||||
sudo apt install -y \
|
||||
font-manager \
|
||||
fonts-noto \
|
||||
fonts-dejavu \
|
||||
fonts-droid-fallback \
|
||||
fonts-hack \
|
||||
fonts-inconsolata \
|
||||
fonts-liberation \
|
||||
fonts-roboto \
|
||||
fonts-ubuntu \
|
||||
fonts-terminus
|
||||
|
||||
# Install RobotoMono Nerd Font
|
||||
# Destination directory
|
||||
FONT_DIR="$HOME/.local/share/fonts"
|
||||
mkdir -p "$FONT_DIR"
|
||||
|
||||
# Download RobotoMono Nerd Font (latest release)
|
||||
ZIP_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/RobotoMono.zip"
|
||||
TMP_DIR="$(mktemp -d)"
|
||||
|
||||
echo "Downloading RobotoMono Nerd Font..."
|
||||
curl -L "$ZIP_URL" -o "$TMP_DIR/RobotoMono.zip"
|
||||
|
||||
echo "Extracting..."
|
||||
unzip -q "$TMP_DIR/RobotoMono.zip" -d "$FONT_DIR"
|
||||
|
||||
echo "Cleaning up..."
|
||||
rm -rf "$TMP_DIR"
|
||||
|
||||
echo "Updating font cache..."
|
||||
fc-cache -fv
|
||||
|
||||
echo "RobotoMono Nerd Font installed successfully in $FONT_DIR"
|
||||
|
||||
#tools
|
||||
sudo apt install -y \
|
||||
wget \
|
||||
curl \
|
||||
nano \
|
||||
fastfetch \
|
||||
lolcat \
|
||||
bash-completion \
|
||||
starship \
|
||||
alacritty \
|
||||
hwinfo \
|
||||
lshw \
|
||||
libpam0g \
|
||||
libpam-modules \
|
||||
libpam-runtime \
|
||||
libpam-modules-bin \
|
||||
avahi-daemon \
|
||||
avahi-utils \
|
||||
libnss-mdns
|
||||
|
||||
if [ ! -f /usr/bin/duf ]; then
|
||||
sudo apt install -y duf
|
||||
fi
|
||||
sudo apt install -y \
|
||||
man-db \
|
||||
manpages \
|
||||
tree \
|
||||
xdg-user-dirs \
|
||||
mate-polkit \
|
||||
rsync \
|
||||
time \
|
||||
bat \
|
||||
chrony
|
||||
|
||||
#theming
|
||||
sudo apt install -y \
|
||||
bibata-cursor-theme \
|
||||
feh \
|
||||
arc-theme
|
||||
|
||||
echo "Installing Surfn icon theme..."
|
||||
# Clone Surfn repo
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
git clone https://github.com/erikdubois/Surfn.git "$TEMP_DIR/surfn"
|
||||
cd "$TEMP_DIR/surfn"
|
||||
# Copy the icon theme to the user's local icons directory
|
||||
cp -r surfn-icons/* ~/.icons/
|
||||
cd ~
|
||||
rm -rf "$TEMP_DIR"
|
||||
echo "Surfn icon theme installed."
|
||||
|
||||
echo "Installing Flat Remix Dark GTK theme..."
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
cd "$TEMP_DIR"
|
||||
# Download latest master as tar.gz
|
||||
wget -O flat-remix-gtk.tar.gz https://github.com/daniruiz/flat-remix-gtk/archive/refs/heads/master.tar.gz
|
||||
# Extract
|
||||
tar -xzf flat-remix-gtk.tar.gz
|
||||
# Move the Dark GTK theme to ~/.themes
|
||||
# The actual theme folder is "Flat-Remix-Dark" inside the extracted directory
|
||||
mv flat-remix-gtk-master/themes/* ~/.themes/
|
||||
cd ~
|
||||
rm -rf "$TEMP_DIR"
|
||||
echo "Flat Remix Dark GTK theme installed."
|
||||
|
||||
#internet
|
||||
sudo apt install -y \
|
||||
chromium
|
||||
|
||||
#enable services
|
||||
sudo systemctl enable avahi-daemon.service
|
||||
sudo systemctl enable chrony
|
||||
|
||||
#Run service that will discard unused blocks on mounted filesystems. This is useful for solid-state drives (SSDs) and thinly-provisioned storage.
|
||||
echo
|
||||
echo "Enable fstrim timer"
|
||||
sudo systemctl enable fstrim.timer
|
||||
|
||||
echo
|
||||
tput setaf 3
|
||||
echo "########################################################################"
|
||||
echo "Detecting virtualization platform..."
|
||||
echo "########################################################################"
|
||||
tput sgr0
|
||||
echo
|
||||
|
||||
virt_type=$(systemd-detect-virt)
|
||||
|
||||
case "$virt_type" in
|
||||
kvm)
|
||||
echo "Detected KVM. Installing qemu-guest-agent..."
|
||||
sudo apt install -y qemu-guest-agent spice-vdagent
|
||||
sudo systemctl enable qemu-guest-agent.service
|
||||
;;
|
||||
oracle)
|
||||
echo "Detected VirtualBox. Installing virtualbox-guest-utils..."
|
||||
sudo apt install -y virtualbox-guest-utils
|
||||
sudo systemctl enable vboxservice.service
|
||||
;;
|
||||
none)
|
||||
echo "No virtualization detected. Skipping guest utilities."
|
||||
;;
|
||||
*)
|
||||
echo "Virtualization detected: $virt_type, but no install routine defined."
|
||||
;;
|
||||
esac
|
||||
|
||||
# if on XFCE
|
||||
case "$DE" in
|
||||
xfce)
|
||||
#################################################################
|
||||
# Create directories (skel + user)
|
||||
#################################################################
|
||||
echo
|
||||
tput setaf 2
|
||||
echo "########################################################################"
|
||||
echo "################### Creating directories"
|
||||
echo "########################################################################"
|
||||
tput sgr0
|
||||
echo
|
||||
|
||||
sudo mkdir -p /etc/skel/.config/xfce4/{panel,xfconf}
|
||||
mkdir -p \
|
||||
"$HOME/.config/"{xfce4,xfce4/xfconf}
|
||||
|
||||
# cleanup unwanted packages
|
||||
tput_yellow
|
||||
echo
|
||||
echo "Removing unwanted packages from $DE..."
|
||||
tput_reset
|
||||
|
||||
# Packages to remove
|
||||
packages=("xfburn" "xfce4-screenshooter" "xfce4-notes")
|
||||
sudo apt-mark manual xfce4-goodies
|
||||
|
||||
# Function to check if a package is installed
|
||||
is_package_installed() {
|
||||
dpkg -s "$1" &> /dev/null
|
||||
}
|
||||
|
||||
# Iterate over each package
|
||||
for package in "${packages[@]}"; do
|
||||
if is_package_installed "$package"; then
|
||||
echo "Removing $package..."
|
||||
sudo apt-get purge -y "$package"
|
||||
else
|
||||
echo "$package is not installed, skipping."
|
||||
fi
|
||||
|
||||
# Optional double-check
|
||||
if ! is_package_installed "$package"; then
|
||||
echo "$package successfully removed."
|
||||
else
|
||||
echo "$package is still installed. Check manually."
|
||||
fi
|
||||
|
||||
echo "----------------------------"
|
||||
done
|
||||
|
||||
# Remove leftover dependencies
|
||||
sudo apt-get autoremove -y
|
||||
|
||||
# install needed packages
|
||||
#tools
|
||||
sudo apt install -y thunar thunar-archive-plugin thunar-volman
|
||||
|
||||
#archive-managers
|
||||
sudo apt install -y file-roller
|
||||
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Install XFCE tools
|
||||
sudo apt install -y thunar thunar-archive-plugin thunar-volman
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user