diff --git a/ChangeLog b/ChangeLog index 3b8bd5a9..c258759a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # $Id$ +2007-02-14 + * Include missing mboxscan.h in conky.h. + * Fixed signedness warnings in conky.c. + 2007-02-11 * Added buffer_text_size option to change the size of the buffer for things like $exec, $tail, et cetera diff --git a/README b/README index c2944dbd..9dd03da7 100644 --- a/README +++ b/README @@ -249,6 +249,10 @@ CONFIGURATION SETTINGS config file (default is 16384 bytes) + text_buffer_size bytes + Size of the standard text buffer (default is 1280 bytes). + + maximum_width pixels Maximum width of window @@ -529,8 +533,8 @@ VARIABLES cpu (cpuN) CPU usage in percents. For SMP machines, the CPU number can be - provided as an argument. ${cpu 0} is the total usage, and ${cpu - X} (X >= 1) are individual CPUs. + provided as an argument. ${cpu cpu0} is the total usage, and + ${cpu cpuX} (X >= 1) are individual CPUs. cpubar (cpu number) (height),(width) @@ -856,6 +860,13 @@ VARIABLES also new_mails. + mboxscan (-n number of messages to print) (-fw from width) (-sw subject + width) mbox + Print a summary of recent messages in an mbox format mailbox. + mbox parameter is the filename of the mailbox (can be encapsu- + lated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"} + + mem Amount of memory in use diff --git a/doc/conky.1 b/doc/conky.1 index fca079e6..ef38157c 100644 --- a/doc/conky.1 +++ b/doc/conky.1 @@ -234,6 +234,10 @@ Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is Maximum size of user text buffer, i.e. layout below TEXT line in config file (default is 16384 bytes) +.TP +\fB\*(T<\fBtext_buffer_size\fR\*(T>\fR \*(T<\fBbytes\fR\*(T> +Size of the standard text buffer (default is 1280 bytes). + .TP \fB\*(T<\fBmaximum_width\fR\*(T>\fR \*(T<\fBpixels\fR\*(T> Maximum width of window @@ -501,7 +505,7 @@ Change drawing color to color .TP \fB\*(T<\fBcpu\fR\*(T>\fR \*(T<\fB(cpuN)\fR\*(T> -CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu 0} is the total usage, and ${cpu X} (X >= 1) are individual CPUs. +CPU usage in percents. For SMP machines, the CPU number can be provided as an argument. ${cpu cpu0} is the total usage, and ${cpu cpuX} (X >= 1) are individual CPUs. .TP \fB\*(T<\fBcpubar\fR\*(T>\fR \*(T<\fB(cpu number) (height),(width)\fR\*(T> @@ -764,6 +768,10 @@ Machine, i686 for example \fB\*(T<\fBmails\fR\*(T>\fR Mail count in mail spool. You can use program like fetchmail to get mails from some server using your favourite protocol. See also new_mails. +.TP +\fB\*(T<\fBmboxscan\fR\*(T>\fR \*(T<\fB(\-n number of messages to print) (\-fw from width) (\-sw subject width) mbox\fR\*(T> +Print a summary of recent messages in an mbox format mailbox. mbox parameter is the filename of the mailbox (can be encapsulated using '"', ie. ${mboxscan -n 10 "/home/brenden/some box"} + .TP \fB\*(T<\fBmem\fR\*(T>\fR Amount of memory in use diff --git a/src/conky.c b/src/conky.c index c0fa0039..df1f408c 100644 --- a/src/conky.c +++ b/src/conky.c @@ -4698,7 +4698,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object * } /* Make sure bsize is at least 1 byte smaller than * the buffer max size. */ - if(bsize > text_buffer_size*20 - 1) { + if(bsize > (long)((text_buffer_size*20) - 1)) { fseek(fp, bsize - text_buffer_size*20 - 1, SEEK_CUR); bsize = text_buffer_size*20 - 1; } @@ -4751,7 +4751,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object * obj->data.tail.readlines = iter; /* Make sure nl is at least 1 byte smaller than * the buffer max size. */ - if(nl > text_buffer_size*20 - 1) { + if(nl > (long)((text_buffer_size*20) - 1)) { nl = text_buffer_size*20 - 1; } nl = fread(obj->data.tail.buffer, 1, nl, fp); diff --git a/src/conky.h b/src/conky.h index 32669de0..40c982a9 100644 --- a/src/conky.h +++ b/src/conky.h @@ -44,6 +44,7 @@ #include #endif +#include "mboxscan.h" #include "timed_thread.h" #define TOP_CPU 1