Группа :: Графические оболочки/Прочее
Пакет: dzen2
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: dzen2-alt-gcpubar.patch
Скачать
Скачать
--- gadgets/gcpubar.c.orig 2007-08-18 10:18:50 +0400
+++ gadgets/gcpubar.c 2008-08-26 19:18:35 +0400
@@ -152,7 +152,7 @@
return EXIT_FAILURE;
}
- t = counts > 0 ? counts : 1;
+ t = counts > 0 ? counts+1 : 1;
while(t) {
rewind(statfp);
while(fgets(buf, sizeof buf, statfp)) {
@@ -175,7 +175,9 @@
total = (mcpu.user + mcpu.sys + mcpu.idle + mcpu.iowait) / 100.0;
myload = (mcpu.user + mcpu.sys + mcpu.iowait) / total;
- pbar(myload, barwidth, barheight, print_nl, mode);
+ if ( (counts == 0) || (counts > 0) && (t != counts + 1)) {
+ pbar(myload, barwidth, barheight, print_nl, mode);
+ }
ocpu = ncpu;
}
}