aboutsummaryrefslogtreecommitdiff
path: root/config/i3blocks/scripts/iface
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-06-10 14:14:22 +0200
committerKarel Kočí <cynerd@email.cz>2022-06-10 14:14:22 +0200
commitc5510367db582d1c0683f182dd0e151ea0ab3b5f (patch)
treee43d7d6a4eae8d586ac8b43ef436ae178465bcfe /config/i3blocks/scripts/iface
parent3c905d717a331b9be6d7036624378d0617234a82 (diff)
downloadmyconfigs-c5510367db582d1c0683f182dd0e151ea0ab3b5f.tar.gz
myconfigs-c5510367db582d1c0683f182dd0e151ea0ab3b5f.tar.bz2
myconfigs-c5510367db582d1c0683f182dd0e151ea0ab3b5f.zip
Improvements for NixOS
Diffstat (limited to 'config/i3blocks/scripts/iface')
-rwxr-xr-xconfig/i3blocks/scripts/iface2
1 files changed, 1 insertions, 1 deletions
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