misc fixes and improvements
[distro-setup] / system-status
index 477eade3a72ebeca68bd77dbd367b565b6417de4..8e24d8fbadec4d40bbf7e1b1def062ff6dea9621 100644 (file)
@@ -53,6 +53,29 @@ write-status() {
     fi
   fi
 
+
+  if ip l show tunfsf &>/dev/null; then
+    # this is for tracking dns over tls issue, which
+    # fixvpndns() in brc2 fixes.
+    stat=$(resolvectl dnsovertls tunfsf 2>/dev/null ||: )
+    read _ _ _ istls <<<"$stat"
+    case $istls in
+      no) : ;;
+      *)
+        printf "%s\n" "$istls" | ts >> /tmp/istls.log
+        chars+=("T:$istls")
+        ;;
+    esac
+  fi
+
+
+  if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
+    emacsfiles="$(emacsclient --eval "$(cat /usr/local/bin/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')"
+    if [[ $emacsfiles ]]; then
+      chars+=("$emacsfiles")
+    fi
+  fi
+
   glob=(/nocow/btrfs-stale/*)
   if [[ -e ${glob[0]} ]]; then
     chars+=("STALE")
@@ -144,6 +167,7 @@ write-status() {
         fi
 
         for d in /a/bin/distro-setup /p/c; do
+          [[ -d $d ]] || continue
           cd $d
           if [[ ! -e .git ]]; then
             # some hosts i dont push all of /p/c