diff --git a/.tmux/plugins/tmux-ip-address/scripts/ip_address.sh b/.tmux/plugins/tmux-ip-address/scripts/ip_address.sh index 11d1c04..4665f9e 100755 --- a/.tmux/plugins/tmux-ip-address/scripts/ip_address.sh +++ b/.tmux/plugins/tmux-ip-address/scripts/ip_address.sh @@ -5,7 +5,7 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/helpers.sh" print_ip_address() { - local ip_address=$(curl --max-time 1.5 --silent http://ip.me) + local ip_address=$(curl --max-time 2 --silent http://ip.me) echo ${ip_address} } diff --git a/.tmux/plugins/tmux-ip-address/scripts/update_ip_address.sh b/.tmux/plugins/tmux-ip-address/scripts/update_ip_address.sh index 2840f29..dbf409d 100755 --- a/.tmux/plugins/tmux-ip-address/scripts/update_ip_address.sh +++ b/.tmux/plugins/tmux-ip-address/scripts/update_ip_address.sh @@ -5,7 +5,6 @@ CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "$CURRENT_DIR/helpers.sh" ip_address="$($CURRENT_DIR/ip_address.sh)" -ip_address_interpolation_string="\#{ip_address}" do_interpolation() { local string="$1" @@ -15,7 +14,7 @@ do_interpolation() { ip_addr="Offline" fi - local interpolated="$(echo $1 | sed "s/$ip_address_interpolation_string/$ip_addr/g")" + local interpolated="$(echo $1 | sed "s/\(Offline\|[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\.[[:digit:]]\{1,3\}\)/$ip_addr/g")" echo "$interpolated" }