improvements
[distro-setup] / system-status
index 477eade3a72ebeca68bd77dbd367b565b6417de4..2dd39ca7d99a90c88ccc9bddf7e51a49f37535cf 100644 (file)
@@ -53,6 +53,13 @@ write-status() {
     fi
   fi
 
+  if pgrep -f 'emacs --daemon' &>/dev/null; then
+    emacsfiles="$(emacsclient --eval "$(cat /a/bin/ds/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")