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

Request for net-widget #164

Open
petterssonjonas opened this issue Jul 9, 2020 · 3 comments
Open

Request for net-widget #164

petterssonjonas opened this issue Jul 9, 2020 · 3 comments

Comments

@petterssonjonas
Copy link

Im using the lain net_widget, and it kinda sucks.
I'd like to request a functional network device rx/tx output widget that calculates something like /sys/clas/net/*/statistics/?x_bytes output from bytes to b, kB, MB, GB.

Thank's for all your great work :)

@streetturtle
Copy link
Owner

I created a simple text widget which displays up/down speed: https://github.com/streetturtle/awesome-wm-widgets/tree/master/net-speed-widget. I'll work on it more, but it can already be used:

local net_speed_widget = require("awesome-wm-widgets.net-speed-widget.net-speed")
...
net_speed_widget({
    interface = 'wlp0s20f3'
})

@petterssonjonas
Copy link
Author

petterssonjonas commented Jul 21, 2020

Awesome, thanks mate! Just one minor problem. The widget wont recognize my args.interface from the rc or if i set it in the widget file it self. It spits out two "interface name is not specified" errors.
I did this and it pops up; tough no numbers show up:

>     local args = "enp3s0" --args or {}
> 
> --    if args.interface == nil then
> --        show_warning("Interface name is not specified")
> --        return
> --   end

Edit: i removed .interface from args on line 103 and it works.

Now that numbers show up, i noticed that when any number above 0 is shown it flashes and returns to 0 after ~.5s before updating.

I also looked at it as i downloaded a file, and the numbers dont show anything near what the torrent program shows as rx/tx. To be fair neither does the lain widget.

Just some feedback, hope it helps when you work at it more :)

@nuno-silva
Copy link
Contributor

@fuzebox1 please check if the issues you mentioned are still reproducible as of master / 2e2ae41. Otherwise I believe this can be closed :)

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

No branches or pull requests

3 participants