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