Skip to content

Commit

Permalink
restore network ping changes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpetretta committed May 28, 2024
1 parent fdaaa8b commit f7d2a68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/network_ping.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ source $current_dir/utils.sh
ping_function() {
case $(uname -s) in
Linux | Darwin)
# storing the hostname/IP in the variable PINGSERVER, default is google.com
pingserver=$(get_tmux_option "@monokai-ping-server" "google.com")
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2)
# storing the hostname/IP in the variable PINGSERVER, default is 1.1.1.1 (Cloudflare)
pingserver=$(get_tmux_option "@monokai-ping-server" "1.1.1.1")
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | cut -c1-2)
echo "$pingtime ms"
;;

Expand Down

0 comments on commit f7d2a68

Please sign in to comment.