From a52c3dfb53421b01aaec59d3f9998214e1a02c8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 28 May 2020 17:26:30 -0500 Subject: [PATCH] iface: not get ip route --- scripts/i3blocks/iface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/i3blocks/iface b/scripts/i3blocks/iface index 46e78bc..30ccd9a 100755 --- a/scripts/i3blocks/iface +++ b/scripts/i3blocks/iface @@ -54,7 +54,7 @@ then fi # Check local ip address -IPADDR=$(ip route get 4.2.2.1 | awk '{print $NF;exit}') +IPADDR=$(ip -f inet addr show dev "$IF" | sed -n 's/^ *inet *\([.0-9]*\).*/\1/p') case $BLOCK_BUTTON in 3) echo -n "$IPADDR" | xclip -q -se c ;;