#!/bin/zsh

# This script will check the internet speed usingn iperf3 and log the results to a file
# The script will run every 5 minutes

# Sget speed test results
 #speedtest=$(iperf3 -c 192.168.1.37 -p 5201 -f M | grep sender | awk '{print $7}')ç
speedtest=$(speedtest |grep 'Download\|Upload')
download=$(echo $speedtest| grep 'Download' | awk '{print $3,$4}')
echo "⬇ $download" > $HOME/.config/waybar/scripts/down.txt
