Possible off-by-one in baraction output when used in a "section"
levaidaniel opened this issue · comments
When I put my +A
output in bar_format
after a +|
section, the last character gets chipped off.
E.g.:
bar_format = +A
vs.
bar_format = +|3L+A
When using the latter, the last character from the external script's output is missing.
Version is latest commit on master
.
Tried the following on df5f576 and was unable to reproduce the issue you describe ("test" is printed in full):
spectrwm.conf:
bar_action = ~/bin/baraction_debug.sh
bar_format = +|3L+A
baraction_debug.sh:
#!/bin/sh
while :; do
echo "test"
sleep 5
done
It seems there is something more needed to reproduce the issue e.g. font, specific script output, etc.
Ah yes, I was afraid it might come down to something like this.
Here's my bar_*
config:
bar_enabled = 1
bar_font = xos4 Terminus:pixelsize=14,xos4 Terminus:pixelsize=20:bold,Ubuntu Mono:pixelsize=16
bar_font_color = rgb:999/999/999,rgb:000/000/000
bar_font_color_unfocus = rgb:999/999/999,rgb:999/999/999
bar_color = rgb:000/000/000,rgb:999/999/999
bar_color_unfocus = rgb:000/000/000,rgb:000/000/000
bar_action = ~/bin/spectrwm_baraction.sh
bar_format = +V +N:+I+S{+M} *+U*+4<%Y.%m.%d[%V] %a+2<%Z%z %T+10<+@fn=1;+@bg=1;+@fg=1;hostname+@stp;+|L+A+|T+F+W|+C:+T
And I've simplified my baraction script; this is the kind of output I'm getting from the various functions inside:
#!/bin/sh
while :; do
echo '0+ U03 S04 N00 I00 92 Z1842 C44/41/27/54 M3 XXXXXXX|60 MLow Kok {Eng}[Num]'
sleep 5
done
With this, the last ]
character is missing. If I remove the +|L
from before +A
in bar_format
, then - it's color is messed up 😃 , but - it's there.
Another weird thing that's possibly related, is that if I have only this in my baraction script:
while sleep 1;do
echo 'abc+def'
done
... the output varies between abc++de
and abc+def
, depending on what bar_action_expand
is set to - 0 and 1, respectively. And according to spectrwm(1)
its default is 0.