Replace ls with find in the howto function
[khome.git] / lib / login_functions.sh
index 8488f4f..ec040cb 100644 (file)
@@ -35,7 +35,7 @@ man() {
 }
 
 experiment() {
-    cd "$($HOME/bin/experiment $@)"
+    cd "$($HOME/bin/experiment $@)" || exit 1
 }
 
 hump() {
@@ -43,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() {
@@ -98,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
+}
This page took 0.027278 seconds and 4 git commands to generate.