#!/usr/bin/env bash

# omarchy:summary=Update Flathub apps if any are installed

# Based: the desktop apps the AUR carried on Arch are Flathub apps here, so
# the update step AUR packages had goes to the system installation.
if omarchy-cmd-present flatpak && [[ -n $(flatpak list --system --app --columns=application 2>/dev/null) ]]; then
  echo -e "\e[32m\nUpdate Flatpak apps\e[0m"
  sudo flatpak update --system -y --noninteractive
  echo
fi
