Skip to content

Commit

Permalink
feat: Switch to system level flatpaks
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed Jan 4, 2024
1 parent 12f3f00 commit 5892da2
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 27 deletions.
11 changes: 8 additions & 3 deletions usr/bin/ublue-system-flatpak-manager
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Script Version
VER=1
VER=2
VER_FILE="/etc/ublue/flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

Expand All @@ -11,11 +11,16 @@ if [[ -f $VER_FILE && $VER = $VER_RAN ]]; then
exit 0
fi

# Remove fedora flatpak repo
# Opt out of and remove Fedora's flatpak repo
if grep -qz 'fedora' <<< $(flatpak remotes); then
flatpak remote-delete --user fedora --force
/usr/lib/fedora-third-party/fedora-third-party-opt-out
/usr/bin/fedora-third-party disable
flatpak remote-delete fedora --force
fi

# Ensure Flathub is enabled
flatpak remote-modify --system --enable flathub

# Lists of flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
INSTALL_LIST=$(cat /etc/flatpak/system/install)
Expand Down
8 changes: 6 additions & 2 deletions usr/bin/ublue-user-flatpak-manager
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Script Version
VER=1
VER=2
VER_FILE="$HOME/.ublue_flatpak_manager_version"
VER_RAN=$(cat $VER_FILE)

Expand All @@ -11,8 +11,12 @@ if [[ -f $VER_FILE && $VER = $VER_RAN ]]; then
exit 0
fi

# Setup Flathub
# Enable Flathub
if grep -qz 'fedora' <<< $(flatpak remotes); then
flatpak remote-delete --user fedora --force
fi
flatpak remote-add --if-not-exists --user flathub /etc/flatpak/remotes.d/flathub.flatpakrepo
flatpak remote-modify --user --enable flathub

# Lists of flatpaks
FLATPAK_LIST=$(flatpak list --columns=application)
Expand Down
22 changes: 22 additions & 0 deletions usr/etc/flatpak/system/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
org.mozilla.firefox
org.freedesktop.Platform.ffmpeg-full//22.08
org.gnome.Calculator
org.gnome.Calendar
org.gnome.Characters
org.gnome.Connections
org.gnome.Contacts
org.gnome.Evince
org.gnome.Loupe
org.gnome.Logs
org.gnome.Maps
org.gnome.NautilusPreviewer
org.gnome.TextEditor
org.gnome.Weather
org.gnome.baobab
org.gnome.clocks
org.gnome.font-viewer
com.mattjakeman.ExtensionManager
com.github.tchx84.Flatseal
org.fedoraproject.MediaWriter
io.missioncenter.MissionCenter
io.github.celluloid_player.Celluloid
22 changes: 0 additions & 22 deletions usr/etc/flatpak/user/install
Original file line number Diff line number Diff line change
@@ -1,22 +0,0 @@
org.mozilla.firefox
org.freedesktop.Platform.ffmpeg-full//22.08
org.gnome.Calculator
org.gnome.Calendar
org.gnome.Characters
org.gnome.Connections
org.gnome.Contacts
org.gnome.Evince
org.gnome.Loupe
org.gnome.Logs
org.gnome.Maps
org.gnome.NautilusPreviewer
org.gnome.TextEditor
org.gnome.Weather
org.gnome.baobab
org.gnome.clocks
org.gnome.font-viewer
com.mattjakeman.ExtensionManager
com.github.tchx84.Flatseal
org.fedoraproject.MediaWriter
io.missioncenter.MissionCenter
io.github.celluloid_player.Celluloid
22 changes: 22 additions & 0 deletions usr/etc/flatpak/user/remove
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
org.mozilla.firefox
org.freedesktop.Platform.ffmpeg-full//22.08
org.gnome.Calculator
org.gnome.Calendar
org.gnome.Characters
org.gnome.Connections
org.gnome.Contacts
org.gnome.Evince
org.gnome.Loupe
org.gnome.Logs
org.gnome.Maps
org.gnome.NautilusPreviewer
org.gnome.TextEditor
org.gnome.Weather
org.gnome.baobab
org.gnome.clocks
org.gnome.font-viewer
com.mattjakeman.ExtensionManager
com.github.tchx84.Flatseal
org.fedoraproject.MediaWriter
io.missioncenter.MissionCenter
io.github.celluloid_player.Celluloid

0 comments on commit 5892da2

Please sign in to comment.