geommer / yabar

A modern and lightweight status bar for X window managers.
MIT License
681 stars 49 forks source link

Pass internal-* fields to exec-ed script/binary? #178

Open barisbalic opened 6 years ago

barisbalic commented 6 years ago

TLDR; I have written some tiny programs that output plain numbers and I'd like to set icons via the yabar.conf internal-prefix.

I've just come back to i3 and picked up yabar just this week, I think it's lovely, thank you very much for your efforts. To keep the config clean and simple I wrote a bunch of tiny utilities to output basic values for lots of things like network name, memory percentages, and so on. The problem I have is that I must embed any icons I want to use in the output, as there is no way to inject them. Wouldn't it make sense to append internal-* to the to the exec-ed command? This would allow any script/binary to make use of them.

Ma27 commented 6 years ago

just to get this right: you want to be able to access values like internal-prefix as variables in an exec-ed script in an indicator, right? That sounds indeed interesting, when I find sufficient time for that, I'll open a PR for this :)

NBonaparte commented 6 years ago

I think this is a duplicate of #45.

barisbalic commented 6 years ago

@Ma27 that's exactly what I was hoping for!

@NBonaparte I guess to some extent it is, although I'd argue that all options/params/args should be passed, rather than just the prefix. I'll admit I did not see that issue before creating this one.