aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/i3blocks/iface2
1 files changed, 1 insertions, 1 deletions
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 ;;