diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet index d8bd896..ee1a160 100755 --- a/.local/bin/statusbar/internet +++ b/.local/bin/statusbar/internet @@ -2,6 +2,7 @@ # 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 ;; @@ -10,6 +11,7 @@ case $BLOCK_BUTTON in 📶: wifi connection with quality ❎: no ethernet 🌐: ethernet working +🔒: vpn is active " ;; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac @@ -19,4 +21,4 @@ case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; esac -printf "%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)" +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)"