summaryrefslogtreecommitdiff
path: root/.scripts/internet
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2023-03-02 17:18:50 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2023-03-02 17:18:50 +0530
commitaae73c7562c9d172a3f8c75ea68b3932cb97921e (patch)
tree274b4f7a0ae81377c4d44edda8ab039e29ff5dfa /.scripts/internet
parentfd6979ba8b9eeada306f521165f956e1bf828610 (diff)
internet ping for network :globe_with_meridians:
Diffstat (limited to '.scripts/internet')
-rwxr-xr-x.scripts/internet2
1 files changed, 1 insertions, 1 deletions
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