LemonBoy/bar

panel appends output meant for left and right part to the center part

rohshall opened this issue · 1 comments

I am using bspwm with lemonbar, with usual config:

Output to the FIFO

bspc subscribe report > "$PANEL_FIFO" &
xtitle -sf 'T%s' > "$PANEL_FIFO" &
clock -sf 'S%a %H:%M' > "$PANEL_FIFO" &

panel_bar - parses this data and constructs data to be output to lemonbar

 S*)
                        # clock output
                        sys="%{F$COLOR_SYS_FG}%{B$COLOR_SYS_BG} ${line#?} %{B-}%{F-}"
                        ;;
T*)
                        # xtitle output
                        title="%{F$COLOR_TITLE_FG}%{B$COLOR_TITLE_BG} ${line#?} %{B-}%{F-}"
                        ;;
W*)
                        # bspwm's state
                        wm=""

        printf "%s\n" "%{l}${wm}%{c}${title}%{r}${sys}"

panel_bar < "$PANEL_FIFO" | lemonbar -a 32 -n "$PANEL_WM_NAME" -g x$PANEL_HEIGHT -f "$PANEL_FONT" -F "$COLOR_DEFAULT_FG" -B "$COLOR_DEFAULT_BG" | sh &

As you can see from the first screenshot, the lemonbar panel shows the clock output just after the title (as part of the center text), and also at the right.
When I move my mouse pointer closer to the title, it also appends the output means for the left part (bspwm state) to the center part. The second screenshot shows the bspwm output appended to the center text (window tile).

screenshot from 2017-02-14 13-47-37
screenshot from 2017-02-14 14-19-57

My lemonbar version is 1.2-2.

And my system is Ubuntu:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="17.04 (Zesty Zapus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Zesty Zapus (development branch)"
VERSION_ID="17.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="http://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=zesty
UBUNTU_CODENAME=zesty

I see that what gets concatenated to the title is the result of S%a %H:%M (note the S) so I'm inclined to say the problem lies in your script.