Instead of splitting information, use diskio_stats[0] in diskio.c for
the totals. This saves a few branches, and frees some data from struct
information.
Some statics are now defined by configure.ac.in, conky.h got a lot
smaller, which I see as a positive sign.
This patch should not change any functionality, just change what's
defined where. Some features I did/could not test are probably broken,
also compiling for any other OS surely won't complete now. Though I
think fixing these problems is as easy as including some missing
headers.
I've done compile checks with the following configure options:
./configure --enable-eve --enable-rss --enable-smapi
--enable-wlan --enable-debug --enable-testing
So what needs to be tested is:
- audacious
- BMPx
- xmms2
- nvidia
Using a macro is not possible anymore, so have a function dev_name() do
the job. Functionality is the same as the old DEV_NAME, unless the
specified path is a symlink in which case it's being dereferenced first.
To save callers from having to free the returned string, a static local
buffer is used (effectively rendering the function non-reentrant).
This patch makes Conky print a sample config when being called with the
'-C' flag.
A short test showed an increase of ~10kbytes of the conky binary's size.
From strdup(3):
| If s is longer than n, only n characters are copied, and a
| terminating null byte ('\0') is added.
So allocate at most n+1 bytes and make sure the last one is zero, as
strncpy() doesn't add it itself.
So in fact to allow a maximum space for string dup of 23, strndup() has
to be called like this:
| dup = strndup(src, 23 - 1);
FIXME: Find the critical points in code this change touches and make
sure the invocation there is correct.
Two things that pissed me off about the old one:
* only limited support for nesting templates
* totally broken output when using conditionals inside a template
The later one was the hard one to fix. ;)
It requires to already have the full text substituted before the text
objects are being created from it. Generating only the contained objects
broke, because the conditionals got wrong offsets to jump to.
After that was fixed, full nesting support is realised by simply
repeating the replacement until no more template objects are found.
This is causing trouble, as after each build switching branches is
impossible until the local modifications of README are being committed.
Since the whole file will be created when compiling conky, we can safely
ignore it (like with doc/conky.1).
Withdrawn windows are those you get from applications supporting the
'-w' flag, like e.g. gkrellm or all those sweet WindowMaker dockapps
(wmcpu and Co.). In Fluxbox, these windows are drawn into the slit. Most
other window managers put them into their "taskbar", AFAIK.
This patch makes Conky act exactly the same if the following settings
are selected:
| own_window yes
| own_window_type dock
This introduces a new configuration variable called "temperature_unit",
specifying the unit of all temperature sensors. To achieve this, each
object outputting a temperature has to call temp_print() like so:
| temp_print(p, p_max_size, <temp val as double>, <unit of val>);
to specify the input temperature unit, either one of the constants
TEMP_CELSIUS or TEMP_FAHRENHEIT.