The first line of iostat(8) displays the stats from the time of the
last reboot.  Wouldn't it be more interesting to see the current stats
in the bar, and therefore use the second line?


Index: x11/spectrwm/Makefile
===================================================================
RCS file: /cvs/ports/x11/spectrwm/Makefile,v
retrieving revision 1.36
diff -u -p -u -p -r1.36 Makefile
--- x11/spectrwm/Makefile       23 Jan 2021 18:34:17 -0000      1.36
+++ x11/spectrwm/Makefile       24 Jan 2021 13:05:45 -0000
@@ -8,7 +8,7 @@ GH_PROJECT=             spectrwm
 GH_TAGNAME=            SPECTRWM_${V:S/./_/g}
 DISTNAME=              ${GH_PROJECT}-${V}
 
-REVISION=              0
+REVISION=              1
 
 SHARED_LIBS=           swmhack 1.0
 
Index: x11/spectrwm/patches/patch-baraction_sh
===================================================================
RCS file: x11/spectrwm/patches/patch-baraction_sh
diff -N x11/spectrwm/patches/patch-baraction_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ x11/spectrwm/patches/patch-baraction_sh     24 Jan 2021 13:05:45 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: baraction.sh
+--- baraction.sh.orig
++++ baraction.sh
+@@ -84,7 +84,7 @@ print_bat() {
+ APM_DATA=""
+ I=0
+ while :; do
+-      IOSTAT_DATA=`/usr/sbin/iostat -C | grep '[0-9]$'`
++      IOSTAT_DATA=`/usr/sbin/iostat -C -c 2 | tail -n 1 | grep '[0-9]$'`
+       if [ $I -eq 0 ]; then
+               APM_DATA=`/usr/sbin/apm -alb`
+       fi

Reply via email to