diff options
-rwxr-xr-x | scripts/i3blocks/iface | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/i3blocks/iface b/scripts/i3blocks/iface index 30ccd9a..a6703f4 100755 --- a/scripts/i3blocks/iface +++ b/scripts/i3blocks/iface @@ -54,7 +54,7 @@ then fi # Check local ip address -IPADDR=$(ip -f inet addr show dev "$IF" | sed -n 's/^ *inet *\([.0-9]*\).*/\1/p') +IPADDR=$(ip route get 4.2.2.1 | grep -oE "src [.0-9]+" | awk '{print $NF;exit}') case $BLOCK_BUTTON in 3) echo -n "$IPADDR" | xclip -q -se c ;; |