diff --git a/sh/up b/sh/up new file mode 100755 index 0000000..e05b940 --- /dev/null +++ b/sh/up @@ -0,0 +1,8 @@ +#!/bin/bash +# up: update repo, AUR and flatpak packages without prompts + +yay -Syu --noconfirm +flatpak update -y + +# refresh the waybar update counter +pkill -RTMIN+8 waybar diff --git a/sh/waybar-updates b/sh/waybar-updates new file mode 100755 index 0000000..5e02807 --- /dev/null +++ b/sh/waybar-updates @@ -0,0 +1,13 @@ +#!/bin/bash +# waybar-updates: prints pending repo + AUR update count, nothing when up to date + +repo=$(checkupdates 2>/dev/null) +aur=$(yay -Qua 2>/dev/null) + +list=$(printf '%s\n%s\n' "$repo" "$aur" | sed '/^$/d') +[ -z "$list" ] && exit 0 + +count=$(wc -l <<<"$list") +tooltip=$(head -40 <<<"$list" | sed 's/&/\&/g; s/