1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 17:47:09 +00:00
Commit Graph

202 Commits

Author SHA1 Message Date
Nikolas Garofil
f9025174bc Let $acpitemp use /sys instead of /proc
From the 2.6.36 changelog (http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.36):
Mark the ACPI thermal procfs I/F deprecated, because /sys/class/thermal/ is already available and has been working for years w/o any problem.
The ACPI thermal procfs I/F will be removed in 2.6.37
2011-10-15 19:39:43 +02:00
Pavel Labath
70032e713a Don't abort when config references a non-existant hwmon file
this sort of fixes sf.net #3306538. The person there correctly tested for the existance of the
file with $if_existing, but the problem is we run the callbacks regardless of the conditional
tests.
2011-10-15 14:10:40 +02:00
Pavel Labath
b3d96b3b34 Don't crash when using out-of-range cpu numbers (sf.net #3368243)
bug reported by Ormaaj
2011-10-02 19:16:29 +02:00
Tiago Vale
2f2480833f Added support for POWER_SUPPLY_POWER_NOW In Linux
apparently POWER_SUPPLY_CURRENT_NOW was deprecated and replaced by POWER_SUPPLY_POWER_NOW. In my
system, ever since kernel 2.6.36.1 battery lifetime showed "unknown" in conky. Check
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532000.

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-12-30 16:59:29 +01:00
Nikolas Garofil
13188c8b11 Bugfix: memory and thread-deleting problems
This patch is the C version of a32d9e41a4
(from the master branch).
2010-05-05 18:57:27 +02:00
Nikolas Garofil
99eeeae6d0 Bugfix: ac-adapter is sometimes called ADP1 in sysfs instead of AC 2010-04-12 12:45:10 +02:00
Cesare Tirabassi
d2ce1d2909 Replaces commit 44e3708cdb
Thanks to ichelm610x for the patch.
I just added memoization to reduce the impact of the many system calls.
(cherry picked from commit 1eedf2633b)
2010-01-31 21:00:37 +01:00
Cesare Tirabassi
9e5739e612 Modify last commit to keep compiler happy since it claims devbuf can never be null (should we really trust gcc that much?) 2010-01-30 19:27:01 +01:00
Cesare Tirabassi
3db07e589f Fix diskio total computation for kernel > 2.6.31 (sf: #2942117)
(cherry picked from commit 44e3708cdb)
2010-01-30 14:24:40 +01:00
Pavel Labath
60a6194b84 Add optional argument to $acpiacadapter
The exact location of the state information seems hardware dependent, so this adds the option to
specify it manually. (linux only)
2010-01-24 16:12:31 +01:00
Brenden Matthews
f1b69e26a2 Update copyright notices. 2010-01-01 15:45:11 -08:00
Pavel Labath
3ed13c3cd1 Fix race condition in update_stat() 2009-12-11 22:57:22 +01:00
Pavel Labath
e5b66d7a7f Remove some strange network related code
Reported by norsetto.
This code disallows network traffic to be 0.
Brenden says it once had a purpose, but noone can think of what would that be atm.
2009-12-07 21:32:22 +01:00
Phil Sutter
c8bed3a28d voltage: outsource printing code 2009-11-20 00:02:42 +01:00
Phil Sutter
b6d1ff6c42 i8k: outsource code 2009-11-19 23:04:09 +01:00
Pavel Labath
72412c463b Rename $running_processes to $running_threads, implement real $running_processes 2009-11-15 17:55:03 +01:00
Phil Sutter
bde5845077 drop adt746x objects
This was really creepy stuff. Last updated in April, 2006 to work with
kernels > 2.6.12. I consider this "fobar" (fscking obsolete beyond all
recognition) and doubt anyone still uses this. If you do, blame me. :)
2009-11-13 00:47:23 +01:00
Phil Sutter
8922603b91 entropy: outsource code
This patch ought to be small and simple ...

The reason why it's not is me wanting the entropy data out of struct
information. This means update_entropy() can not be used anymore, as it
uses this globally available object.

The solution I am presenting here is quite messy regarding header
includes. Hopefully this will go away soon as I plan on creating some
sort of "OS library" containing all OS specific routines and defining
macros for easier capability checking in the non-specific code. This on
the other hand means we'll need "wrappers" around OS specific objects,
but that's not as bad as it seems - having non-specific text objects
only will definitely clean up the code, and capabilities can be checked
where they should be.
2009-11-13 00:02:16 +01:00
Nikolas Garofil
ce99d1a782 Use a define for the maximum number of network devices 2009-11-07 23:46:46 +01:00
Nikolas Garofil
aad43bea8d Added support for $threads and fixed $processes on Linux 2009-11-07 18:14:04 +01:00
Nikolas Garofil
1ed564fd0b Revert "Added support for and fixed on Linux"
This reverts commit 43c7c0373b.
2009-11-07 18:13:21 +01:00
Nikolas Garofil
43c7c0373b Added support for and fixed on Linux 2009-11-07 18:06:07 +01:00
Phil Sutter
94ac89e091 sysfs objects: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8b76d8fb60 net_stats: outsource network-related objects 2009-11-03 01:50:28 +01:00
Phil Sutter
7fc1c801aa gw_info: move code to where it belongs 2009-11-03 01:50:28 +01:00
Cesare Tirabassi
27a2a253a8 Fix indenting of last commit 2009-11-01 18:42:29 +01:00
Cesare Tirabassi
4ea99e27f1 Fix hwmon location for kernel >= 2.6.31 (closes sf: #2865628)
In the linux kernel 2.6.31 and above, device data can either be in
/sys/class/hwmon/hwmonDEV or /sys/class/hwmon/hwmonDEV/device.
Just stat'ing for the latter doesn't work since it can exist but not contain
the required data (see https://bugs.launchpad.net/bugs/435571 for details).
The patch could be improved to keep in memory the right location of the data
on the user's system instead of trying each time, but, is it worth doing it?
2009-11-01 18:37:48 +01:00
Phil Sutter
700a32b2e7 sysfs objects: merge init and print routines 2009-10-12 21:33:02 +02:00
Pavel Labath
09c0bccf55 Move vi modelines closer to the beginning, so they're more likely to be actually used. 2009-09-12 12:50:51 +02:00
Phil Sutter
466a253a8c update machinery: fix for update_stat() on linux 2009-09-09 22:52:09 +02:00
Phil Sutter
e044093735 update machinery: complete transition
* Drop all need_mask alterations (no idea why there were here at all,
  but surely not sane since they are missing in the non-linux
  functions).
* Drop the update delay for update_meminfo(), as parsing /proc should
  not lead to abnormal overhead.
* Check for x_initialised from inside update_x11info(), so we can call
  it unconditionally.
2009-09-07 01:05:33 +02:00
Brenden Matthews
043cf686c6 Revert "Uhh..ansohus"
This reverts commit 9827726ae5.

Or this.
2009-08-07 01:24:24 -06:00
Brenden Matthews
9827726ae5 Uhh..ansohus 2009-08-06 00:54:40 -06:00
Brenden Matthews
f10ffe07c4 Fix invalid call to close(). 2009-08-04 23:06:13 -06:00
Nikolas Garofil
44b82311b9 Added support for out_to_ncurses
All ERR()'s are renamed to NORM_ERR() and box to mbox so that they don't
clash with things in ncurses.h .
Ncurses is enabled by default when building conky but can be disabled with
--disable-ncurses .
At the moment configure doesn't check if ncurses is actually available.
I'm adding support for ncurses so that we can make as much things as possible
that are only available in X11 also available in console in the future.
2009-08-01 20:45:43 +02:00
Cesare Tirabassi
81c691d15a add emacs indentation variables to source files in line with current vim settings 2009-07-28 23:44:22 +02:00
Brenden Matthews
d97cd93a1c Add vim modelines. 2009-07-27 14:47:31 -06:00
Nikolas Garofil
44ca4647b8 bugfix 2009-07-24 11:44:17 +02:00
Nikolas Garofil
feedc8e7fa Fix unclosed file in get_battery_stuff 2009-07-24 11:09:00 +02:00
Brenden Matthews
670e9a0eb1 Multiline alignment support, some other misc stuff.
Added support for X alignment across multi-lined objects (i.e., using
$alignr with $exec).  This may be a bit buggy.  Disabled OpenMP code
until GCC's implementation stabilizes (it's causing too many problems).
A couple Lua API changes.
2009-07-18 13:46:36 -06:00
Nikolas Garofil
20d4c4370a Fix memleaks when reloading configuration and place same parts of main() and reload_config() in a seperate function 2009-07-17 18:01:41 +02:00
Nikolas Garofil
06de5573e8 Fix a lot of unimportant memleaks caused by a CRIT_ERR 2009-07-16 20:28:23 +02:00
Nikolas Garofil
9065d1f422 Added support for swapfree 2009-07-09 20:12:52 +02:00
Nikolas Garofil
ce9d9e3298 fix minor memleak when closing conky 2009-07-07 17:27:57 +02:00
Pavel Labath
c0d1c313e9 Support for per-task I/O statistics - $top_io
Basically, I just added three new process properties (io_read, io_write, io_perc - representing
the amount of I/O done by the process during the update interval) and $top_io, that sorts
processes based on io_perc.

Atm, it's completely #ifdef'd, since it requires kernel support. But that creates some wierd
looking syntax at some places, so it may be better to remove some ifdefs.  It even may be
possible to completely remove the ifdefs (ie. convert them to #ifdef linux) since the code will
compile just fine even if the kernel doesn't support I/O accounting. I'll leave that for someone
else to decide.
2009-06-12 19:39:45 +02:00
Nikolas Garofil
c392152d3a extra displayoptions for battery_short and make sure full isn't handled as unknown 2009-06-08 21:15:18 +02:00
Phil Sutter
26ecdcf562 Revert "Bugfix: $addr and $addrs couldn't find ip's before the first update."
This reverts commit 8ffb8b238d.

Surely, there is a better solution for that.
2009-06-06 18:14:06 +02:00
Nikolas Garofil
8ffb8b238d Bugfix: $addr and $addrs couldn't find ip's before the first update.
When you started "$updates|${addr eth0}" displayed "0|No Address",
after the first update you got something normal like "1|192.168.0.1"
This patch should fix this.
2009-06-06 17:41:51 +02:00
Nikos Ntarmos
12d0d1477f Integrate FreeBSD diskio support.
This diff moves Linux-specific parts of diskio.c into linux.c and uses
the remaining diskio functions to correctly implement this functionality
for FreeBSD. It also hooks diskio.c to the FreeBSD build.

Signed-off-by: Brenden Matthews <brenden@rty.ca>
2009-05-23 21:08:32 -06:00
Brenden Matthews
e7bf480d48 Fix null pointer boog in $top stuff. 2009-05-17 21:59:05 -06:00