X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=lib%2Flogin_functions.sh;h=ec040cb6b12412c6468024333e72d54ce1449088;hb=0136ca23d40181f1fad3dd145586ee2d84bd6a22;hp=add0cd034f7f3843097bcf3ddb1b4bc90dc575fd;hpb=c45bdb58ae8265857b990931e5584ee88beb6888;p=khome.git diff --git a/lib/login_functions.sh b/lib/login_functions.sh index add0cd0..ec040cb 100644 --- a/lib/login_functions.sh +++ b/lib/login_functions.sh @@ -1,4 +1,5 @@ # Top Disk-Using directories +# TODO: Consider using numfmt instead of awk tdu() { du "$1" \ | sort -n -k 1 -r --parallel="$(nproc)" \ @@ -34,7 +35,7 @@ man() { } experiment() { - cd "$($HOME/bin/experiment $@)" + cd "$($HOME/bin/experiment $@)" || exit 1 } hump() { @@ -42,7 +43,7 @@ hump() { } howto() { - cat $(ls -1 -d $HOME/Archives/Documents/HOWTOs/* | fzf) + cat "$(find ~/Archives/Documents/HOWTOs -mindepth 1 -maxdepth 1 | sort | fzf)" } gh_fetch_repos() { @@ -72,9 +73,9 @@ $(date +%F) Morning report -------------- -### Yesterday +### Previous -### Today +### Current ### Blockers @@ -97,3 +98,15 @@ work_log() { weather() { curl "http://wttr.in/$WEATHER_LOCATION" } + +bt_devs_paired() { + bluetoothctl -- paired-devices \ + | awk '{print $2}' \ + | xargs bluetoothctl -- info +} + +bt_devs() { + bluetoothctl -- devices \ + | awk '{print $2}' \ + | xargs bluetoothctl -- info +}