3

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:

#!/bin/bash

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

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

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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .