LemonBoy / bar

A featherweight, lemon-scented, bar based on xcb
MIT License
1.62k stars 194 forks source link

-n argument for panel name garbles text #184

Closed rohshall closed 7 years ago

rohshall commented 8 years ago

When I invoke lemonbar with -n bspwm_panel, it periodically garbles text. However, if I remove this argument, it works. The relevant diff in my bspwm config is: ` -panel_bar | lemonbar -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" | sh &

+panel_bar | lemonbar -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" | sh & I am using the latest version in the git repository. I have just a few programs writing to the FIFO. bspc subscribe report > "$PANEL_FIFO" &

xtitle -sf 'T%s' > "$PANEL_FIFO" &

/usr/local/bin/clock -sf 'S%a %m/%d %H:%M' > "$PANEL_FIFO" &

battery -n1 -sf"B%i" > "$PANEL_FIFO" & `

LemonBoy commented 8 years ago

Sigh, the latest commit should fix the problem

otommod commented 8 years ago

A slightly irrelevant question:

Can these both be correct? I don't have a multihead setup (in fact, I'm not even using lemonbar right now), so I can't actually test.

LemonBoy commented 8 years ago

It's a bug indeed, thanks for reporting it :)

rohshall commented 8 years ago

Actually, it's not working correctly for me, even if I remove the "-n" argument. My understanding is programs that write to FIFO don't have to write all values in every line. So, my battery or clock scripts can just write their own values at appropriate positions keeping the other values blank and lemonbar will aggregate these values while drawing the bar. If this is the case, the text is getting garbled now.

LemonBoy commented 8 years ago

Well, the -n option shouldn't affect how text is parsed at all...