cleanup of scripts

This commit is contained in:
2026-08-23 14:31:43 -07:00
parent e4df7507ac
commit b015c17cca
3 changed files with 7 additions and 203 deletions

View File

@@ -2,22 +2,23 @@
# If 'up' argument is passed, run update in terminal
if [ "$1" == "up" ]; then
ghostty -e bash -c "yay -Syu; echo 'Done. Press Enter.'; read"
ghostty -e bash -c "yay -Syu && flatpak update; echo 'Done. Press Enter.'; read"
exit 0
fi
# Otherwise, do a quick parallel check
notify-send "Checking Updates..." -t 1500
# Check Pacman and AUR in parallel
pc_count=$(checkupdates 2>/dev/null | wc -l &)
aur_count=$(yay -Qua 2>/dev/null | wc -l &)
# Check Pacman, AUR, and Flatpaks in parallel
pc_count=$(checkupdates 2>/dev/null | wc -l) &
aur_count=$(yay -Qua 2>/dev/null | wc -l) &
fp_count=$(flatpak remote-ls --updates 2>/dev/null | wc -l) &
wait
total=$((pc_count + aur_count))
total=$((pc_count + aur_count + fp_count))
if [ "$total" -eq 0 ]; then
notify-send "System Up to Date" "No packages to update." -i checkbox-checked-symbolic
else
notify-send "Updates Available" "󰚰 Total: $total\nRepo: $pc_count | AUR: $aur_count\n\nPress SUPER+U to update." -i software-update-available-symbolic
notify-send "Updates Available" "󰚰 Total: $total\nRepo: $pc_count | AUR: $aur_count | Flatpak: $fp_count\n\nPress SUPER+U to update." -i software-update-available-symbolic
fi