Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37831833
en ru br
Репозитории ALT
S:0.9.5-alt3.git20130923
5.1: 0.8.5-alt4.svn267.0.M51.1
www.altlinux.org/Changes

Группа :: Графические оболочки/Прочее
Пакет: 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;
 			}
 		}
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin