#!/bin/sh USER=$(ls /home/) SESSION=$(grep '=' /home/"$USER"/.dmrc | cut -d= -f2) # Removing Unecessary software ## khmer sh -c "apt list --installed | grep khmer | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## deluge sh -c "apt list --installed | grep deluge | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## parole sh -c "apt list --installed | grep parole | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## fcitx sh -c "apt list --installed | grep fcitx | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## anthy sh -c "apt list --installed | grep anthy | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## xsane sh -c "apt list --installed | grep xsane | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## mozc sh -c "apt list --installed | grep mozc | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## uim sh -c "apt list --installed | grep uim | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## thai terminal sh -c "apt list --installed | grep xiterm+thai | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## multilingual terminal sh -c "apt list --installed | grep mlterm | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## exfalso (music tagger) sh -c "apt list --installed | grep exfalso | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## quite weak archiver sh -c "apt list --installed | grep xarchiver | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## hdate sh -c "apt list --installed | grep hdate | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## gnome-games sh -c "apt list --installed | grep gnome-games | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## debian reference sh -c "apt list --installed | grep debian-reference | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" ## synaptic sh -c "apt list --installed | grep synaptic | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" if ! test -f /usr/bin/gnome-session; then ## ibus sh -c "apt list --installed | grep ibus | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" fi # Adding Extra Repos sed -i s:main:'main contrib non-free':g /etc/apt/sources.list # Enable 32 Bit Suport dpkg --add-architecture i386 apt update apt upgrade -y # Adding All Firmware sh -c "apt list | grep firmware | grep -vi installed | cut -d"/" -f1 | xargs -I {} apt install -y {}" # Adding Software Store apt install -y flatpak flatpak-builder gnome-software gnome-software-common gnome-software-dev gnome-software-plugin-flatpak # gnome-packagekit flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo # Printer apt install cups system-config-printer system-config-printer-udev system-config-printer-common hplip printer-driver-all simple-scan systemctl enable cups # Adding Extra Important Software # apt install -y engrampa vlc unar arc-theme papirus-icon-theme transmission-gtk if test -f /usr/bin/xfwm4-settings; then # Enabling Power Settings apt install -y xfce4-power-manager # Enabling Autologin sed -i s:#autologin-session=:autologin-session="$SESSION":g /etc/lightdm/lightdm.conf sed -i s:#autologin-user=:autologin-user="$USER":g /etc/lightdm/lightdm.conf fi # Replacing WICD with NetworkManager apt install -y network-manager network-manager-gnome systemctl disable wicd sh -c "apt list --installed | grep wicd | cut -d"/" -f1 | xargs -I {} apt autoremove --purge -y {}" systemctl enable NetworkManager # Cleaning Up apt clean # Shuting Down System poweroff