aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2024-02-04 19:38:19 +0000
committerJustine Smithies <justine@smithies.me.uk>2024-02-04 19:38:19 +0000
commit21d7a503c2c3cdb4e4b72e1e8ca1b2769a30dbc2 (patch)
tree57243cb1e0315bbbae49e69fc24b3793577d89d9 /.config
parent343802b7525fb0234b40f71c7fc687d15a332cda (diff)
Initial commit for Arch Linux
Diffstat (limited to '.config')
-rwxr-xr-x.config/yambar/scripts/arch-updates.sh48
1 files changed, 48 insertions, 0 deletions
diff --git a/.config/yambar/scripts/arch-updates.sh b/.config/yambar/scripts/arch-updates.sh
new file mode 100755
index 0000000..7b4f489
--- /dev/null
+++ b/.config/yambar/scripts/arch-updates.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+function update-yambar {
+echo "updates|string|"
+echo ""
+
+while true; do
+
+xbps-install -Mun 1> /tmp/void-updates
+# updates="$(cat /tmp/void-updates | awk '{ print $1 }')"
+# number="$(cat /tmp/void-updates | wc -l)"
+#
+# if [ "$number" -gt 0 ]; then
+# text=" $number"
+# else
+# text=""
+# fi
+updates="$(checkupdates;paru -Qum)"
+arch="$(checkupdates | wc -l)"
+aur="$(paru -Qum | wc -l)"
+number=$((arch+aur))
+
+if [ "$number" -gt 0 ]; then
+ text=" $number"
+else
+ text=""
+fi
+
+echo "updates|string|$text"
+echo ""
+sleep 30m
+
+done
+}
+
+function update {
+ foot bash -c "paru"; sh -c "~/.config/yambar/scripts/yambar-start.sh"
+}
+
+case $1 in
+ update)
+ update
+ ;;
+ *)
+ update-yambar
+ ;;
+esac
+exit 0