Hide wifi IO rates when disconnected
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 7 Jul 2018 21:01:19 +0000 (17:01 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 7 Jul 2018 21:01:19 +0000 (17:01 -0400)
bin/khatus_show

index 537475b..935a1da 100755 (executable)
@@ -120,10 +120,15 @@ network=$(
         }
 
         END {
-            lo   = devices["lo"]
-            #eth = devices["enp0s25"]
-            wifi = devices["wlp3s0"]
-            printf("[%s | %s %s]", lo, wifi_conn, wifi)
+            lo      = devices["lo"]
+            #eth    = devices["enp0s25"]
+            wifi_io = devices["wlp3s0"]
+            if (wifi_conn == "--") {
+                wifi = wifi_conn
+            } else {
+                wifi = wifi_conn " " wifi_io
+            }
+            printf("[%s | %s]", lo, wifi)
         }
     ' /proc/net/dev
 )
This page took 0.038445 seconds and 4 git commands to generate.