Closed domsson closed 3 years ago
I was playing with this some more and suspect that 1. and 2. apply. In other words, I now believe I'm not using the format options correctly because I didn't understand the documentation correctly.
From what I can tell, O
doesn't work like B
, F
or T
, in that it doesn't affect the text that follows, but instead it simply adds empty space of the given amount in the exact spot you place it.
Example:
echo "%{l O8}LEFT%{O8}%{c O8}CENTER%{O8}%{r O8}RIGHT%{O8}" | lemonbar -p
Or simpler:
echo "%{l O8}LEFT%{c}CENTER%{r}RIGHT%{O8}" | lemonbar -p
Yes, the oN
is handled as if a character of width N
was drawn.
We can offset text via the
O
format option. The documentation says:I'm not quite sure what this would mean for centered text, but for left and right aligned text, I expected the offset would happen on opposite sides, respectively (either offset the left aligned text to the left and the right aligned text to the right, or vice versa).
However, this does not seem to be the case. Consider this simple example:
The result is as follows (magnified by a factor of 2 so it is easier to inspect):
I colored the left and right half of the background so it becomes easy to inspect the centered text:
We can see that:
How can this be explained?