From: Siraaj Khandkar Date: Sat, 7 Jul 2018 21:01:19 +0000 (-0400) Subject: Hide wifi IO rates when disconnected X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=1ca0626b5b2cc1e01f8a0bd7c91fa07bd0bfdf6e;p=khatus.git Hide wifi IO rates when disconnected --- diff --git a/bin/khatus_show b/bin/khatus_show index 537475b..935a1da 100755 --- a/bin/khatus_show +++ b/bin/khatus_show @@ -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 )