I'm trying to pipe a bar script into lemonbar in bspwm.

In my bspwmrc I have:

~/.config/bspwm/lemonbar.sh | lemonbar -p 

lemonbar.sh contains:


clock() {
    date +%H:%M:%S

while true; do
    echo "%{c}$(clock)"
    sleep 1;

Everything works as expected, execpt when I exit bspwm I get:

line 12: echo: write error: Broken pipe

Obviously the error has something to do with the echo on line 12 but I can't figure out exactly what

1 Answer 1


I was unable to reproduce this issue. For me it is working. Make sure you put the script line at the end of bspwmrc and add a & at the end. You can see it working here.

I have my own setup with lemonbar. See at the top of the screen, time is echoed from your script and whenever I restart/exit from bspwm, I don't get some errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.