aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/updates
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/updates')
-rwxr-xr-x.local/bin/updates15
1 files changed, 15 insertions, 0 deletions
diff --git a/.local/bin/updates b/.local/bin/updates
new file mode 100755
index 0000000..b3acb48
--- /dev/null
+++ b/.local/bin/updates
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case $BLOCK_BUTTON in
+ 1) setsid storeless;;
+ 3) notify-send "📦 Upates" "$(yay -Qu)";;
+esac
+
+packages=$(yay -Sy >/dev/null && yay -Qu)
+
+if [ -n "$packages" ]
+then
+ echo $(echo "$packages" | wc -l) ⏬
+else
+ echo 🔁
+fi