greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

Automatically determine default route for the network interface #977

Closed kstrafe closed 3 years ago

kstrafe commented 3 years ago

There's a bandwidth monitor in i3blocks's contribs called bandwidth3 that determines the default route and uses that to gather information. Before making any commits, I'd like to discuss this.

The main usage of this is for sharing the same config on multiple computers with different network configurations. Instead of making an entry for each of these systems it would be much preferable to have just one.

ammgws commented 3 years ago

bandwidth3:

Note that the interface will be guessed using ip route but it can also be specified using the $IFACE property

Don't we already do this? https://github.com/greshake/i3status-rust/blob/4d8f98a04a7d4be74995a54d6b2522f8ba896eb3/src/blocks/net.rs#L92-L104

ammgws commented 3 years ago

Looks like the docs were out of date

kstrafe commented 3 years ago

Thank you!