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/iface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/i3blocks/scripts/iface') diff --git a/config/i3blocks/scripts/iface b/config/i3blocks/scripts/iface index ffa576e..5daffa6 100755 --- a/config/i3blocks/scripts/iface +++ b/config/i3blocks/scripts/iface @@ -20,7 +20,7 @@ # Use the provided interface, otherwise the device used for the default route. IF="${IFACE:-$BLOCK_INSTANCE}" for version in 4 6; do - IF="${IF:-$(ip -$version route | sed -n 's/^default.*dev \([^ ]*\).*/\1/p')}" + IF="${IF:-$(ip -$version route | sed -n 's/^default.*dev \([^ ]*\).*/\1/p' | head -1)}" done # Exit if there is no default route -- cgit v1.2.3