Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bandwidth3 does not accept properties in the config file #267

Open
qazip opened this issue Oct 4, 2019 · 8 comments
Open

bandwidth3 does not accept properties in the config file #267

qazip opened this issue Oct 4, 2019 · 8 comments

Comments

@qazip
Copy link

qazip commented Oct 4, 2019

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.

@skidnik
Copy link
Contributor

skidnik commented Oct 8, 2019

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.

@qazip
Copy link
Author

qazip commented Oct 9, 2019

Thanks for replying @skidnik. What do you mean by "capped"? I tried doing "UNIT=MB" and it still doesn't work.

@skidnik
Copy link
Contributor

skidnik commented Oct 9, 2019

@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.

@qazip
Copy link
Author

qazip commented Oct 15, 2019

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?

@skidnik
Copy link
Contributor

skidnik commented Oct 16, 2019

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.

@qazip
Copy link
Author

qazip commented Oct 16, 2019

Yes, I have restarted i3 after making the changes. It doesn't work.

@skidnik
Copy link
Contributor

skidnik commented Oct 16, 2019

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.

@LinArcX
Copy link

LinArcX commented Nov 30, 2019

I have same problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants