From 252ef34a643a6cef28227c60b35d1fb942e5412e Mon Sep 17 00:00:00 2001 From: danix Date: Mon, 20 Mar 2023 14:54:36 +0100 Subject: [PATCH] added slack-updates script. All files in bin/ are now 644 --- bin/run-polybar.sh | 0 bin/slack-updates | 35 +++++++++++++++++++++++++++++++++++ bin/wacom | 0 3 files changed, 35 insertions(+) mode change 100755 => 100644 bin/run-polybar.sh create mode 100644 bin/slack-updates mode change 100755 => 100644 bin/wacom diff --git a/bin/run-polybar.sh b/bin/run-polybar.sh old mode 100755 new mode 100644 diff --git a/bin/slack-updates b/bin/slack-updates new file mode 100644 index 0000000..65e7728 --- /dev/null +++ b/bin/slack-updates @@ -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 diff --git a/bin/wacom b/bin/wacom old mode 100755 new mode 100644 -- 2.20.1