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

241 Commits

Author SHA1 Message Date
Nikolas Garofil
52df1d2bf2 Merge branch 'master' of ssh://git.omp.am/home/omp/git/conky 2009-11-13 00:38:13 +01:00
Nikolas Garofil
52629bef61 Added support for $pid_openfiles 2009-11-13 00:36:46 +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
6c4f069f00 Added support for $pid_exe and $pid_stdin, $pid_stdout and $pid_stderr 2009-11-12 20:34:43 +01:00
Nikolas Garofil
6b20156a1b Added support for $pid_environ_list 2009-11-12 15:42:18 +01:00
Nikolas Garofil
d595a65077 Add support for $pid_environ 2009-11-11 22:56:12 +01:00
Nikolas Garofil
cb96b3bcca Add cwd to $pid and split into $pid_cmdline and $pid_cwd 2009-11-11 16:27:19 +01:00
Nikolas Garofil
65cf0439a0 Fix memleak and change literals to defines 2009-11-11 13:23:05 +01:00
Nikolas Garofil
46dd6ca513 Add support for ${pid cmdline} 2009-11-11 10:55:25 +01:00
Nikolas Garofil
ccbaf9ea89 Fix memleak 2009-11-10 00:15:30 +01:00
Phil Sutter
581c86f070 fix conversion bug when freeing exec objects 2009-11-08 20:20:47 +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
Nikolas Garofil
74145a7fef Fix building with --disable-x11 --disable-lua --disable-ncurses 2009-11-07 12:21:48 +01:00
Phil Sutter
e909cdd4eb scan_graph: allow giving a "hint" about a good scale value
This is more or less a temporary fix to restore the former behaviour. In
the long term objects will define a max value, which will be of use for
all kinds of meters.
2009-11-06 00:10:00 +01:00
Phil Sutter
4dd54b3df6 if_gw: no need to free unused obj->data.s 2009-11-03 23:23:23 +01:00
Phil Sutter
f61d8d108f text_object: completely remove the need for data.ifblock 2009-11-03 23:23:23 +01:00
Phil Sutter
9a770295d1 drop useless ifblock.str 2009-11-03 23:23:23 +01:00
Phil Sutter
66c187e7a1 no need to save the args passed to if_empty and if_match 2009-11-03 23:23:23 +01:00
Phil Sutter
7304378d73 drop a few unused fields from struct text_object 2009-11-03 23:23:23 +01:00
Phil Sutter
f98a360089 drop now unused SIZE_DEFAULTS macro 2009-11-03 23:23:23 +01:00
Phil Sutter
041059f1c2 specials: convert stippled_hr object to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
3458db80aa specials: convert tab object to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
50e2b5961a specials: convert gauge objects to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
bbec0db498 specials: convert graph objects to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
a4777c7c55 misc smaller fixes 2009-11-03 23:23:23 +01:00
Phil Sutter
22251dca51 specials: introduce dedicated per-object data and merge graph objects 2009-11-03 23:23:23 +01:00
Phil Sutter
42dfb7ac69 move loadavg and loadgraph code to common.c 2009-11-03 23:23:23 +01:00
Phil Sutter
63079a2075 local_mails: convert to generic object payload
This also includes a little header include cleanup.
2009-11-03 23:23:22 +01:00
Phil Sutter
ac99833646 text_object: use field i instead of cpu_index 2009-11-03 23:23:22 +01:00
Phil Sutter
3a365bcd33 if_up: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
0de0047bdc obsd_sensors: cleanup code (untested) 2009-11-03 23:23:22 +01:00
Phil Sutter
0740e91911 diskio: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
0dc60481cf top: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
4b0c1d3226 mboxscan: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
dd36fc4caa mixer: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
c45decda5e curl: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
4716969cc6 weather objects: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
046ae1dd61 rss: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
9202a9da87 eve: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
94ac89e091 sysfs objects: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
d2be5980ca tcp_portmon: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8d1640f30b fs_*: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
f6942c8c98 tailhead: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8165a91f0a nvidia: convert to generic text object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
d1b2c7eac3 local_mails: put code to where it belongs
Note that the code does not only use a pre-processor generator for
defining the print functions, but also for their prototypes. Sadly, this
generated a conflict in mboxscan.c which this patch resolves, too.
2009-11-03 01:50:28 +01:00
Phil Sutter
fa9135f9df mail: put imap and pop3 code to where it belongs 2009-11-03 01:50:28 +01:00
Phil Sutter
8b76d8fb60 net_stats: outsource network-related objects 2009-11-03 01:50:28 +01:00
Phil Sutter
9efa29be28 combine: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
37658b540b scroll: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
24d9e8bf24 read_tcp: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
7a168c377b exec: put all exec-related stuff into it's own file
While here, also merge the execi and texeci fields of struct
text_object, so more common code can be shared in between.
2009-11-03 01:50:28 +01:00
Phil Sutter
2631f42820 ibm: put specific code to where it belongs 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
Phil Sutter
a106b52698 curl: put init and print code to where it belongs
This also fixes a bug in arg parsing, effectively forcing an interval to
be specified.
2009-10-12 21:33:02 +02:00
Phil Sutter
ad8dd36cb7 weather objects: move init and print code to weather.c 2009-10-12 21:33:02 +02:00
Phil Sutter
6a2f58a25c rss: move init and print code into rss.c 2009-10-12 21:33:02 +02:00
Phil Sutter
ddca4aac68 spend some time with eve.{c,h}
* minimise core code hooks
* drop useless exporting of private functions (and make them static)
* reorder functions in eve.c so no prototypes are needed
* drop massive header include and add double include barrier in eve.h
2009-10-12 21:33:02 +02:00
Phil Sutter
700a32b2e7 sysfs objects: merge init and print routines 2009-10-12 21:33:02 +02:00
Phil Sutter
da7876468f tcp_portmon: drop useless function pointer cast, use OBJ_ARG 2009-10-12 21:33:02 +02:00
Phil Sutter
4d70cf07b8 fs_bar, fs_bar_free: merge init and print routines 2009-10-12 21:33:02 +02:00
Phil Sutter
b9a28c37a8 tail, head: use OBJ_ARG to simplify code 2009-10-12 21:33:02 +02:00
Cesare Tirabassi
066af067f0 Fix global info.desktop variables were incorrectly freed, sf #2876647 2009-10-12 13:38:48 +02:00
Phil Sutter
1e893ec6e3 iconv: outsource code into it's own file
While testing, I found two already existing bugs:
* the variable 'a' passed to iconv_convert() needs to be passed by
  reference in order to allow for the desired side effect.
* Somehow the trailing junk after an iconv_conversion to a shorter
  string messes things up (and gets printed!). I couldn't exactly find
  out why this happens, but setting (*p) = 0; solves this problem.
2009-10-04 03:41:45 +02:00
Phil Sutter
adf9d23927 outsource time, utime and tztime into a separate file 2009-10-04 03:24:04 +02:00
Phil Sutter
e3e77ce75e move the SIZE_DEFAULTS() macro to where it belongs to 2009-10-04 03:24:04 +02:00
Brenden Matthews
88a8799bf5 Improve IMAP/POP3 code, fix compiler error. 2009-09-30 18:06:18 -07:00
Pavel Labath
28978461a7 Put OBJ(image) in $ifdefs
so that conky produces more meaningful error message when compiled without imlib
2009-09-25 14:43:46 +02:00
Pavel Labath
7ad3e34e34 OBJ -> OBJ_ARG; apparently forgotten in 9f22ba 2009-09-15 23:54:31 +02:00
Phil Sutter
9f22bab657 core: add OBJ_ARG() and OBJ_IF_ARG() to force arguments
These macros can be used just like their OBJ() and OBJ_IF()
counterparts, just that they bail out hard when arg is unset. While
here, also cleanup the macro definition by using __* macros and fully
cleanup the macro namespace when the job is done.

Although this makes conky kind of less robust when it comes to
configuration errors, aborting is the right thing to do to avoid
ambiguity between unknown text objects.
2009-09-15 23:12:15 +02:00
Phil Sutter
f33affdc03 do not unconditionally overwrite a variable after conditionally setting it 2009-09-15 23:12:15 +02:00
Phil Sutter
ed3d73c094 minor indenting fixup 2009-09-15 23:12:15 +02:00
Phil Sutter
fa896bec98 apcupsd: drop init_apcupsd() since it was called at the wrong place
Normally, this is not enough reason to remove code, but in this case it
means that either the tester always had $nvidia (if enabled) or $combine
also in her setup, or it was working without (which I guess, since there
is duplicate code in update_apcupsd()).
2009-09-15 23:12:15 +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
f33bcb36ef update machinery: fix top objects
This is a bit messy, but since the top update stuff could use a rewrite
anyway, this should do.
2009-09-07 01:49:44 +02:00
Phil Sutter
d32879faaa update machinery: let CALLBACK() die again
There are no INFO_* variables any more, so the argument passed to OBJ()
is always a function pointer or zero. By checking the argument passed in
add_update_callback(), the branch in the OBJ() macro can be dropped,
too.
2009-09-07 01:22:16 +02:00
Phil Sutter
e83fb84c55 update machinery: clean up
* Remove leftover INFO_* values from object definitions which didn't
  trigger anything.
* Drop the whole INFO_* enum as it's values are not used anymore.
2009-09-07 01:12:11 +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
Phil Sutter
d7c7f06aca rework the update machinery to use callbacks
Besides improving performance when updating stuff, we ideally have no
text object specific code in update_stuff() anymore (aside some
leftovers).

The macros in construct_text_object() have gotten a bit crazier than
they were before:
* using CALLBACK(&func) instead of an INFO_* parameter to OBJ() will
  make it add the given callback to the list of callbacks to be iterated
  over at each update interval.
* BEWARE: the above assumes function pointer values to be > 0!
* This implicitly fixes a bug in the code: passing 0 as INFO_* value
  led to selecting INFO_MAIL (1 << 0 == 1).
* Now it would select INFO_CPU (== 0), which got unused and therefore is
  not a problem at all (the 0 value should be unused in enums anyway).

This needs some more work, then we should be able to drop the whole
INFO_* enum. Then CALLBACK() can die again and with it goes the ugly
casting stuff done to distinguish callbacks from INFO_* values.
2009-09-07 00:36:02 +02:00
Phil Sutter
5a3b7c074b Rewrite hddtemp support for better scaling
Instead of connecting once for each object, have a central update
routine (limiting support to only a single hddtemp daemon to connect
to).
2009-09-06 21:53:53 +02:00
Phil Sutter
12ab00cd2e move the ncurses.h include from conky.h to core.c
Fixes some namespace error with libmpdclient.c.
2009-09-04 00:08:57 +02:00
Phil Sutter
ff199355f6 outsource the whole template object machinery 2009-09-04 00:08:17 +02:00
Cesare Tirabassi
75ce3b259b Fix if_running not working on linux when a top flavour is not running 2009-09-03 23:13:14 +02:00
Nikolas Garofil
74b61f9730 Undo adding local ncurses.h header-file added by b4b0228d09 .
The headerfile used globally should be used instead of one in the local dir.
If conky can't find it, it should be fixed in configure.ac.in or Makefile.am,
and not in the code.
2009-08-08 02:54:07 +02:00
Phil Sutter
b4b0228d09 include ncurses.h in core.c 2009-08-08 00:28:26 +02:00
Brenden Matthews
043cf686c6 Revert "Uhh..ansohus"
This reverts commit 9827726ae5.

Or this.
2009-08-07 01:24:24 -06:00
Brenden Matthews
098e28598f Revert "auesnthaeou"
This reverts commit 70adc04fc2.

Oops, didn't mean to push this.  I'll start a new branch now (so I don't
do this again...).
2009-08-07 01:21:56 -06:00
Brenden Matthews
70adc04fc2 auesnthaeou 2009-08-06 21:56:40 -06:00
Brenden Matthews
9827726ae5 Uhh..ansohus 2009-08-06 00:54:40 -06: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