aboutsummaryrefslogtreecommitdiffstats
path: root/gadgets
diff options
context:
space:
mode:
authorgotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-28 11:44:01 +0000
committergotmor <gotmor@f2baff5b-bf2c-0410-a398-912abdc3d8b2>2007-08-28 11:44:01 +0000
commit6e76e603b126b39c13e3741f74b2df7112773238 (patch)
treef1eadee199ab09c3791716c3f7c1b7f645985074 /gadgets
parent3061dd960d5ec4879e20714f9f42d09ee7d9cc60 (diff)
downloaddzen-6e76e603b126b39c13e3741f74b2df7112773238.tar.gz
dzen-6e76e603b126b39c13e3741f74b2df7112773238.zip
fixed width/alignement in gcpubar for '-o' option
git-svn-id: http://dzen.googlecode.com/svn/trunk@163 f2baff5b-bf2c-0410-a398-912abdc3d8b2
Diffstat (limited to 'gadgets')
-rw-r--r--gadgets/gcpubar.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gadgets/gcpubar.c b/gadgets/gcpubar.c
index b4c066d..a55b781 100644
--- a/gadgets/gcpubar.c
+++ b/gadgets/gcpubar.c
@@ -58,9 +58,9 @@ pbar(double perc, int maxc, int height, int print_nl, int mode) {
rp = (int)perc;
if(mode)
- printf("CPU: %3d%% ^ib(1)^fg(%s)^ro(%dx%d)^p(%d)^fg(%s)^r(%dx%d)^fg()%s",
+ printf("CPU: %3d%% ^ib(1)^fg(%s)^ro(%dx%d)^p(%d)^fg(%s)^r(%dx%d)^p(%d)^ib(0)^fg()%s",
rp, bg, maxc, height, -1*(maxc-1),
- (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height-2, print_nl ? "\n" : "");
+ (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height-2, (maxc-1)-(int)l, print_nl ? "\n" : "");
else
printf("CPU: %3d%% ^fg(%s)^r(%dx%d)^fg(%s)^r(%dx%d)^fg()%s",
rp, (rp>=CPUCRIT) ? CRITCOL : fg, (int)l, height,
@@ -69,6 +69,10 @@ pbar(double perc, int maxc, int height, int print_nl, int mode) {
fflush(stdout);
}
+static void
+mkstat() {
+}
+
int
main(int argc, char *argv[])
{
@@ -133,7 +137,7 @@ main(int argc, char *argv[])
print_nl = 0;
}
else {
- printf("usage: %s [-i <interval>] [-c <count>] [-fg <color>] [-bg <color>] [-w <pixel>] [-h <pixel>] [-nonl]\n", argv[0]);
+ printf("usage: %s [-i <interval>] [-c <count>] [-fg <color>] [-bg <color>] [-w <pixel>] [-h <pixel>] [-o] [-nonl]\n", argv[0]);
return EXIT_FAILURE;
}
}