From 356f6ff6b075a7370a30d2716c59c483a8cfa10e Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Tue, 4 Oct 2016 13:57:35 +0100 Subject: [PATCH] Should print down if the interface is empty (fixes displaying the docker IP address) --- .config/i3/blocks/iface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/i3/blocks/iface b/.config/i3/blocks/iface index 4d6ea2c..48e672e 100755 --- a/.config/i3/blocks/iface +++ b/.config/i3/blocks/iface @@ -32,7 +32,7 @@ fi #------------------------------------------------------------------------ -if [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then +if [[ -z $IF ]] || [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then echo down # full text echo down # short text echo \#FF0000 # color