X-Git-Url: https://git.danix.xyz/?a=blobdiff_plain;f=oldies%2Fexecutors%2Finet;fp=oldies%2Fexecutors%2Finet;h=276a357a58a33bf444fc6f01ab6fa7d106440738;hb=7abef725078fc52196b630c95f354fb58864c743;hp=0000000000000000000000000000000000000000;hpb=6be4fcd546b01b14b5f06306ab5b7c0391913bfa;p=my-dotfiles.git diff --git a/oldies/executors/inet b/oldies/executors/inet new file mode 100755 index 0000000..276a357 --- /dev/null +++ b/oldies/executors/inet @@ -0,0 +1,24 @@ +#!/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 \ No newline at end of file