i3blocks-contrib
i3blocks-contrib copied to clipboard
bandwidth3 does not accept properties in the config file
Expected behavior
I have the following code in my i3blocks config file:
[bandwidth3]
command=/usr/lib/i3blocks/bandwidth3/bandwidth3
interval=persist
color=#33FFFF
color=#00CCCC
markup=pango
# LABEL=<span font='FontAwesome'> </span>
LABEL=blabla
unit=MB
I would expect both the units and label of the bandwidth block to represent what I have in the config file, namely "MB" and "blabla". This is not happening, it seems like it is hard coded in the bandwidth3 script?
I am using i3blocks 1.5-3.
according to what I see in 'bandwidth3' code: parameter UNIT
must be capped. unit
is an internal variable that is set to either UNIT
's value or a default 'Mb' regardless of unit
's initial value.
'LABEL' won't work, that's true.
Thanks for replying @skidnik. What do you mean by "capped"? I tried doing "UNIT=MB" and it still doesn't work.
@qazip
What do you mean by "capped"?
Yeah, sorry for weird language, means name of variable must be uppercase. There's also a quite long case
statement in the block script taking in account all variants like 'Mb', 'MB', 'mb' and more, so the value may not be that strict.
Check the bandwidth3 code, it's bash and some awk, may become more clear how it works.
Well yes, but I tried doing "UNIT=MB" and it still doesn't work. What am I doing wrong? Does it work correctly on your side?
Have you restarted i3 after changing the i3blocks.conf, you need to in order to apply config changes to the subject block as it's a persistent one.
Yes, I have restarted i3 after making the changes. It doesn't work.
Yes, I have restarted i3 after making the changes. It doesn't work.
I am out of ideas now. On my side the blocklet responds correctly to both 'LABEL' and 'UNIT' variables' changes.
i3blocks 1.5, Fedora 30.
I have same problem too.