lots: shellcheck, streaming stuff, fixes
[distro-setup] / myi3status
index 189e9f03ab7e6034106a26d3f53755a0a5fa2b6d..fbeeabddf12d1b8a299c3b097573cbaed8d1758f 100755 (executable)
@@ -155,6 +155,13 @@ main() {
     ps_char="=======FOCUS====== $ps_char"
   fi
 
+  if [[ -e /tmp/iank-i3-no-auto ]]; then
+    ps_char="$ps_char I"
+  fi
+  if [[ -e /tmp/no-obs-auto-scene-switch ]]; then
+    ps_char="$ps_char O"
+  fi
+
 
   printf '{ "name":"status", "color":"#ED297D", "full_text": "%s' "$ps_char"
   printf '"},'
@@ -294,9 +301,13 @@ if (( $# )); then
 else
   printf '{ "version": 1, "click_events": true }\n['
   while true; do
-    main
-    line=
-    read -r -t 3 line ||:
+    if [[ -e /tmp/noi3bar ]]; then
+      sleep 10
+    else
+      main
+      line=
+      read -r -t 3 line ||:
+    fi
   done
 fi