#!/bin/bash # # Script Name: install_ubuntu24.04.sh # Version : 1.0 # Description: Installation script auto customization # GNOME 46 Look Like macOS on Ubuntu 24.04 # # For Linux : Ubuntu 24.04 # For Desktop Environment : GNOME Shell 46 # Author: linuxscoop # Youtube: https://youtube.com/user/linuxscoop # Created: May 20, 2024 # Last Modified: June 07, 2024 # # update the system update_system() { clear echo "Update your system with new packages.." sudo apt update && sudo apt dist-upgrade -y } # remove snap apps and daemon, and prevent their reinstallation remove_snap_and_prevent_reinstall() { echo "Removing snap apps and snap daemon.." # backup snap folder on $HOME cp -af $HOME/snap/ src/ # Commands to remove snap apps and daemon sudo snap remove --purge firefox sudo snap remove --purge snap-store sudo snap remove --purge gnome-42-2204 sudo snap remove --purge gtk-common-themes sudo snap remove --purge snapd-desktop-integration sudo snap remove --purge firmware-updater sudo snap remove --purge core22 sudo snap remove --purge bare sudo snap remove --purge snapd sudo apt autoremove --remove snapd -y sudo rm -rf /var/cache/snapd/ # Prevent snapd from being installed echo "Package: snapd Pin: release a=* Pin-Priority: -10" | sudo tee /etc/apt/preferences.d/nosnap.pref sudo apt update } install_firefox_from_mozilla_ppa() { # Define the distro codename distro_codename=$(lsb_release -cs) # Add the Mozilla team PPA and update package lists sudo add-apt-repository -y ppa:mozillateam/ppa sudo apt update # Install Firefox from the Mozilla team PPA sudo apt install -y -t 'o=LP-PPA-mozillateam' firefox # Allow unattended upgrades from the Mozilla team PPA echo "Unattended-Upgrade::Allowed-Origins:: \"LP-PPA-mozillateam:$distro_codename\";" | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox # Set the pinning preferences for Firefox packages from the Mozilla team PPA echo 'Package: firefox* Pin: release o=LP-PPA-mozillateam Pin-Priority: 501' | sudo tee /etc/apt/preferences.d/mozillateamppa # Update package lists again to apply pinning preferences sudo apt update # Restore firefox data from firefox snap mkdir -p $HOME/.mozilla/firefox/ && cp -af src/snap/firefox/common/.mozilla/firefox/* ~/.mozilla/firefox/ } # install apps and dependencies install_apps_and_dependencies() { clear echo "Install Command Line Apps and dependencies.." sudo apt install curl \ rsync \ git \ gdebi \ nautilus-admin \ nautilus-extension-gnome-terminal \ sassc \ gnome-tweaks \ gnome-shell-extension-manager -y } # install apps and dependencies install_gnome_apps() { clear echo "Install GNOME Apps and Dependencies.." sudo apt install gnome-weather \ gnome-maps \ gnome-audio \ gnome-calendar \ gnome-clocks \ gnome-connections \ gnome-console \ gnome-contacts \ gnome-music \ vlc \ gnome-shell-pomodoro -y } # Install WhiteSur GTK theme and configure it install_whitesur_gtk_theme() { clear echo "Installing WhiteSur GTK theme..." # Create src directory if it doesn't exist mkdir -p src && cd src/ || { echo "Failed to create or enter src directory"; exit 1; } # Clone the repository if it doesn't already exist if [ ! -d "WhiteSur-gtk-theme" ]; then git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git || { echo "Failed to clone WhiteSur-gtk-theme repository"; exit 1; } fi cd WhiteSur-gtk-theme/ || { echo "Failed to enter WhiteSur-gtk-theme directory"; exit 1; } # Install the theme ./install.sh -l -c Light -c Dark -s 180 -m || { echo "Failed to execute install.sh"; exit 1; } # Apply tweaks ./tweaks.sh -d || { echo "Failed to execute tweaks.sh"; exit 1; } cd ../../ || { echo "Failed to return to the previous directory"; exit 1; } # Enable WhiteSur GTK theme support for libadwaita apps - Light mode ln -sf "$HOME/.config/gtk-4.0/gtk-Light.css" "$HOME/.config/gtk-4.0/gtk.css" echo "WhiteSur GTK theme installation completed." } # Install WhiteSur icon theme install_whitesur_icon_theme() { clear echo "Installing WhiteSur icon theme..." cd src/ || { echo "Failed to enter src directory"; exit 1; } # Clone the repository if it doesn't already exist if [ ! -d "WhiteSur-icon-theme" ]; then git clone https://github.com/vinceliuice/WhiteSur-icon-theme.git || { echo "Failed to clone WhiteSur-icon-theme repository"; exit 1; } fi cd WhiteSur-icon-theme/ || { echo "Failed to enter WhiteSur-icon-theme directory"; exit 1; } # Install the icon theme ./install.sh -a -b || { echo "Failed to execute install.sh"; exit 1; } cd ../../ || { echo "Failed to return to the previous directory"; exit 1; } echo "WhiteSur icon theme installation completed." } # install WhiteSur Firefox Theme install_whitesur_firefox_theme() { clear echo "Installing WhiteSur Firefox Theme..." # Create src directory if it doesn't exist mkdir -p src && cd src/ || { echo "Failed to create or enter src directory"; exit 1; } # Clone the repository if it doesn't already exist if [ ! -d "WhiteSur-firefox-theme" ]; then git clone https://github.com/vinceliuice/WhiteSur-firefox-theme.git || { echo "Failed to clone WhiteSur-firefox-theme repository"; exit 1; } fi cd WhiteSur-firefox-theme/ || { echo "Failed to enter WhiteSur-firefox-theme directory"; exit 1; } # Install the theme ./install.sh -m || { echo "Failed to execute install.sh"; exit 1; } cd ../../ || { echo "Failed to return to the previous directory"; exit 1; } echo "WhiteSur Firefox theme installation completed." } # install Cursors theme install_cursors_theme() { clear echo "Install Cursors theme.." if [ -d $HOME/.icons ]; then cp -af res/WhiteSur-cursors/ $HOME/.icons/ else mkdir $HOME/.icons cp -af res/WhiteSur-cursors/ $HOME/.icons/ fi } # Install fonts and wallpapers install_fonts_and_wallpapers() { clear echo "Install Fonts and wallpapers.." cp -af res/fonts/ $HOME/.local/share/ # Install Wallpaper to /usr/share/backgrounds/ sudo cp -af res/macosw/ /usr/share/backgrounds/ sudo chmod 755 /usr/share/backgrounds/macosw sudo chmod 644 /usr/share/backgrounds/macosw/*.* } # install GNOME Shell Extensions install_gnome_shell_extensions() { clear echo "Install GNOME Shell Extensions.." if [ -d $HOME/.local/share/gnome-shell/extensions ]; then cp -af res/extensions/* $HOME/.local/share/gnome-shell/extensions/ else mkdir -p $HOME/.local/share/gnome-shell/extensions cp -af res/extensions/* $HOME/.local/share/gnome-shell/extensions/ fi } # install Cava, Neofetch and their configurations install_cava_neofetch() { clear echo "Install Cava, Neofetch and Configuration.." sudo apt install cava -y # Install Cava Config cp -af conf/cava/ $HOME/.config/ # Install Neofetch sudo apt install neofetch -y # Install Neofetch Config cp -af conf/neofetch/ $HOME/.config/ } # Function to install Oh My Zsh install_zsh_oh_my_zsh() { clear echo "Install Oh My Zsh.." sudo apt install zsh -y sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" <