From fb9e55809afe7a2cecd80c523a37cb197970f9c5 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Thu, 14 Dec 2023 21:13:30 +0100 Subject: bar: roll sandbar and status script into one --- bar | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bar (limited to 'bar') diff --git a/bar b/bar new file mode 100755 index 0000000..5ae2dc2 --- /dev/null +++ b/bar @@ -0,0 +1,24 @@ +#!/bin/sh + +PRIMARY="FF8C00FF" +SECONDARY="070707FF" + +while true; do + # time="$(TZ=America/Chicago date +'%Z %H:%M') |" + time="$(TZ=Europe/Amsterdam date +'%Z %H:%M %Y/%m/%d')" + temp="CPU $(sensors k10temp-pci-00c3 | grep Tctl | cut -d: -f2 | tr -d ' +')" + wlp1s0="$(nmcli connection | grep wlp1s0 | cut -d\ -f1)" + if [ -z "$wlp1s0" ]; then wlp1s0="DN"; fi + nmcli connection | grep wireguard | grep -vq '\--' && vpn="VPN UP" || vpn="VPN DN" + wifi="WLS $wlp1s0" + bat="BAT $(battery)" + echo "all status $vpn | $wifi | $bat | $temp | $time" + sleep 30s +done | sandbar -bottom\ + -tags 8 F U H . V L O M\ + -font 'PxPlus IBM VGA 9x16:size=24'\ + -vertical-padding 4\ + -hide-vacant-tags\ + -active-bg-color $PRIMARY -active-fg-color $SECONDARY\ + -inactive-bg-color $SECONDARY -inactive-fg-color $PRIMARY\ + -title-fg-color $SECONDARY -title-bg-color $PRIMARY -- cgit v1.2.3