From aae73c7562c9d172a3f8c75ea68b3932cb97921e Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Thu, 2 Mar 2023 17:18:50 +0530 Subject: internet ping for network :globe_with_meridians: --- .scripts/internet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts') diff --git a/.scripts/internet b/.scripts/internet index 5b31ff3..61a8197 100755 --- a/.scripts/internet +++ b/.scripts/internet @@ -13,7 +13,7 @@ if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then #wifiicon="$(awk '/^\s*w/ { print " ", int($3 * 100 / 70) "% " }' /proc/net/wireless)" - wifiicon=" " + ping -c1 example.com &>/dev/null && wifiicon=" " || wifiicon="轢 " elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="睊 " || wifiicon="轢 " fi -- cgit v1.2.3