X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Flib%2Flogin_functions.sh;h=d60b915500158946f73bc8989a6f18377dbd43a5;hb=fc2ae05b336ff2adf2569a08b9e66d0be2f7820e;hp=1eaf4d67ef421e4f442f33d8c6825f742b67236d;hpb=4b5a29773ec52a54b65dc9959268cdaefaf27258;p=khome.git diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 1eaf4d6..d60b915 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -140,8 +140,8 @@ top_commands() { # TODO: Consider using numfmt instead of awk tdu() { du "$1" \ - | sort -n -k 1 -r \ - | head -50 \ + | sort -n -k 1 \ + | tail -50 \ | awk ' { size = $1 @@ -156,8 +156,8 @@ tdu() { # Top Disk-Using Files tduf() { find "$1" -type f -printf '%s\t%p\0' \ - | sort -z -n -k 1 -r \ - | head -z -n 50 \ + | sort -z -n -k 1 \ + | tail -z -n 50 \ | gawk -v RS='\0' ' { size = $1 @@ -206,12 +206,22 @@ void_pkgs() { # Colorful man man() { + # mb: begin blink + # md: begin bold + # me: end bold, blink and underline + # + # so: begin standout (reverse video) + # se: end standout + # + # us: begin underline + # ue: end underline + LESS_TERMCAP_md=$'\e[01;31m' \ LESS_TERMCAP_me=$'\e[0m' \ - LESS_TERMCAP_se=$'\e[0m' \ LESS_TERMCAP_so=$'\e[01;44;33m' \ - LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ LESS_TERMCAP_us=$'\e[01;32m' \ + LESS_TERMCAP_ue=$'\e[0m' \ command man "$@" } @@ -312,7 +322,12 @@ note() { } weather() { - curl "http://wttr.in/$WEATHER_LOCATION" + local _weather_location + case "$1" in + '') _weather_location="$WEATHER_LOCATION";; + *) _weather_location="$1" + esac + curl "http://wttr.in/$_weather_location" } bt_devs_paired() {