dzen
dzen copied to clipboard
Y-Positioning is Broken
See the following input strings:
^r(5x6)^p(;5)^r(5x6)
^r(5x8)^p(;4)^r(5x8)
^r(5x12)^p(;2)^r(5x12)
All of them draw two rectangles at the same height. The y-position to achieve this (apart from leaving the positioning out obviously) seems very random. This makes it impossible to draw vertical progress bars.
I tried following, I am not sure, why ^(p;26)
is needed for correct alignment; I expected it to be ^p(;24)
; must be that default margin of 1 pixel. You notice that I substracted the hight from the next rectangle from the one before to get the relative positioning for the next rectangle. I colorized the third rectangle just for testing.
# 8-20=-12 20-38=-18 and so on
echo "^p(;26)^r(5x8)^p(;-12)^r(5x20)^p(;-18)^fg(#ff0000)^r(5x38)^p(;24)^fg()^r(5x10)" | dzen -h 48 -p
I wonder, if "_LOCK_X" can help. Can't get it to work.
Yes, substracting the height of the current rectangle from the previous one is what i tried as well. The ^p(;26)
is indeed curious. Were you able to get it to work for any other initial height? I played around a bit but had no luck.
Because I am using a vertical panel with horizontal bars, I can use absolute positioning with ^pa()
, and never had a problem with it.
Maybe someone who uses relative positioning more regularly can help here.