1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-13 11:15:27 +00:00

Improve docs and parsing of graph args further.

This commit is contained in:
Brenden Matthews 2009-07-04 22:03:12 -06:00
parent 52c68c094c
commit ae6c02b0c8
2 changed files with 8 additions and 8 deletions

View File

@ -934,7 +934,7 @@
default_graph_size config setting. Takes the switch '-t' to
use a temperature gradient, which makes the gradient values
change depending on the amplitude of a particular graph
value (try it and see).
value (try it and see). If -t or -l is your first argument, you may need to preceed it by a space (' ').
<para /></listitem>
</varlistentry>
<varlistentry>
@ -978,7 +978,7 @@
<option>interval (-t) (-l) command</option>
</term>
<listitem>Same as execgraph, but takes an interval arg and
graphs values.
graphs values. If -t or -l is your first argument, you may need to preceed it by a space (' ').
<para /></listitem>
</varlistentry>
<varlistentry>
@ -1716,8 +1716,10 @@
<command>
<option>loadavg</option>
</command>
<option>(1|2|3)
</option>
</term>
<listitem>(1,2,3)&gt; System load average, 1 is for past 1
<listitem>System load average, 1 is for past 1
minute, 2 for past 5 minutes and 3 for past 15 minutes.
<para /></listitem>
</varlistentry>
@ -1726,7 +1728,7 @@
<command>
<option>loadgraph</option>
</command>
<option>(height),(width) (gradient colour 1) (gradient
<option>(1|2|3) (height),(width) (gradient colour 1) (gradient
colour 2) (scale) (-t) (-l)</option>
</term>
<listitem>Load1 average graph, similar to xload, with

View File

@ -119,14 +119,12 @@ char *scan_graph(const char *args, int *w, int *h,
*tempgrad = FALSE;
*showaslog = FALSE;
if (args) {
if (strstr(args, " "TEMPGRAD)) {
if (strstr(args, " "TEMPGRAD) || strncmp(args, TEMPGRAD, strlen(TEMPGRAD)) == 0) {
*tempgrad = TRUE;
}
if (strstr(args, " "LOGGRAPH)) {
if (strstr(args, " "LOGGRAPH) || strncmp(args, LOGGRAPH, strlen(LOGGRAPH)) == 0) {
*showaslog = TRUE;
}
DBGP("printing graph as %s, other args are: %s", (*showaslog ? "log" : "normal"), args);
//check the rest of the args
if (sscanf(args, "%d,%d %x %x %u", h, w, first_colour, last_colour, scale) == 5) {
return NULL;
}