From 4aff647524863ce837fe290d30837988e1e1cdc5 Mon Sep 17 00:00:00 2001 From: "yuri.kuit" Date: Wed, 13 May 2026 22:38:55 +0200 Subject: [PATCH] cleanup --- v2/arch copy.sh | 208 ----------------------- v2/{arch-niri copy.sh => arch-chadwm.sh} | 0 v2/arch-full copy.sh | 162 ------------------ v2/arch-hyprland copy.sh | 118 ------------- v2/arch-minimal copy.sh | 181 -------------------- v2/arch-workstation copy.sh | 105 ------------ 6 files changed, 774 deletions(-) delete mode 100755 v2/arch copy.sh rename v2/{arch-niri copy.sh => arch-chadwm.sh} (100%) delete mode 100755 v2/arch-full copy.sh delete mode 100755 v2/arch-hyprland copy.sh delete mode 100755 v2/arch-minimal copy.sh delete mode 100755 v2/arch-workstation copy.sh diff --git a/v2/arch copy.sh b/v2/arch copy.sh deleted file mode 100755 index 0bb6527..0000000 --- a/v2/arch copy.sh +++ /dev/null @@ -1,208 +0,0 @@ -#!/bin/bash -set -euo pipefail - -########################## -# Color helpers (printf-safe, no tput) -########################## -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 - -say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; } -say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; } -say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; } -say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; } -say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; } -say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } - -########################## -# Use exported variables from main detection script -########################## -OS="${DETECTED_OS}" -DDE="${DETECTED_DE}" -DE="${SELECTED_DE:-none}" -TWM="${SELECTED_TWM:-none}" -INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -echo -say_cyan "Starting Arch setup..." -echo -say_gray "DE: $DE, TWM: $TWM, Install Level: $INSTALL_LEVEL" - -########################## -# Helper functions -########################## -install_packages() { sudo pacman -S --noconfirm --needed "$@"; } -is_package_installed() { pacman -Qi "$@" &>/dev/null; } -remove_packages() { - local packages_to_remove=() - - # 1. Identify which packages are actually installed - for pkg in "$@"; do - if is_package_installed "$pkg"; then - packages_to_remove+=("$pkg") - else - say_gray "Package '$pkg' not found. Skipping removal." - fi - done - - # 2. Only run pacman if there are packages to remove - if [ ${#packages_to_remove[@]} -gt 0 ]; then - say_cyan "Removing packages: ${packages_to_remove[*]}" - sudo pacman -Rs --noconfirm "${packages_to_remove[@]}" || true - else - say_gray "No packages to remove from the list." - fi -} - -########################## -# 1. Add repositories if missing and update system -########################## -# Helper function to check and add a repository -add_repo_if_missing() { - local repo_name="$1" - local repo_config="$2" - - if grep -q "\[$repo_name\]" /etc/pacman.conf; then - say_yellow "Repository [$repo_name] already exists. Skipping." - else - say_yellow "Adding [$repo_name] to /etc/pacman.conf..." - # Add a newline and the repo config to the end of the file - echo -e "\n$repo_config" | sudo tee -a /etc/pacman.conf > /dev/null - fi -} - -say_yellow "Checking pacman.conf and sources..." - -# 1. Create the backup -sudo cp /etc/pacman.conf "/etc/pacman.conf.bak.$(date +%s)" - -# 2. Add yuku_repo -YUKU_BLOCK="[yuku_repo] -SigLevel = Never -Server = https://yurikuit.github.io/\$repo/\$arch" - -add_repo_if_missing "yuku_repo" "$YUKU_BLOCK" - -# 3. Add nemesis_repo -NEMESIS_BLOCK="[nemesis_repo] -SigLevel = Never -Server = https://erikdubois.github.io/\$repo/\$arch" - -add_repo_if_missing "nemesis_repo" "$NEMESIS_BLOCK" - -# 4. Refresh databases -sudo pacman -Sy - -# Update the system -say_gray "Updating the system - sudo pacman -Syyu" -echo -sudo pacman -Syyu --noconfirm - -########################## -# 2. Fix missing console font -########################## -say_yellow "Fix missing console font" - -if grep -q FONT= /etc/vconsole.conf; then - say_green "Font is already set in /etc/vconsole.conf" -else - say_green "Setting console font in /etc/vconsole.conf" - echo 'FONT=gr737c-8x14' | sudo tee -a /etc/vconsole.conf -fi - -########################## -# 3. Detected OS / DE / TWM info -########################## -say_yellow "Detected OS / Desktop Environment / Tiling Window Manager" -echo -say_gray "Installing OS-specific packages..." -say_gray "Selected DE: $DE" -say_gray "Selected TWM: $TWM" -say_gray "Installation Level: $INSTALL_LEVEL" - -########################## -# 4. Desktop Environment installation -########################## -case "$DE" in - xfce|plasma|gnome) - say_yellow "Preparing to install $DE..." - SCRIPT_NAME="$SCRIPT_DIR/${OS}-${DE}.sh" - if [[ -f "$SCRIPT_NAME" ]]; then - say_cyan "Running $SCRIPT_NAME..." - bash "$SCRIPT_NAME" - else - say_red "Error: $SCRIPT_NAME not found!" - exit 1 - fi - ;; - none) - say_gray "No Desktop Environment selected, skipping DE installation." - ;; -esac - -########################## -# 5. Tiling Window Manager installation -########################## -case "$TWM" in - chadwm|hyprland) - say_yellow "Installing $TWM..." - SCRIPT_NAME="$SCRIPT_DIR/${OS}-${TWM}.sh" - if [[ -f "$SCRIPT_NAME" ]]; then - say_cyan "Running $SCRIPT_NAME..." - bash "$SCRIPT_NAME" - else - say_red "Error: $SCRIPT_NAME not found!" - exit 1 - fi - ;; - none) - say_gray "No tiling window manager selected." - ;; -esac - -########################## -# 6. Installation level handling -########################## -case "$INSTALL_LEVEL" in - minimal|full|workstation|server) - say_cyan "Installation level: $INSTALL_LEVEL" - SCRIPT_NAME="$SCRIPT_DIR/${OS}-${INSTALL_LEVEL}.sh" - if [[ -f "$SCRIPT_NAME" ]]; then - say_cyan "Running $SCRIPT_NAME..." - bash "$SCRIPT_NAME" - else - say_red "Error: $SCRIPT_NAME not found!" - exit 1 - fi - ;; -esac - -say_green "Arch setup complete." -say_red "The installation has finished. A reboot is recommended." -# Reboots are dangerous to automate; we use a shorter timeout and default to No -if read -t 10 -rp "Reboot now? [y/N]: " reboot_choice; then - case "${reboot_choice,,}" in - y|yes) - say_red "Rebooting now." - sudo reboot - ;; - *) - say_yellow "Skipping reboot." - exit 0 - ;; - esac -else - say_yellow "\nNo input detected. Skipping reboot for safety." - exit 0 -fi \ No newline at end of file diff --git a/v2/arch-niri copy.sh b/v2/arch-chadwm.sh similarity index 100% rename from v2/arch-niri copy.sh rename to v2/arch-chadwm.sh diff --git a/v2/arch-full copy.sh b/v2/arch-full copy.sh deleted file mode 100755 index 7d929d1..0000000 --- a/v2/arch-full copy.sh +++ /dev/null @@ -1,162 +0,0 @@ -#!/bin/bash -set -euo pipefail - -########################## -# Color helpers (printf-safe, no tput) -########################## -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 - -say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; } -say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; } -say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; } -say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; } -say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; } -say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } - -########################## -# Use exported variables from main detection script -########################## -OS="${DETECTED_OS}" -DDE="${DETECTED_DE:-}" -DE="${SELECTED_DE:-none}" -TWM="${SELECTED_TWM:-none}" -INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -########################## -# Helper functions -########################## -install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$@"; } -is_package_installed() { pacman -Qi "$@" &>/dev/null; } -remove_packages() { - local packages_to_remove=() - - # 1. Identify which packages are actually installed - for pkg in "$@"; do - if is_package_installed "$pkg"; then - packages_to_remove+=("$pkg") - else - say_gray "Package '$pkg' not found. Skipping removal." - fi - done - - # 2. Only run pacman if there are packages to remove - if [ ${#packages_to_remove[@]} -gt 0 ]; then - say_cyan "Removing packages: ${packages_to_remove[*]}" - sudo pacman -Rs --noconfirm "${packages_to_remove[@]}" || true - else - say_gray "No packages to remove from the list." - fi -} - -say_yellow "Starting full setup..." - -# Run minimal first -bash "$SCRIPT_DIR/arch-minimal.sh" - -# Add extra packages -install_packages arandr catfish galculator networkmanager network-manager-applet networkmanager-openvpn numlockx pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol playerctl gparted xfce4-indicator-plugin xfce4-pulseaudio-plugin xfce4-clipman-plugin - -# Ensure NetworkManager manages all interfaces -say_yellow "Ensuring NetworkManager service is enabled and running..." -sudo systemctl enable --now NetworkManager - -say_yellow "Setting NetworkManager to globally manage all devices..." -sudo tee /etc/NetworkManager/conf.d/10-globally-managed-devices.conf > /dev/null <<'EOF' -[ifupdown] -managed=true - -[keyfile] -unmanaged-devices= -EOF - -say_yellow "Restarting NetworkManager service..." -sudo systemctl restart NetworkManager - -# Enable pipewire -systemctl --user enable pipewire pipewire-pulse wireplumber - -######################################## -# XFCE-specific configuration -######################################## -if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then - echo - say_cyan "Applying XFCE defaults: fonts, browser, and terminal..." - - # Ensure xfconf-query exists (for XFCE settings) - if ! command -v xfconf-query >/dev/null 2>&1; then - say_yellow "xfconf-query not found — installing xfce4-settings..." - install_packages xfce4-settings - fi - - # set fonts - # Wait for xfconf to be available (only needed if running inside the same session) - if command -v xfconf-query >/dev/null 2>&1; then - # Interface font (UI) - xfconf-query -c xsettings -p /Gtk/FontName -s "RobotoMono Nerd Font Regular 10" - # Monospace font (terminals, editors) - xfconf-query -c xsettings -p /Gtk/MonospaceFontName -s "RobotoMono Nerd Font Mono Regular 10" - - say_green "XFCE fonts updated successfully!" - else - say_yellow "xfconf-query not found — skipping XFCE font config (will apply at first login)." - fi - - # Set browser default - if command -v chromium >/dev/null 2>&1; then - mkdir -p "$HOME/.config/xfce4/" - HELPERS_FILE="$HOME/.config/xfce4/helpers.rc" - - # Ensure the helpers file exists - touch "$HELPERS_FILE" - - # Update or insert browser entry - if grep -q '^WebBrowser=' "$HELPERS_FILE"; then - sed -i 's|^WebBrowser=.*|WebBrowser=chromium|' "$HELPERS_FILE" - else - echo "WebBrowser=chromium" >> "$HELPERS_FILE" - fi - say_green "XFCE defeault browser set to chromium!" - fi - - # Set default terminal - if command -v alacritty >/dev/null 2>&1; then - mkdir -p "$HOME/.config/xfce4/" - HELPERS_FILE="$HOME/.config/xfce4/helpers.rc" - - touch "$HELPERS_FILE" - - # TerminalEmulator entry - if grep -q '^TerminalEmulator=' "$HELPERS_FILE"; then - sed -i 's|^TerminalEmulator=.*|TerminalEmulator=alacritty|' "$HELPERS_FILE" - else - echo "TerminalEmulator=alacritty" >> "$HELPERS_FILE" - fi - - # TerminalEmulatorCommand entry - if grep -q '^TerminalEmulatorCommand=' "$HELPERS_FILE"; then - sed -i 's|^TerminalEmulatorCommand=.*|TerminalEmulatorCommand=alacritty|' "$HELPERS_FILE" - else - echo "TerminalEmulatorCommand=alacritty" >> "$HELPERS_FILE" - fi - say_green "XFCE defeault terminal set to alacritty!" - fi -fi - -# replace bashrc -say_yellow "making backup of bashrc" -sudo cp -v /etc/skel/.bashrc /etc/skel/.bashrc.starburst - -# End of script -say_green "Full setup completed." diff --git a/v2/arch-hyprland copy.sh b/v2/arch-hyprland copy.sh deleted file mode 100755 index 5e67dab..0000000 --- a/v2/arch-hyprland copy.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash -set -euo pipefail - -########################## -# Color helpers (printf-safe, no tput) -########################## -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 - -say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; } -say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; } -say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; } -say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; } -say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; } -say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } - -########################## -# Use exported variables from main detection script -########################## -OS="${DETECTED_OS}" -DDE="${DETECTED_DE}" -DE="${SELECTED_DE:-none}" -TWM="${SELECTED_TWM:-none}" -INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -########################## -# Helper functions -########################## -install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$@"; } -is_package_installed() { pacman -Qi "$@" &>/dev/null; } -remove_packages() { - local packages_to_remove=() - - # 1. Identify which packages are actually installed - for pkg in "$@"; do - if is_package_installed "$pkg"; then - packages_to_remove+=("$pkg") - else - say_gray "Package '$pkg' not found. Skipping removal." - fi - done - - # 2. Only run pacman if there are packages to remove - if [ ${#packages_to_remove[@]} -gt 0 ]; then - say_cyan "Removing packages: ${packages_to_remove[*]}" - sudo pacman -Rs --noconfirm "${packages_to_remove[@]}" || true - else - say_gray "No packages to remove from the list." - fi -} - -detect_de() { - if command -v xfce4-session >/dev/null 2>&1; then - echo "xfce" - else - echo "" - fi -} - -detect_display_manager() { - if [ -f /etc/X11/default-display-manager ]; then - basename "$(cat /etc/X11/default-display-manager)" - else - echo "" - fi -} - -enable_graphical_target() { - sudo systemctl enable sddm - sudo systemctl set-default graphical.target -} - -######################### -# Start installation -########################## -say_yellow "Starting hyprland setup..." - -CURRENT_DE="$(detect_de)" -CURRENT_DM="$(detect_display_manager)" - -if [[ -z "$CURRENT_DE" ]]; then - say_cyan -e "No Desktop Environment detected. Installing Hyprland (light setup with SDDM)..." - - install_packages sddm hyprland dunst grim kitty polkit-kde-agent qt5-wayland qt6-wayland slurp uwsm wofi xdg-desktop-portal-hyprland - enable_graphical_target - - say_green -e "Hyprland with SDDM installed successfully. You can reboot now to start Hyprland." -else - say_cyan -e "Detected existing Desktop Environment: $CURRENT_DE" - - if [[ "$CURRENT_DM" == "lightdm" ]]; then - say_yellow -e "LightDM is currently active. Replacing with SDDM..." - - sudo systemctl disable lightdm - sudo apt purge -y lightdm lightdm-gtk-greeter - - install_packages sddm - enable_graphical_target - - say_green -e "LightDM removed and replaced with SDDM." - else - say_cyan -e "Current display manager: ${CURRENT_DM:-none}. Leaving unchanged." - fi -fi - -# End of script -say_green -e "Hyprland / SDDM setup completed." \ No newline at end of file diff --git a/v2/arch-minimal copy.sh b/v2/arch-minimal copy.sh deleted file mode 100755 index 9b8ea43..0000000 --- a/v2/arch-minimal copy.sh +++ /dev/null @@ -1,181 +0,0 @@ -#!/bin/bash -set -euo pipefail - -########################## -# Color helpers (printf-safe, no tput) -########################## -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 - -say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; } -say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; } -say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; } -say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; } -say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; } -say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } - -########################## -# Use exported variables from main detection script -########################## -OS="${DETECTED_OS}" -DDE="${DETECTED_DE}" -DE="${SELECTED_DE:-none}" -TWM="${SELECTED_TWM:-none}" -INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -########################## -# Helper functions -########################## -install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$@"; } -is_package_installed() { pacman -Qi "$@" &>/dev/null; } -remove_packages() { - local packages_to_remove=() - - # 1. Identify which packages are actually installed - for pkg in "$@"; do - if is_package_installed "$pkg"; then - packages_to_remove+=("$pkg") - else - say_gray "Package '$pkg' not found. Skipping removal." - fi - done - - # 2. Only run pacman if there are packages to remove - if [ ${#packages_to_remove[@]} -gt 0 ]; then - say_cyan "Removing packages: ${packages_to_remove[*]}" - sudo pacman -Rs --noconfirm "${packages_to_remove[@]}" || true - else - say_gray "No packages to remove from the list." - fi -} - -say_yellow "Starting minimal setup..." - -# Create user directories -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,fastfetch} - -# Removing unwanted drivers -say_yellow "GET RID OF BROADCOM AND REALTEK DRIVERS" -remove_packages broadcom-wl-dkms r8168-dkms rtl8821cu-morrownr-dkms-git - -# Removing unwanted kernels -say_yellow "KEEP LINUX KERNEL GET RID OF THE OTHER KERNELS" -# Ensure at least one kernel remains -if pacman -Qi linux &> /dev/null && pacman -Qi linux-headers &> /dev/null; then - - # Define all the kernels and their headers you want to remove - KERNELS_TO_REMOVE=( - linux-lts-headers linux-lts - linux-zen-headers linux-zen - linux-hardened-headers linux-hardened - linux-rt-headers linux-rt - linux-rt-lts-headers linux-rt-lts - # linux-cachyos-headers linux-cachyos - linux-xanmod-headers linux-xanmod - ) - remove_package() { - local package=$1 - # Check if the package is installed - if pacman -Q $package &> /dev/null; then - say_yellow "$package is installed. Removing..." - sudo pacman -Rns --noconfirm $package - else - say_yellow "$package is not installed." - fi - } - - # Loop over the array and remove each kernel package - for kernel in "${KERNELS_TO_REMOVE[@]}"; do - remove_package "$kernel" - done - -else - echo "Cannot proceed: At least one kernel must remain installed." -fi - -# Removing unwanted video drivers -remove_packages xf86-video-amdgpu xf86-video-ati xf86-video-fbdev xf86-video-nouveau xf86-video-openchrome xf86-video-vesa - -# Install essential tools -install_packages wget curl nano fastfetch lolcat bash-completion starship alacritty hwinfo lshw reflector expac pamac-aur avahi man-db tree xdg-user-dirs rsync time bat unzip chromium -# temp removed packages: -# betterlockscreen -if [ ! -f /usr/bin/duf ]; then - install_packages duf -fi -install_packages man-db man-pages pacmanlogviewer thunar thunar-archive-plugin thunar-volman tree xdg-user-dirs polkit-gnome rate-mirrors rsync time bat ntp nss-mdns -# temp removed packages: -# paru-git yay-git - -#disk-tools -install_packages baobab gvfs-smb hddtemp squashfs-tools - -#archive-managers -install_packages zip gzip p7zip unace unrar unzip file-roller -# temp removed packages: -# peazip - -#theming -install_packages feh font-manager -# temp removed packages: -# bibata-cursor-theme - -# All the software below will be installed on all desktops -install_packages archlinux-tools dconf-editor devtools hardinfo2 logrotate lsb-release powertop inxi acpi plocate most namcap nm-connection-editor python-pylint python-pywal -# temp removed packages: -# hw-probe - -# Optionally handle fonts -FONT_DIR="$HOME/.local/share/fonts" -FONT_NAME="RobotoMonoNerdFont" # Changed name to reflect the installed files -FONT_ZIP="/tmp/RobotoMono.zip" # Use original ZIP name for download -DOWNLOAD_NAME="RobotoMono" -if ! compgen -G "$FONT_DIR/${FONT_NAME}*.ttf" > /dev/null; then - say_yellow "Installing ${DOWNLOAD_NAME} Nerd Font..." - mkdir -p "$FONT_DIR" - curl -L "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${DOWNLOAD_NAME}.zip" -o "$FONT_ZIP" - unzip -oq "$FONT_ZIP" -d "$FONT_DIR" - fc-cache -fv - rm "$FONT_ZIP" - say_green "${DOWNLOAD_NAME} installed." -else - say_yellow "${DOWNLOAD_NAME} Nerd Font is already installed in $FONT_DIR. Skipping installation." -fi - -# allow Chromium login with Google Account - # Define the configuration file path - CONF="$HOME/.config/chromium-flags.conf" - # Check if the file exists, or create it if it doesn't - if [[ ! -f "$CONF" ]]; then - # Create the file if it doesn't exist - touch "$CONF" - echo "Created new Chromium flags file: $CONF" - fi - # Add the OAuth 2.0 Client ID if it's not already there - # -q: quiet, -x: match whole line, -F: literal string match - grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" || \ - echo "--oauth2-client-id=77185425430.apps.googleusercontent.com" >>"$CONF" - - # Add the OAuth 2.0 Client Secret if it's not already there - grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" || \ - echo "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" >>"$CONF" - - say_green "Chromium flags for Google Account login have been configured." - -# Enable basic services -#sudo systemctl enable chronyd.service -sudo systemctl enable fstrim.timer - -# End of script -say_green "Minimal setup completed." \ No newline at end of file diff --git a/v2/arch-workstation copy.sh b/v2/arch-workstation copy.sh deleted file mode 100755 index 9d5b191..0000000 --- a/v2/arch-workstation copy.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -set -euo pipefail - -########################## -# Color helpers (printf-safe, no tput) -########################## -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 - -say_red() { printf "\n"; printf "%b%s%b\n" "$RED" "$*" "$RESET"; } -say_green() { printf "\n"; printf "%b%s%b\n" "$GREEN" "$*" "$RESET"; } -say_yellow() { printf "\n"; printf "%b%s%b\n" "$YELLOW" "$*" "$RESET"; } -say_cyan() { printf "\n"; printf "%b%s%b\n" "$CYAN" "$*" "$RESET"; } -say_gray() { printf "\n"; printf "%b%s%b\n" "$GRAY" "$*" "$RESET"; } -say_bold() { printf "\n"; printf "%b%s%b\n" "$BOLD" "$*" "$RESET"; } - -########################## -# Use exported variables from main detection script -########################## -OS="${DETECTED_OS}" -DDE="${DETECTED_DE:-}" -DE="${SELECTED_DE:-none}" -TWM="${SELECTED_TWM:-none}" -INSTALL_LEVEL="${INSTALL_LEVEL:-minimal}" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -########################## -# Helper functions -########################## -install_packages() { sudo pacman -Sy; sudo pacman -S --noconfirm --needed "$@"; } -is_package_installed() { pacman -Qi "$@" &>/dev/null; } -remove_packages() { - local packages_to_remove=() - - # 1. Identify which packages are actually installed - for pkg in "$@"; do - if is_package_installed "$pkg"; then - packages_to_remove+=("$pkg") - else - say_gray "Package '$pkg' not found. Skipping removal." - fi - done - - # 2. Only run pacman if there are packages to remove - if [ ${#packages_to_remove[@]} -gt 0 ]; then - say_cyan "Removing packages: ${packages_to_remove[*]}" - sudo pacman -Rs --noconfirm "${packages_to_remove[@]}" || true - else - say_gray "No packages to remove from the list." - fi -} - -say_yellow "Starting Workstation setup..." - -# Run full first -bash "$SCRIPT_DIR/arch-full.sh" - -# Add extra packages -install_packages git libreoffice-fresh -# gitahead-git - -# editors -install_packages vscodium konsole -# temp removed packages: -# sublime-text-4 - -#internet -install_packages brave-bin -# temp removed packages -# google-chrome discord firefox insync - -#theming -# variety - -#media -install_packages flameshot-git mpv-git -# temp removed packages -# vlc gimp inkscape spotify lollypop mpv-full - -#shells -install_packages zsh zsh-completions zsh-syntax-highlighting oh-my-zsh-git -# fish - -#system-tools -install_packages base-devel - -#tools -install_packages wttr system-config-printer ripgrep meld btop htop hwinfo lshw - -# End of script -say_green "Workstation setup completed." - -###### TODO -### autostart flameshot tray icon -### autostart insync tray icon