X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Flib%2Flogin_functions.sh;h=dbde37370e285b78f74e81123d46804975ef349b;hb=76b7ee108859ca2bd730297142b1d6ed73bfe053;hp=7460622dadd78e0c2a6f60b3e2d033c1fbbdcf0c;hpb=4eb99bdc3a9f5bb36195c03f479a59aeb4b0102a;p=khome.git diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 7460622..dbde373 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -149,8 +149,7 @@ tdu() { sub("^" $1 "\t+", "", path) gb = size / 1024 / 1024 printf("%f\t%s\n", gb, path) - }' \ - | cut -c 1-115 + }' } # Top Disk-Using Files @@ -234,7 +233,7 @@ hump() { } howto() { - cat "$(find ~/Archives/Documents/HOWTOs -mindepth 1 -maxdepth 1 | sort | fzf)" + cat "$(find ~/arc/doc/HOWTOs -mindepth 1 -maxdepth 1 | sort | fzf)" } _yt() { @@ -428,6 +427,10 @@ flat_top_5() { ' } +internet_addr() { + curl --silent --show-error --max-time "${1:=1}" 'https://api.ipify.org' 2>&1 +} + status_batt() { case "$(uname)" in 'Linux') @@ -537,6 +540,8 @@ status() { echo echo 'net' + echo "${indent_unit}internet" + echo "${indent_unit}${indent_unit}$(internet_addr 0.5)" echo "${indent_unit}if" (ifconfig; iwconfig) 2> /dev/null \ | awk '