Skip to content

Instantly share code, notes, and snippets.

@ajsb85
Created December 19, 2024 18:20
Show Gist options
  • Save ajsb85/b953c86dc2365d229f0257a936aa81bd to your computer and use it in GitHub Desktop.
Save ajsb85/b953c86dc2365d229f0257a936aa81bd to your computer and use it in GitHub Desktop.
GNOME Circle App Installer

GNOME Circle App Installer

This script automates the installation of GNOME Circle apps on Ubuntu systems. It attempts to install apps using snap, flatpak, and apt in a non-interactive manner.

Features

  • Installs GNOME Circle apps from snap, flatpak, and apt.
  • Prioritizes flathub for Flatpak installations.
  • Automatically tries the edge channel for missing Snaps (optional).
  • Detects and skips already installed apps.
  • Identifies and reports apps not found in any of the sources.

Usage

  1. Save the script to a file (e.g., install_gnome_circle.sh).
  2. Make it executable: chmod +x install_gnome_circle.sh
  3. Run the script: ./install_gnome_circle.sh

Customization

  • snap_apps array: Contains the list of Snap package names.
  • flatpak_apps array: Contains pairs of Flatpak app IDs and names.
  • apt_apps array: Contains the list of apt package names.

You can modify these arrays to include or exclude specific apps.

Notes

  • Ensure that snapd and flatpak are installed on your system.
  • The script prioritizes flathub for Flatpak installations.
  • It automatically tries the edge channel for missing Snaps. You can disable this behavior by removing the --edge flag in the Snap installation section.
  • The script skips apps that are already installed.
  • It reports apps that are not found in any of the sources.

Disclaimer

  • This script is provided as-is, without any warranty.
  • Use it at your own risk.
  • The availability of apps in different sources may vary depending on your Ubuntu version and the app developers.

Contributing

Feel free to contribute to this script by submitting pull requests or reporting issues on GitHub.

License

This script is licensed under the MIT License.

#!/bin/bash
# Array of GNOME Circle app names for snap
snap_apps=(
audio-sharing
authenticator
biblioteca
binary
boatswain
cartridges
chess-clock
citations
clairvoyant
collision
commit
curtail
decibels
decoder
ear-tag
elastic
emblem
errands
eyedropper
file-shredder
forge-sparks
fragments
fretboard
gaphor
graphs
health
hieroglyphic
identity
impression
junction
komikku
letterpress
lorem
metadata-cleaner
mousai
newsflash
obfuscate
paper-clip
pika-backup
podcasts
polari
railway
resources
secrets
share-preview
shortwave
solanum
switcheroo
tangram
text-pieces
tuba
valuta
video-trimmer
warp
webfont-kit-generator
wike
workbench
)
# Array of GNOME Circle app names for Flatpak
flatpak_apps=(
"app.drey.Biblioteca" "biblioteca"
"io.github.fizzyizzy05.binary" "binary"
"com.feaneron.Boatswain" "boatswain"
"page.kramo.Cartridges" "cartridges"
"re.sonny.Commit" "commit"
"org.gnome.Decibels" "decibels"
"app.drey.Elastic" "elastic"
"org.gnome.design.Emblem" "emblem"
"com.github.finefindus.eyedropper" "eyedropper"
"dev.bragefuglseth.Fretboard" "fretboard"
"org.gaphor.Gaphor" "gaphor"
"dev.Cogitri.Health" "health"
"io.github.finefindus.Hieroglyphic" "hieroglyphic"
"io.gitlab.adhami3310.Impression" "impression"
"re.sonny.Junction" "junction"
"io.gitlab.gregorni.Letterpress" "letterpress"
"org.gnome.design.Lorem" "lorem"
"org.gnome.Polari" "polari"
"de.schmidhuberj.DieBahn" "railway"
"net.nokyan.Resources" "resources"
"org.gnome.Solanum" "solanum"
"io.gitlab.adhami3310.Converter" "switcheroo"
"re.sonny.Tangram" "tangram"
"io.github.idevecore.Valuta" "valuta"
"app.drey.Warp" "warp"
"re.sonny.Workbench" "workbench"
)
# Array of GNOME Circle app package names for apt
apt_apps=(
amberol
deja-dup
dialect
metadata-cleaner
mousai
obfuscate
tuba
wike
)
# Lists to store not found apps
not_found_snap=()
not_found_flatpak=()
not_found_apt=()
# Update package lists
sudo apt update
# Install Snap apps
echo "Installing Snap apps..."
for app in "${snap_apps[@]}"; do
if snap info "$app" &> /dev/null; then # Check if snap exists
sudo snap install "$app"
else
echo "Snap '$app' not found. Skipping..."
not_found_snap+=("$app")
fi
done
# Install Flatpak apps (non-interactive)
echo "Installing Flatpak apps..."
if ! flatpak --version &> /dev/null; then # Check if Flatpak is installed
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
fi
for i in "${!flatpak_apps[@]}"; do
if (( i % 2 == 0 )); then
app_id="${flatpak_apps[i]}"
app_name="${flatpak_apps[i+1]}"
echo "Installing '$app_name'..."
# Check if the app is already installed
if ! flatpak info "$app_id" &> /dev/null; then
# Check if the app exists on flathub
if flatpak remote-info flathub "$app_id" &> /dev/null; then
# Install from flathub
flatpak install --user -y flathub "$app_id"
else
echo "App '$app_name' not found on Flathub. Skipping..."
not_found_flatpak+=("$app_name")
fi
else
echo "App '$app_name' is already installed."
fi
fi
done
# Install apt apps
echo "Installing apt apps..."
for app in "${apt_apps[@]}"; do
if apt search "$app" &> /dev/null; then # Check if apt package exists
sudo apt install -y "$app"
else
echo "Apt package '$app' not found. Skipping..."
not_found_apt+=("$app")
fi
done
echo "Installation complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment