diff --git a/scripts/runUpdates.sh b/scripts/runUpdates.sh new file mode 100755 index 0000000..2fd65e3 --- /dev/null +++ b/scripts/runUpdates.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Provided by: https://github.com/JJDizz1L + +install_arch_updates() { + echo "Updating Arch Linux system..." + sudo pacman -Syu + echo "Updating AUR packages..." + paru -Syu + echo "Updating Flatpak packages..." + flatpak update -y + echo "Done with Arch & AUR updates." +} + +install_ubuntu_updates() { + echo "Updating Ubuntu system..." + sudo apt update && sudo apt upgrade -y + echo "Updating Flatpak packages..." + flatpak update -y + echo "Done with Ubuntu updates." +} + +install_fedora_updates() { + echo "Updating Fedora system..." + sudo dnf update -y + echo "Updating Flatpak packages..." + flatpak update -y + echo "Done with Fedora updates." +} + +install_flatpak_updates() { + echo "Updating Flatpak packages..." + flatpak update -y + echo "Done with FlatPak updates." +} + +case "$1" in +-arch) + install_arch_updates + ;; +-ubuntu) + install_ubuntu_updates + ;; +-fedora) + install_fedora_updates + ;; +-flatpak) + install_flatpak_updates + ;; +*) + echo "Usage: $0 {-arch|-ubuntu|-fedora|-flatpak}" + ;; +esac + +echo "Press any key to exit..." +read -n 1 diff --git a/src/options.ts b/src/options.ts index 4ca7951..c17bbde 100644 --- a/src/options.ts +++ b/src/options.ts @@ -1104,7 +1104,7 @@ const options = mkOptions(CONFIG, { updated: opt('󰏖'), }, pollingInterval: opt(1000 * 60 * 60 * 6), - leftClick: opt(''), + leftClick: opt(`$TERMINAL -e ${SRC_DIR}/scripts/runUpdates.sh -arch`), rightClick: opt(''), middleClick: opt(''), scrollUp: opt(''),