first push of my config files
[my-dotfiles.git] / bin / executors / inet
CommitLineData
fdd76fc5 1#!/bin/sh
2
3# This script displays Internet DL/UL speed, external and internal IP address in a single row
4# Dependencies: `speedtest-cli`, `bind-tools` (Arch) or `dnsutils` (Debian)
5
6# Author: Piotr Miller
7# e-mail: nwg.piotr@gmail.com
8# Website: http://nwg.pl
9# Project: https://github.com/nwg-piotr/tint2-executors
10# License: GPL3
11
12IP="sudo /usr/sbin/ip"
13spd=$(speedtest-cli --simple)
14dl=$(echo $spd | awk '{print $5}')
15ul=$(echo $spd | awk '{print $8}')
16
17#w=$(dig +short myip.opendns.com @resolver1.opendns.com)
18#l=$($IP addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
19
20notify-send "$spd"
21
22# Log results to the text file
23date "+%d-%m-%y %H:%M" >> ~/Documents/speedtest.log
24echo $spd >> ~/Documents/speedtest.log