From c5510367db582d1c0683f182dd0e151ea0ab3b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 10 Jun 2022 14:14:22 +0200 Subject: Improvements for NixOS --- config/i3blocks/scripts/bandwidth | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/i3blocks/scripts/bandwidth') diff --git a/config/i3blocks/scripts/bandwidth b/config/i3blocks/scripts/bandwidth index 9b92274..d45f127 100755 --- a/config/i3blocks/scripts/bandwidth +++ b/config/i3blocks/scripts/bandwidth @@ -38,7 +38,7 @@ if [[ -z $INTERFACE ]] && [[ -n $BLOCK_INSTANCE ]]; then INTERFACE=$BLOCK_INSTANCE elif [[ -z $INTERFACE ]]; then for version in 4 6; do - INTERFACE=$(ip -$version r | sed -n 's/^default.*dev \([^ ]*\).*/\1/p') + INTERFACE=$(ip -$version r | sed -n 's/^default.*dev \([^ ]*\).*/\1/p' | head -1) [ -z "$INTERFACE" ] || break done fi -- cgit v1.2.3