From 1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Thu, 20 Jan 2022 17:07:39 -0600 Subject: moved many scripts around, small tweaks/rewrites, mounter verify xsudo and xclick scripts --- bar/sb-internet | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 bar/sb-internet (limited to 'bar/sb-internet') diff --git a/bar/sb-internet b/bar/sb-internet deleted file mode 100755 index ee1a160..0000000 --- a/bar/sb-internet +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# Show wifi 📶 and percent strength or 📡 if none. -# Show 🌐 if connected to ethernet or ❎ if none. -# Show 🔒 if a vpn connection is active - -case $BLOCK_BUTTON in - 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; - 3) notify-send "🌐 Internet module" "\- Click to connect -📡: no wifi connection -📶: wifi connection with quality -❎: no ethernet -🌐: ethernet working -🔒: vpn is active -" ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in - down) wifiicon="📡 " ;; - up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; -esac - -printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)" -- cgit v1.2.3