added slack-updates script. All files in bin/ are now 644
authordanix <danix@danix.xyz>
Mon, 20 Mar 2023 13:54:36 +0000 (14:54 +0100)
committerdanix <danix@danix.xyz>
Mon, 20 Mar 2023 13:54:36 +0000 (14:54 +0100)
bin/run-polybar.sh [changed mode: 0755->0644]
bin/slack-updates [new file with mode: 0644]
bin/wacom [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
diff --git a/bin/slack-updates b/bin/slack-updates
new file mode 100644 (file)
index 0000000..65e7728
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+CL="https://mirrors.slackware.com/slackware/slackware64-current/ChangeLog.txt"
+LOCAL_CL="/var/lib/slackpkg/ChangeLog.txt"
+TMP="/tmp"
+TMPCL="${TMP}/ChangeLog.txt"
+
+
+function SHOW_TOOLTIP () {
+       sed '/+--------------------------+/Q' $TMPCL |qarma --width=600 --height=400 --text-info
+}
+
+
+if [[ -f ${TMPCL} ]]; then
+       rm $TMPCL
+fi
+       wget -q -P ${TMP} ${CL}
+       if [ $? -ne 0 ]; then
+               echo "  󱧖   "
+       fi
+NCL=$(head -n 1 ${TMPCL})
+LCL=$(head -n 1 ${LOCAL_CL})
+
+if [[ ${NCL} != ${LCL} ]];then
+       echo "  󰏗 󰚰 "
+else
+       echo "  󰏗   "
+fi
+
+if [ $1 ]; then
+       case $1 in
+               -n )
+                       SHOW_TOOLTIP
+                       ;;
+       esac
+fi
old mode 100755 (executable)
new mode 100644 (file)