Last active
February 8, 2024 22:10
-
-
Save besoeasy/235842b968b0b6b8b7669788ba3e948f to your computer and use it in GitHub Desktop.
Flatpak Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update package lists and upgrade installed packages | |
echo "Updating package lists..." | |
sudo apt-get update -y | |
echo "Upgrading installed packages..." | |
sudo apt-get upgrade -y | |
# Detect the current desktop environment | |
echo "Detecting desktop environment..." | |
DESKTOP_ENV=$(echo "${XDG_CURRENT_DESKTOP,,}") | |
# Function to install packages with informative messages | |
install_packages() { | |
echo "Installing packages: $@" | |
sudo apt install "$@" -y | |
echo "Packages installed successfully!" | |
} | |
# Install essential tools | |
echo "Installing neofetch and flatpak..." | |
install_packages neofetch flatpak | |
# Install Flatpak plugins based on the detected desktop environment | |
case "$DESKTOP_ENV" in | |
gnome) | |
echo "Installing Flatpak plugin for GNOME Software..." | |
install_packages gnome-software-plugin-flatpak | |
;; | |
kde) | |
echo "Installing Flatpak plugin for KDE Discover..." | |
install_packages plasma-discover-backend-flatpak | |
;; | |
*) | |
echo "Unsupported desktop environment detected. Flatpak plugins will not be installed." | |
;; | |
esac | |
# Add the Flathub repository | |
echo "Adding Flathub repository..." | |
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
echo "Flathub repository added successfully!" | |
# Display system information using neofetch | |
neofetch |
Author
besoeasy
commented
Feb 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment