i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Add an option to use a wildcard for the device key in the Net block

Open quantizzed opened this issue 5 years ago • 3 comments

Would be nice to be able to use a wildcard for the device key in the Net block, as it is already done for the chip key in the Temperature block.

I would like to use the Net block to display my WireGuard connection status. At any given time my computer can be connected using one of the WireGuard interfaces, which have different names like wireguard-xxx, where the xxx part can vary.

Unfortunately, at the moment the config.toml allows only fixed values for the device key in the Net block.

quantizzed avatar Jan 16 '21 22:01 quantizzed

Sounds reasonable. Similar to the network manager block I guess

ammgws avatar Jan 17 '21 05:01 ammgws

Regex would work just fine too, right?

This could be easily implemented once netlink (#1069) stuff is done, as it will give us a way to nicely iterate over interfaces. I guess we can read_dir("/sys/class/net") but it seems less... correct?

MaxVerevkin avatar Aug 19 '22 20:08 MaxVerevkin

Regex would be fine. Basically the same thing that was implemented for the battery block.

ammgws avatar Aug 23 '22 13:08 ammgws