1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 20:31:17 +00:00

small fixes

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@215 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2005-08-27 11:39:47 +00:00
parent 7986773643
commit ad781663f6

View File

@ -1052,8 +1052,10 @@ if (s[0] == '#') {
obj->data.cpu_index = atoi(&arg[3]); obj->data.cpu_index = atoi(&arg[3]);
arg += 4; arg += 4;
} }
else {obj->data.cpu_index = 0;}
(void) scan_bar(arg, &obj->a, &obj->b); (void) scan_bar(arg, &obj->a, &obj->b);
} else { } else {
(void) scan_bar(arg, &obj->a, &obj->b);
obj->data.cpu_index = 0; obj->data.cpu_index = 0;
} }
END OBJ(cpugraph, INFO_CPU) END OBJ(cpugraph, INFO_CPU)
@ -1064,6 +1066,7 @@ if (s[0] == '#') {
} }
(void) scan_graph(arg, &obj->a, &obj->b, &obj->c, &obj->d, &obj->e); (void) scan_graph(arg, &obj->a, &obj->b, &obj->c, &obj->d, &obj->e);
} else { } else {
(void) scan_graph(arg, &obj->a, &obj->b, &obj->c, &obj->d, &obj->e);
obj->data.cpu_index = 0; obj->data.cpu_index = 0;
} }
END OBJ(diskio, INFO_DISKIO) END OBJ(diskio, INFO_DISKIO)
@ -1811,12 +1814,12 @@ static void generate_text()
OBJ(cpubar) { OBJ(cpubar) {
new_bar(p, obj->a, new_bar(p, obj->a,
obj->b, obj->b,
(int) (cur->cpu_usage[0] * 255.0)); (int) (cur->cpu_usage[obj->data.cpu_index] * 255.0));
} }
OBJ(cpugraph) { OBJ(cpugraph) {
new_graph(p, obj->a, new_graph(p, obj->a,
obj->b, obj->c, obj->d, obj->b, obj->c, obj->d,
(unsigned int) (cur->cpu_usage[0] * (unsigned int) (cur->cpu_usage[obj->data.cpu_index] *
100), 100, 1); 100), 100, 1);
} }
OBJ(color) { OBJ(color) {