Apparently, sometimes the value of i8k.right_fan_status is sometimes null. This just makes sure
the null value isn't passed to atoi(3). A better solution would be to figure out why is it null,
but I cannot do that as I don't have the hardware.
Patches conky to use getaddrinfo instead of gethostbyname everywhere. gethostbyname is rather
flawed and doesn't support IPv6 properly.
Patch contributed by Pascal Bleser
Additionally, add a nvidia_display variable. This enables the $nvidia variable to be used without
out_to_x yes (X11 support still has to be built in, you just don't have to use it).
they reported fs->size - fs->avail, which is not correct if fs has super-user reserved blocks.
note that now $fs_used_perc and $fs_free_perc need not add up to 100%, but that is consistent
with what $fs_used and $fs_free do.
This fixes a bug occurred with 0b3e3c637e.
Dead processes still appeared in ${top} under FreeBSD and OpenBSD. This was
because I forgot to update the g_time variable which is used as time stamp in
the process list.
Signed-off-by: Alexander Graf <agraf@znc.in>
Linux-specific code in top.cc was moved to linux.cc.
Redundant code (e.g. the parts sorting by CPU usage, CPU time or memory
usage) was removed. Sorting etc. happens in top.cc, whilst
platform-dependent code in linux.cc, freebsd.cc or openbsd.cc just
builds up the process table.
In the Linux code, some functions had a return value which was never
evaluated. They return void now.
I tested it on FreeBSD and Linux; The OpenBSD port does not compile
anyway. I changed the OpenBSD parts, too, so that it will be less
effort to get conky working under OpenBSD.
Signed-off-by: Alexander Graf <agraf@znc.in>
- Displaying of CPU time of the processes now works
- ${top_time} (sorting by CPU time) works
- Using memcpy() instead of many sequential assignments (more clear,
less lines, maybe faster, less effort to change something)
Signed-off-by: Alexander Graf <agraf@znc.in>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
Example:
TEXT
alfa bravo
charlie ${alignr}delta
echo ${alignr}foxtrot
Note to self:
It could be that this fix brings back part of the bug that
40452c9712 fixed. Check this !