mass update.
[my-dotfiles.git] / oldies / executors / inet
diff --git a/oldies/executors/inet b/oldies/executors/inet
new file mode 100755 (executable)
index 0000000..276a357
--- /dev/null
@@ -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