LemonBoy / bar

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

Reload "modules" on signal RTMIN #226

Closed sampaio23 closed 4 years ago

sampaio23 commented 4 years ago

Hi!

Suppose I have a script in which I create some modules, like:

volume() { echo "something" }
clock() { echo "date +%H:%M:%S" }
ip4addr() { echo "something else" }

and I want to put them in my bar, like:

while true; do
    BAR_INPUT="$(ip4addr) | Volume: $(volume) | $(clock)"
    echo $BAR_INPUT
    sleep 1000
done

In this case:

Is there a way to do this?

Thanks in advance! Best regards!

domsson commented 4 years ago

You could take a look at Captain for some advanced shell script that does just that.