diff options
author | Jesús <heckyel@hyperbola.info> | 2020-05-31 23:17:04 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-05-31 23:17:04 -0500 |
commit | 343e89812a2e94fc5e0dd0e3a11401ce7cf2ef73 (patch) | |
tree | 348466cad6093d6dd519556cdd27306a2020176c | |
parent | a500fa42b859cf2b1534670aa4b5abd1c0db2f9c (diff) | |
download | i3-config-343e89812a2e94fc5e0dd0e3a11401ce7cf2ef73.tar.lz i3-config-343e89812a2e94fc5e0dd0e3a11401ce7cf2ef73.tar.xz i3-config-343e89812a2e94fc5e0dd0e3a11401ce7cf2ef73.zip |
iface: improve extract ip
-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 ;; |