1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

feat: make gw_iface work with downspeed & upspeed, e.g. ${downspeed ${gw_iface}}

The previous code was buggy as it didn't call `update_gateway_info()`, so it displayed 0 bytes for the speeds.
This commit is contained in:
Steven Xu 2021-05-17 19:41:45 +10:00 committed by Brenden Matthews
parent 0498e6a433
commit 54e40520ae

View File

@ -134,6 +134,9 @@ void parse_net_stat_arg(struct text_object *obj, const char *arg,
if (arg == nullptr) { arg = DEFAULTNETDEV; } if (arg == nullptr) { arg = DEFAULTNETDEV; }
if (0 == (strcmp("$gw_iface", arg)) || 0 == (strcmp("${gw_iface}", arg))) { if (0 == (strcmp("$gw_iface", arg)) || 0 == (strcmp("${gw_iface}", arg))) {
#if defined(__linux__)
update_gateway_info();
#endif
arg = e_iface; arg = e_iface;
} }