1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Added spacer for wireless variables. Fixed some tabs. Disabled old wireless code.

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@900 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Toni Spets 2007-08-07 23:18:02 +00:00
parent ff3d0b015e
commit 6b553ec7de
2 changed files with 17 additions and 5 deletions

View File

@ -3552,13 +3552,22 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
snprintf(p, p_max_size, "%s", obj->data.net->ap);
}
OBJ(wireless_link_qual) {
snprintf(p, p_max_size, "%d", obj->data.net->link_qual);
if (!use_spacer)
snprintf(p, p_max_size, "%d", obj->data.net->link_qual);
else
snprintf(p, 3, "%d ", obj->data.net->link_qual);
}
OBJ(wireless_link_qual_max) {
snprintf(p, p_max_size, "%d", obj->data.net->link_qual_max);
if (!use_spacer)
snprintf(p, p_max_size, "%d", obj->data.net->link_qual_max);
else
snprintf(p, 3, "%d ", obj->data.net->link_qual_max);
}
OBJ(wireless_link_qual_perc) {
snprintf(p, p_max_size, "%.0f%%", (double)obj->data.net->link_qual / obj->data.net->link_qual_max * 100);
if (!use_spacer)
snprintf(p, p_max_size, "%.0f%%", (double)obj->data.net->link_qual / obj->data.net->link_qual_max * 100);
else
snprintf(p, 4, "%.0f%% ", (double)obj->data.net->link_qual / obj->data.net->link_qual_max * 100);
}
OBJ(wireless_link_bar) {
new_bar(p, obj->a, obj->b, ((double)obj->data.net->link_qual/obj->data.net->link_qual_max)*255.0);

View File

@ -216,13 +216,13 @@ inline void update_net_stats()
/* if recv or trans is less than last time, an overflow happened */
if (r < ns->last_read_recv)
last_recv = 0;
last_recv = 0;
else
ns->recv += (r - ns->last_read_recv);
ns->last_read_recv = r;
if (t < ns->last_read_trans)
last_trans = 0;
last_trans = 0;
else
ns->trans += (t - ns->last_read_trans);
ns->last_read_trans = t;
@ -333,6 +333,8 @@ inline void update_net_stats()
info.mask |= (1 << INFO_NET);
}
#if 0
/* deprecated */
inline void update_wifi_stats()
{
/** wireless stats patch by Bobby Beckmann **/
@ -380,6 +382,7 @@ inline void update_wifi_stats()
/*** end wireless patch ***/
}
#endif
int result;