Start using Flatpaks as the main install method for any desktop apps

This commit is contained in:
Josh.5
2023-07-08 02:59:43 +12:00
committed by Josh Sunnex
parent df9423ccad
commit fc700e2200
21 changed files with 224 additions and 477 deletions

38
overlay/opt/scripts/install_protonup.sh Normal file → Executable file
View File

@@ -1,34 +1,14 @@
#!/usr/bin/env bash
###
# File: install_protonup.sh
# Project: scripts
# File Created: Thursday, 1st January 1970 12:45:00 pm
# Author: Console and webGui login account (jsunnex@gmail.com)
# -----
# Last Modified: Sunday, 16th January 2022 4:55:12 am
# Modified By: Console and webGui login account (jsunnex@gmail.com)
###
pkg=protonup-ng
script_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
script_name=$( basename "${BASH_SOURCE[0]}" )
echo "**** Installing/upgrading ProtonUp-Qt via flatpak ****"
# Install ProtonUp-Qt
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install --assumeyes --noninteractive --or-update net.davidotek.pupgui2
install() {
if ! command -v ${pkg} >/dev/null; then
# Install application
python3 -m pip install ${pkg}
# Set installation path as user
# Note: Run command with su because init processes are run as root but this is a user thing...
su ${USER} -c "${pkg} -d '/home/${USER}/.steam/root/compatibilitytools.d/'"
# Update to the latest version on startup using the users Downloads directory
su ${USER} -c "${pkg} -y -o '/home/${USER}/Downloads/'" &
fi
# Configure Firefox as the default browser
echo "Configure ProtonUp-Qt..."
sed -i 's/^Categories=.*$/Categories=Utility;/' \
${USER_HOME}/.local/share/flatpak/exports/share/applications/net.davidotek.pupgui2.desktop
# Remove installer shortcut
rm -f /usr/share/applications/install.protonup.desktop
}
#INSTALLER:
source "${script_path}/installer.sh"
echo "DONE"