diff options
| author | David Moc <personal@cdatgoose.org> | 2026-05-24 11:48:07 +0200 |
|---|---|---|
| committer | David Moc <personal@cdatgoose.org> | 2026-05-24 11:48:07 +0200 |
| commit | 5fb19f10389b70ee2389755106092a9ef6c64598 (patch) | |
| tree | 969eb0466de581cb14aa09f751a95138620fc720 /polybar/scripts/updates-action.sh | |
Go
Diffstat (limited to 'polybar/scripts/updates-action.sh')
| -rwxr-xr-x | polybar/scripts/updates-action.sh | 16 |
1 files changed, 16 insertions, 0 deletions
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 |
