speedtest-cli >> speedtest.txt

Lately I needed data on my internet connection speed over time. This could be done as a Tint2 executor. All you need is the speedtest-cli package and a simple bash script to be called from Tint2.

screenshot

Step 1:

Install the speedtest-cli package (Arch Community repo).

Step 2:

Save this as ~/scripts/speedtest.sh and make executable:

#!/bin/bash
spd=$(/bin/sh -c "speedtest-cli --server 2109 --simple")
if [ ! -z "$spd" ]
then
    notify-send "$spd"
    date "+%d-%m-%y %H:%M" >> ~/speedtest.txt
    echo $spd >> ~/speedtest.txt
else
    notify-send "Failed measuring speed"
fi

Step 3:

Add the executor to the ~/.config/tint2/tint2rc file:

#-------------------------------------
# Executor 3
execp = new
execp_command = ~/scripts/./speedtest.sh
execp_interval = 1800
execp_has_icon = 0
execp_cache_icon = 1
execp_continuous = 0
execp_markup = 1
execp_lclick_command = 
execp_rclick_command = 
execp_mclick_command = 
execp_uwheel_command = 
execp_dwheel_command = 
execp_font_color = #000000 100
execp_padding = 0 0
execp_background_id = 0
execp_centered = 0
execp_icon_w = 0
execp_icon_h = 0

...or simply open Tint2 settings, enter command ~/scripts/./speedtest.sh and desired check interval.

Results will be stored in the ~/speedtest.txt file.