#!/bin/sh # This script displays Internet DL/UL speed, external and internal IP address in a single row # Dependencies: `speedtest-cli`, `bind-tools` (Arch) or `dnsutils` (Debian) # Author: Piotr Miller # e-mail: nwg.piotr@gmail.com # Website: http://nwg.pl # Project: https://github.com/nwg-piotr/tint2-executors # License: GPL3 IP="sudo /usr/sbin/ip" spd=$(speedtest-cli --simple) dl=$(echo $spd | awk '{print $5}') ul=$(echo $spd | awk '{print $8}') #w=$(dig +short myip.opendns.com @resolver1.opendns.com) #l=$($IP addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') notify-send "$spd" # Log results to the text file date "+%d-%m-%y %H:%M" >> ~/Documents/speedtest.log echo $spd >> ~/Documents/speedtest.log