From 4c1309e4aed61be74e14cfd05ffd12301ab0473a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 1 Mar 2017 23:39:38 +0100 Subject: Move down message from ifnet to bandwidth I have bandwidth after iface, if there is down message from ifnet separator from bandwidth would disappear so we would have no separator. With this it stays. --- config/i3blocks/scripts/bandwidth | 3 +++ config/i3blocks/scripts/iface | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'config/i3blocks') diff --git a/config/i3blocks/scripts/bandwidth b/config/i3blocks/scripts/bandwidth index cfefaf2..ba15a27 100755 --- a/config/i3blocks/scripts/bandwidth +++ b/config/i3blocks/scripts/bandwidth @@ -21,6 +21,9 @@ INTERFACE=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') # Issue #36 compliant. if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ] then + echo down # full text + echo down # short text + echo \#FF0000 # color exit 0 fi diff --git a/config/i3blocks/scripts/iface b/config/i3blocks/scripts/iface index a0a1946..134d66b 100755 --- a/config/i3blocks/scripts/iface +++ b/config/i3blocks/scripts/iface @@ -32,9 +32,6 @@ IF=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') # If no IF is selected then we want see down, not anything else. if [ -z "$IF" ] || [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then - echo down # full text - echo down # short text - echo \#FF0000 # color exit fi -- cgit v1.2.3