diff options
author | Jesús <heckyel@hyperbola.info> | 2020-05-28 17:26:30 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-05-28 17:26:30 -0500 |
commit | a52c3dfb53421b01aaec59d3f9998214e1a02c8d (patch) | |
tree | 6ad61b387a2960d457ddb9a4f84625496030c5bb | |
parent | 656ce2b41622fec1600784abbbfc9a1acfa92ce9 (diff) | |
download | i3-config-a52c3dfb53421b01aaec59d3f9998214e1a02c8d.tar.lz i3-config-a52c3dfb53421b01aaec59d3f9998214e1a02c8d.tar.xz i3-config-a52c3dfb53421b01aaec59d3f9998214e1a02c8d.zip |
iface: not get ip route
-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 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 ;; |