From 5fb19f10389b70ee2389755106092a9ef6c64598 Mon Sep 17 00:00:00 2001 From: David Moc Date: Sun, 24 May 2026 11:48:07 +0200 Subject: Go --- polybar/scripts/updates-action.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 polybar/scripts/updates-action.sh (limited to 'polybar/scripts/updates-action.sh') diff --git a/polybar/scripts/updates-action.sh b/polybar/scripts/updates-action.sh new file mode 100755 index 0000000..a22a747 --- /dev/null +++ b/polybar/scripts/updates-action.sh @@ -0,0 +1,16 @@ +#!/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 -- cgit v1.2.3