1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-10-02 15:09:07 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
Pavel Labath
31cbd710a6 Make top_name_width a lua setting 2010-08-25 19:09:15 +02:00
Alexander Graf
0b3e3c637e ${top}: big cleanup
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>
2010-05-30 13:55:50 +02:00
Pavel Labath
4c2d634f07 Unbreak weather and iostats
The weather still doesn't quite work for me though.
2010-01-07 19:14:53 +01:00
Brenden Matthews
3e3dd16367 Update modelines and stuff. 2010-01-06 19:45:19 -08:00
Brenden Matthews
620e9876a4 C++ conversions WIP.
Currently stuck on an issue with g++ and using '%lli' with printf/scanf.
2010-01-04 19:21:12 -08:00
Brenden Matthews
cf9e498b24 Update copyright notices. 2010-01-01 15:46:17 -08:00
Phil Sutter
c4c2377d0e drop commas at end of enum in top.h 2009-12-28 03:02:06 +01:00
Phil Sutter
8045e7f714 drop enum text_object_type and all references to it's members
After some minor rewrite of the top parser (which was in fact the only
real user of the obj->type field left since introduction of text object
callbacks), there is no need for the obj->type field anymore.
2009-12-12 15:56:00 +01:00
Brenden Matthews
b6331b4eb6 Switch some more bits to C++, more CMake changes. 2009-12-09 20:05:32 -08:00
Phil Sutter
5ed38bfe0d convert top objects to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
6f9bfe970a fix potential buffer overflow when printing top values 2009-11-19 23:04:09 +01:00
Phil Sutter
556751c8c9 top: drop problematic field totalmem
The field totalmem was formerly used to hold the percentage of used mem
by a process. So at update time, the field info.memmax was being
addressed, which is potentially being updated at the same time, As all
updating routines potentially run in parallel. Though there is an
(quite) easy fix for this: calculate the percentage upon object
printing. This works because conky synchronises all update routines
right before printing the result. (To omit locking on it's own.)
2009-11-03 23:24:09 +01:00
Phil Sutter
0dc60481cf top: convert to generic object payload 2009-11-03 23:23:22 +01:00
Brenden Matthews
3f4127080e Started on breaking up conky.c.
These changes will likely result in breakage, particularly with
different features enabled/disabled.
2009-08-05 16:46:51 -06: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
Phil Sutter
c6a5a060cf Use the internal process list for if_running on Linux 2009-06-20 01:46:59 +02:00
Pavel Labath
9e976d9dc4 Better parsing of process names containing funky chars 2009-06-14 00:02:50 +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
Brenden Matthews
f05829ad9a Update copyright stuff, fix conky.conf weirdness. 2009-03-29 22:55:51 -06:00
Alexander Graf
9c679bf33f Add ${top_time} sorting processes by CPU time 2009-02-07 15:01:50 +01:00
Brenden Matthews
dc3ed8df13 Removing old svn keywords. 2008-12-09 16:35:49 -07:00
Kevin Lyles
610b0b628d Split conky.h into several smaller header files
In order to do this correctly:
	Removed duplicate includes
	Fixed mpd functions to accept mpd_s instead of information
	Freed mpd.h of any need to include conky.h (mpd.c still includes it for the constants)



git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1154 7f574dfc-610e-0410-a909-a81674777703
2008-06-14 18:41:12 +00:00
Kevin Lyles
59704d5e3e Moved struct process to top.h
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1153 7f574dfc-610e-0410-a909-a81674777703
2008-06-14 05:32:46 +00:00
Brenden Matthews
be2cd44e6d doc cleanup
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1090 7f574dfc-610e-0410-a909-a81674777703
2008-03-31 04:56:39 +00:00
Phil
00eb4ec9af some relocation of header includes
* conky.h must come first, because it includes config.h
  which again defines _GNU_SOURCE, which is necessary
  for strdup() & Co.
* declaring cpu_separate in top.h makes no sense, as it
  includes conky.h which declares cpu_separate itself


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1078 7f574dfc-610e-0410-a909-a81674777703
2008-03-29 12:44:29 +00:00
Kevin Lyles
3d26a4880e Reformatted all code
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1007 7f574dfc-610e-0410-a909-a81674777703
2008-02-20 20:30:45 +00:00
Brenden Matthews
35b4ed3aff 2008-01-05
* Applied some more submitted patches:
        1) Add long forms of (most of) the command-line options.
        2) Added an option (top_cpu_separate) that emulates top's "separate
        cpus" option.  Processor usage is shown as a percentage of a
        single processor on your system, instead of a percentage
        of all processors combined.
        3) Adds a parameter (time) to top and top_mem that will show the
        cumulative CPU time of a process.
        4) Simplified integer rounding.
        5) Fixed the window width when a goto is used.
        6) Fixed the window width when an offset is used.
        (thanks Kevin Lyles).


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@994 7f574dfc-610e-0410-a909-a81674777703
2008-01-06 01:35:14 +00:00
Brenden Matthews
27b4c8550c clarifying licensing
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@904 7f574dfc-610e-0410-a909-a81674777703
2007-08-10 19:53:44 +00:00
David Carter
9b2401b36e new top routines using linked lists instead of arrays
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@384 7f574dfc-610e-0410-a909-a81674777703
2005-11-10 01:20:19 +00:00
Brenden Matthews
e5893c4329 moved stuff
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@130 7f574dfc-610e-0410-a909-a81674777703
2005-08-21 22:10:54 +00:00