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
Fixes #387: Display WiFi signal strength in the net block #418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks :)
Besides the copied error message the code LGTM and works on my machine.
It's a bit inefficient because we may call iw several times to grep for some of its information, but I think it's fine since it doesn't happen a lot.
That's already the case for SSID and bitrate, I think it's fine to leave that up to a future refactoring. The there could be only one execution of iw
for all of them. That would also save the execution of sh
and sed
, but require more parsing in our code.
1a222a3
to
b545460
Compare
Thanks! |
Oh nice, it's already in. (fyi: network-manager gives out bars like |
@rsteube I have honestly no clues regarding the issue; a quick search seems to tell it could be a driver issue. Regarding the nmcli line: it also contains the relative signal strength (under the SIGNAL column), so we could directly copy it out from there. Nice thing is that it displays the same value as my code :) (which is obvious, since the code I added is copied from network-manager's...) |
Yes would be nice to have nmcli as option since it seems iw won't work without sudo on some systems.
(only works if network-manager is used though) |
weird thing, building from master I'm getting:
when building from 374e709 |
nvm, the wrong artifact was picked up appreantly |
Hi! I wanted to see the Wifi signal strength in the status bar, and saw there was an open issue with some hints to do it. Turns out that
iw
provides this information too, so we can parse its output to figure it out. It's a bit inefficient because we may call iw several times to grep for some of its information, but I think it's fine since it doesn't happen a lot.I've reused the formulas hinted at in the issue, and I can confirm they coincide with the results provided by the original i3status bar on my machine.