<command>
<option>addr</option>
</command>
- <option>interface</option>
+ <option>(interface)</option>
</term>
<listitem>IP address for an interface, or "No Address" if
no address is assigned.
<command>
<option>addrs</option>
</command>
- <option>interface</option>
+ <option>(interface)</option>
</term>
<listitem>IP addresses for an interface (if one - works
like addr). Linux only.
<command>
<option>downspeed</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Download speed in KiB
<para /></listitem>
<command>
<option>downspeedf</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Download speed in KiB with one decimal
<para /></listitem>
<command>
<option>totaldown</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Total download, overflows at 4 GB on Linux with
32-bit arch and there doesn't seem to be a way to know how
<command>
<option>totalup</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Total upload, this one too, may overflow
<para /></listitem>
<command>
<option>upspeed</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Upload speed in KiB
<para /></listitem>
<command>
<option>upspeedf</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Upload speed in KiB with one decimal
<para /></listitem>
<command>
<option>wireless_ap</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless access point MAC address (Linux only)
<para /></listitem>
<command>
<option>wireless_bitrate</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless bitrate (ie 11 Mb/s) (Linux only)
<para /></listitem>
<command>
<option>wireless_essid</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless access point ESSID (Linux only)
<para /></listitem>
<command>
<option>wireless_link_bar</option>
</command>
- <option>(height), (width) net</option>
+ <option>(height),(width) (net)</option>
</term>
<listitem>Wireless link quality bar (Linux only)
<para /></listitem>
<command>
<option>wireless_link_qual</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless link quality (Linux only)
<para /></listitem>
<command>
<option>wireless_link_qual_max</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless link quality maximum value (Linux only)
<para /></listitem>
<command>
<option>wireless_link_qual_perc</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless link quality in percents (Linux only)
<para /></listitem>
<command>
<option>wireless_mode</option>
</command>
- <option>net</option>
+ <option>(net)</option>
</term>
<listitem>Wireless mode (Managed/Ad-Hoc/Master) (Linux
only)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_essid: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_mode, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_mode: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_bitrate, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_bitrate: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_ap, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_ap: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_link_qual, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_link_qual: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_link_qual_max, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_link_qual_max: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_link_qual_perc, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_link_qual_perc: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(wireless_link_bar, INFO_NET)
SIZE_DEFAULTS(bar);
arg = scan_bar(arg, &obj->a, &obj->b);
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("wireless_link_bar: needs an argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
#endif /* HAVE_IWLIB */
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("downspeed needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(downspeedf, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("downspeedf needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
#ifdef X11
END OBJ(downspeedgraph, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("addr needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
#if defined(__linux__)
END OBJ(addrs, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("addrs needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
#endif /* __linux__ */
END OBJ(tail, 0)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("totaldown needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(totalup, INFO_NET)
obj->data.net = get_net_stat(arg);
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("totalup needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(updates, 0)
END OBJ_IF(if_updatenr, 0)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("upspeed needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
END OBJ(upspeedf, INFO_NET)
if (arg) {
obj->data.net = get_net_stat(arg);
} else {
- CRIT_ERR("upspeedf needs argument");
+ // default to DEFAULTNETDEV
+ char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
+ obj->data.net = get_net_stat(buf);
+ free(buf);
}
#ifdef X11