diff options
Diffstat (limited to 'ar/.local/bin/statusbar/sb-internet')
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-internet | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ar/.local/bin/statusbar/sb-internet b/ar/.local/bin/statusbar/sb-internet index baa5ebd..4dfb605 100755 --- a/ar/.local/bin/statusbar/sb-internet +++ b/ar/.local/bin/statusbar/sb-internet @@ -2,7 +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 +# Show 🛰 if a vpn connection is active eth_con="$(nmcli -t -f NAME,TYPE,DEVICE connection show | awk -F: '$2=="ethernet" && $3!="" { print $1; exit }')" @@ -26,7 +26,7 @@ fi case $BLOCK_BUTTON in 1) "$TERMINAL" -e nmtui - pkill -RTMIN+7 dwmblocks + pkill -RTMIN+6 dwmblocks ;; 2) wifi_dev="$(nmcli -t -f DEVICE,TYPE device | @@ -43,7 +43,7 @@ case $BLOCK_BUTTON in notify-send "Wi-Fi" "Wi-Fi connected" fi - pkill -RTMIN+7 dwmblocks + pkill -RTMIN+6 dwmblocks ;; 3) notify-send "🌐 Internet module" "\- Left click to connect ❌: wifi disabled @@ -71,7 +71,7 @@ fi grep -q 'up' /sys/class/net/e*/operstate && ethericon="🌐" || ethericon="❎" # TUN -grep -q 'up' /sys/class/net/tun*/operstate 2>/dev/null && tunicon="🛰" +[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon="🛰" icons="" [ -n "$wifiicon" ] && icons="${icons}$wifiicon " |
