#!/usr/bin/env bash set -euo pipefail cmd='sudo pacman -Syu; echo; read -r -p "Press Enter to close..."' if command -v kitty >/dev/null 2>&1; then exec kitty --title "System update" /usr/bin/env bash -lc "$cmd" elif command -v foot >/dev/null 2>&1; then exec foot --title "System update" /usr/bin/env bash -lc "$cmd" elif command -v xterm >/dev/null 2>&1; then exec xterm -T "System update" -e /usr/bin/env bash -lc "$cmd" fi if command -v dunstify >/dev/null 2>&1; then dunstify -a polybar -u normal "Updates" "No terminal found" fi