Re-arrange redirections for better parallelism
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 16 Aug 2018 16:33:57 +0000 (12:33 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 16 Aug 2018 16:33:57 +0000 (12:33 -0400)
bin/khatus
bin/khatus_bar
bin/khatus_monitor_energy
bin/khatus_monitor_errors

index 283ef31..e33aa87 100755 (executable)
@@ -209,16 +209,21 @@ main() {
     fork_poller "${opts['--interval_inp_mem']}"        "$perf" "$pipe" "$bin" "$cmd_sens_memory"
 
     stdbuf -o L tail -f "$pipe" \
-    | stdbuf -o L "$bin"/khatus_bar \
-        -F "$MSG_FS" \
-        -v opt_debug=""${opts['--debug']}"" \
-        -v opt_mpd_song_max_chars=10 \
-        -v opt_net_interfaces_to_show="${opts['--net_interfaces_to_show']}" \
-        -v opt_pulseaudio_sink="${opts['--pulseaudio_sink']}" \
-    | stdbuf -o L tee >("$bin"/khatus_actuate_status_bar_to_xsetroot_name) \
-    | stdbuf -o L "$bin"/khatus_monitor_energy \
-    | stdbuf -o L "$bin"/khatus_monitor_errors \
-    | stdbuf -o L tee >("$bin"/khatus_actuate_alert_to_notify_send) \
+    | stdbuf -o L tee \
+        >(stdbuf -o L "$bin"/khatus_bar \
+            -F "$MSG_FS" \
+            -v opt_debug=""${opts['--debug']}"" \
+            -v opt_mpd_song_max_chars=10 \
+            -v opt_net_interfaces_to_show="${opts['--net_interfaces_to_show']}" \
+            -v opt_pulseaudio_sink="${opts['--pulseaudio_sink']}" \
+        | "$bin"/khatus_actuate_status_bar_to_xsetroot_name \
+        ) \
+        >(stdbuf -o L "$bin"/khatus_monitor_energy \
+        | "$bin"/khatus_actuate_alert_to_notify_send \
+        ) \
+        >(stdbuf -o L "$bin"/khatus_monitor_errors \
+        | "$bin"/khatus_actuate_alert_to_notify_send \
+        ) \
     > /dev/null
 
 }
index e2e505c..0db3e0b 100755 (executable)
@@ -23,9 +23,6 @@ $2 == "khatus_sensor_datetime" {
     print_msg_ok("status_bar", make_status_bar())
 }
 
-# Let everything else through
-//
-
 # -----------------------------------------------------------------------------
 # Data
 # -----------------------------------------------------------------------------
index a295e3e..f0f9f85 100755 (executable)
@@ -53,9 +53,6 @@ $3 == "battery_percentage" {
     }
 }
 
-# After peeking, let everything pass through!
-//
-
 function alert(priority, subject, body) {
     # priority : "low" | "med" | "hi"
     # subject  : no spaces
index 459b0ea..5f3f3b1 100755 (executable)
@@ -17,9 +17,6 @@ BEGIN {
     alert("hi", "Error_in_" src, body)
 }
 
-# After peeking, let everything pass through!
-//
-
 function alert(priority, subject, body) {
     # priority : "low" | "med" | "hi"
     # subject  : no spaces
This page took 0.032474 seconds and 4 git commands to generate.