diff options
author | NeodarZ <neodarz@neodarz.net> | 2018-02-04 23:59:51 +0100 |
---|---|---|
committer | NeodarZ <neodarz@neodarz.net> | 2018-02-04 23:59:51 +0100 |
commit | c42cf7f58b2705874ee2746bee2a69000359299e (patch) | |
tree | 3ef07579e6991550acdfb52079d495a5116d78d5 | |
parent | bfecc0f8ef310879c84fa32e13c30c35169b7ab8 (diff) | |
download | dotfiles_ascii-c42cf7f58b2705874ee2746bee2a69000359299e.tar.xz dotfiles_ascii-c42cf7f58b2705874ee2746bee2a69000359299e.zip |
Add myip script
Diffstat (limited to '')
-rwxr-xr-x | scripts/.scripts/ip.sh | 11 | ||||
-rwxr-xr-x | zsh/.zsh/aliases.zsh | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/scripts/.scripts/ip.sh b/scripts/.scripts/ip.sh new file mode 100755 index 0000000..547c451 --- /dev/null +++ b/scripts/.scripts/ip.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# sudo apt install dnsutils jq && sudo -H pip3 install speedtest-cli + +myip=$(dig +short myip.opendns.com @resolver1.opendns.com) +geoip=$(curl -s ipinfo.io/"$myip" | jq -r '[.country, .city] | join(", ")') + +echo "$myip ($geoip)" +speedtest-cli --simple --secure + +exit 0 + diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh index 95fb0a4..11327a1 100755 --- a/zsh/.zsh/aliases.zsh +++ b/zsh/.zsh/aliases.zsh @@ -158,6 +158,7 @@ alias tlol="printf '\033k┐(^0^)┌\033\\'" alias search="~/.scripts/searx.sh" alias history="IFS=\$'\\n'; for line in \$(cat ~/.zhistory); do echo \$(date --rfc-3339=ns -d @\$(echo \$line | cut -d' ' -f2 | cut -d':' -f1 | grep -e '^[0-9]') | cut -d'.' -f1)' : '\$(echo \$line | cut -d' ' -f2- | cut -d';' -f2-); done" alias historyt="cat .zhistory | cut -d' ' -f2- | cut -d';' -f2- | awk '{CMD[\$1]++;count++;}END { for (a in CMD)print CMD[a] \" \" CMD[a]/count*100 \"% \" a;}' | grep -v \"./\" | column -c3 -s \" \" -t | sort -nr | nl | head -n10" +alias myip="~/.scripts/ip.sh" #█▓▒░ update mpd database #function genplaylist() { |