diff options
author | Jesús <heckyel@hyperbola.info> | 2021-09-05 13:59:36 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-09-05 13:59:36 -0500 |
commit | c71f7c57301f468bc48567591071bcbe258083a9 (patch) | |
tree | d3c5842b7888bcba30f726bd37ac9352cdfcf2bf | |
parent | 3e571bc3ce26a2b02d310f0df546c18ea893913a (diff) | |
download | i3-config-c71f7c57301f468bc48567591071bcbe258083a9.tar.lz i3-config-c71f7c57301f468bc48567591071bcbe258083a9.tar.xz i3-config-c71f7c57301f468bc48567591071bcbe258083a9.zip |
i3blocks: replace `route` command with `ip route`
-rwxr-xr-x | scripts/i3blocks/vpn | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/i3blocks/vpn b/scripts/i3blocks/vpn index d701056..dbaed98 100755 --- a/scripts/i3blocks/vpn +++ b/scripts/i3blocks/vpn @@ -3,7 +3,7 @@ INSTANCE="${BLOCK_INSTANCE:-}" # Check VPN status -GET_VPN=$(route | grep -E -- "tun0|$INSTANCE" | awk '{ print $NF }') +GET_VPN=$(ip route | grep -E -- "tun0|$INSTANCE" | awk '{ print $3 }') # Store status if [[ $GET_VPN == *"tun0"* || $GET_VPN == "$INSTANCE" ]] |