monky
14 years agoexec: convert to generic object payload
Phil Sutter [Tue, 6 Oct 2009 22:09:14 +0000 (00:09 +0200)]
exec: convert to generic object payload

14 years agotop: convert to generic object payload
Phil Sutter [Tue, 6 Oct 2009 20:33:28 +0000 (22:33 +0200)]
top: convert to generic object payload

14 years agomboxscan: convert to generic object payload
Phil Sutter [Tue, 6 Oct 2009 19:59:45 +0000 (21:59 +0200)]
mboxscan: convert to generic object payload

14 years agomixer: convert to generic object payload
Phil Sutter [Tue, 6 Oct 2009 19:48:26 +0000 (21:48 +0200)]
mixer: convert to generic object payload

14 years agocurl: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 19:17:43 +0000 (21:17 +0200)]
curl: convert to generic object payload

14 years agoweather objects: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 18:52:05 +0000 (20:52 +0200)]
weather objects: convert to generic object payload

14 years agorss: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 17:14:30 +0000 (19:14 +0200)]
rss: convert to generic object payload

14 years agoeve: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 16:53:17 +0000 (18:53 +0200)]
eve: convert to generic object payload

14 years agosysfs objects: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 16:22:08 +0000 (18:22 +0200)]
sysfs objects: convert to generic object payload

14 years agotcp_portmon: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 15:22:25 +0000 (17:22 +0200)]
tcp_portmon: convert to generic object payload

14 years agofs_*: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 14:53:21 +0000 (16:53 +0200)]
fs_*: convert to generic object payload

14 years agofs_bar, fs_bar_free: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 14:12:47 +0000 (16:12 +0200)]
fs_bar, fs_bar_free: convert to generic object payload

14 years agotailhead: convert to generic object payload
Phil Sutter [Sun, 4 Oct 2009 12:41:51 +0000 (14:41 +0200)]
tailhead: convert to generic object payload

14 years agoconvert tztime to generic object payload
Phil Sutter [Sat, 3 Oct 2009 15:09:13 +0000 (17:09 +0200)]
convert tztime to generic object payload

14 years agonvidia: convert to generic text object payload
Phil Sutter [Sat, 3 Oct 2009 14:14:23 +0000 (16:14 +0200)]
nvidia: convert to generic text object payload

14 years agotext_object: introduce a generic payload pointer
Phil Sutter [Sat, 3 Oct 2009 14:08:33 +0000 (16:08 +0200)]
text_object: introduce a generic payload pointer

14 years agonvidia: fix syntax in variables.xml
Phil Sutter [Sat, 3 Oct 2009 14:03:08 +0000 (16:03 +0200)]
nvidia: fix syntax in variables.xml

14 years agolocal_mails: put code to where it belongs
Phil Sutter [Sat, 24 Oct 2009 23:13:50 +0000 (01:13 +0200)]
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.

14 years agomail: put imap and pop3 code to where it belongs
Phil Sutter [Sat, 24 Oct 2009 23:17:30 +0000 (01:17 +0200)]
mail: put imap and pop3 code to where it belongs

14 years agonet_stats: outsource network-related objects
Phil Sutter [Sat, 17 Oct 2009 14:43:12 +0000 (16:43 +0200)]
net_stats: outsource network-related objects

14 years agocombine: outsource code
Phil Sutter [Sat, 17 Oct 2009 14:14:25 +0000 (16:14 +0200)]
combine: outsource code

14 years agoscroll: outsource code
Phil Sutter [Tue, 6 Oct 2009 23:04:32 +0000 (01:04 +0200)]
scroll: outsource code

14 years agoread_tcp: outsource code
Phil Sutter [Sat, 17 Oct 2009 13:47:06 +0000 (15:47 +0200)]
read_tcp: outsource code

14 years agoexec: put all exec-related stuff into it's own file
Phil Sutter [Thu, 15 Oct 2009 19:51:21 +0000 (21:51 +0200)]
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.

14 years agoibm: put specific code to where it belongs
Phil Sutter [Tue, 13 Oct 2009 21:01:31 +0000 (23:01 +0200)]
ibm: put specific code to where it belongs

14 years agogw_info: move code to where it belongs
Phil Sutter [Tue, 13 Oct 2009 20:44:56 +0000 (22:44 +0200)]
gw_info: move code to where it belongs

14 years agoFix indenting of last commit
Cesare Tirabassi [Sun, 1 Nov 2009 17:42:29 +0000 (18:42 +0100)]
Fix indenting of last commit

14 years agoFix hwmon location for kernel >= 2.6.31 (closes sf: #2865628)
Cesare Tirabassi [Sun, 1 Nov 2009 17:37:48 +0000 (18:37 +0100)]
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?

14 years agorss.h: drop useless header include
Phil Sutter [Mon, 12 Oct 2009 21:04:41 +0000 (23:04 +0200)]
rss.h: drop useless header include

14 years agofix compiling in a messy way
Phil Sutter [Mon, 12 Oct 2009 21:00:06 +0000 (23:00 +0200)]
fix compiling in a messy way

A cleaner but more ugly solution would be to include text_object.h in
every header containing struct text_object definitions. But this
apparently triggers a big mess, since text_object.h itself includes
custom headers. Forward defining struct text_object is obviously the
mostly simple solution until there is a bigger header include review
cleaning it all up.

14 years agocurl: put init and print code to where it belongs
Phil Sutter [Sun, 4 Oct 2009 19:06:52 +0000 (21:06 +0200)]
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.

14 years agoweather objects: move init and print code to weather.c
Phil Sutter [Sun, 4 Oct 2009 17:42:01 +0000 (19:42 +0200)]
weather objects: move init and print code to weather.c

14 years agorss: move init and print code into rss.c
Phil Sutter [Sun, 4 Oct 2009 17:04:08 +0000 (19:04 +0200)]
rss: move init and print code into rss.c

14 years agospend some time with eve.{c,h}
Phil Sutter [Sun, 4 Oct 2009 16:39:28 +0000 (18:39 +0200)]
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

14 years agosysfs objects: merge init and print routines
Phil Sutter [Sun, 4 Oct 2009 16:05:47 +0000 (18:05 +0200)]
sysfs objects: merge init and print routines

14 years agotcp_portmon: drop useless function pointer cast, use OBJ_ARG
Phil Sutter [Sun, 4 Oct 2009 15:08:08 +0000 (17:08 +0200)]
tcp_portmon: drop useless function pointer cast, use OBJ_ARG

14 years agofs_bar, fs_bar_free: merge init and print routines
Phil Sutter [Sun, 4 Oct 2009 13:50:47 +0000 (15:50 +0200)]
fs_bar, fs_bar_free: merge init and print routines

14 years agotail, head: use OBJ_ARG to simplify code
Phil Sutter [Sun, 4 Oct 2009 12:44:20 +0000 (14:44 +0200)]
tail, head: use OBJ_ARG to simplify code

14 years agohddtemp: drop dead code (custom per-object data)
Phil Sutter [Sun, 4 Oct 2009 12:37:56 +0000 (14:37 +0200)]
hddtemp: drop dead code (custom per-object data)

14 years agoFix global info.desktop variables were incorrectly freed, sf #2876647
Cesare Tirabassi [Mon, 12 Oct 2009 11:38:48 +0000 (13:38 +0200)]
Fix global info.desktop variables were incorrectly freed, sf #2876647

14 years agotztime: fix argument parsing bug, clarify docs
Phil Sutter [Sun, 4 Oct 2009 01:59:47 +0000 (03:59 +0200)]
tztime: fix argument parsing bug, clarify docs

14 years agoiconv: outsource code into it's own file
Phil Sutter [Sat, 3 Oct 2009 18:01:33 +0000 (20:01 +0200)]
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.

14 years agooutsource time, utime and tztime into a separate file
Phil Sutter [Sat, 3 Oct 2009 15:46:59 +0000 (17:46 +0200)]
outsource time, utime and tztime into a separate file

14 years agomove the SIZE_DEFAULTS() macro to where it belongs to
Phil Sutter [Wed, 30 Sep 2009 23:25:24 +0000 (01:25 +0200)]
move the SIZE_DEFAULTS() macro to where it belongs to

14 years agoAdd the -p/--pause command line option.
Brenden Matthews [Sat, 3 Oct 2009 21:26:39 +0000 (14:26 -0700)]
Add the -p/--pause command line option.

14 years agoImprove IMAP/POP3 code, fix compiler error.
Brenden Matthews [Thu, 1 Oct 2009 01:06:18 +0000 (18:06 -0700)]
Improve IMAP/POP3 code, fix compiler error.

14 years agoAllow spaces in mail folder names for pop/imap.
Brenden Matthews [Sun, 27 Sep 2009 17:40:06 +0000 (10:40 -0700)]
Allow spaces in mail folder names for pop/imap.

For example, you can specify "-f '[Gmail]/All Mail'" in your mail args
to view all mails in your Google mail IMAP folder.

14 years agoSwitching email addrs.
Brenden Matthews [Sun, 27 Sep 2009 03:40:42 +0000 (20:40 -0700)]
Switching email addrs.

14 years agoFix IMAP IDLE with Google's IMAP service.
Brenden Matthews [Sun, 27 Sep 2009 01:38:07 +0000 (18:38 -0700)]
Fix IMAP IDLE with Google's IMAP service.

14 years agoPut OBJ(image) in $ifdefs
Pavel Labath [Fri, 25 Sep 2009 12:43:46 +0000 (14:43 +0200)]
Put OBJ(image) in $ifdefs

so that conky produces more meaningful error message when compiled without imlib

14 years agoMake -d switch work again
Pavel Labath [Tue, 22 Sep 2009 16:19:08 +0000 (18:19 +0200)]
Make -d switch work again

-d was broken because fork-to-background was done after the update thread creation, so the
threads ended up in the wrong process. This delays the thread creation until after the fork.

14 years agoallow setting profiling gcc flags without hassle
Phil Sutter [Sun, 20 Sep 2009 17:18:17 +0000 (19:18 +0200)]
allow setting profiling gcc flags without hassle

And also ignore the files generated hereby. ;)

14 years agodo not block when reading inotify_fd
Phil Sutter [Sun, 20 Sep 2009 15:48:55 +0000 (17:48 +0200)]
do not block when reading inotify_fd

Originally, I was experiencing sporadic lockups when reading inotify_fd;
which is strange, since it is protected by select(). This should fix it
despite of the original problem.

14 years agoindex processes in a hash table for faster lookup
Phil Sutter [Sun, 20 Sep 2009 14:09:18 +0000 (16:09 +0200)]
index processes in a hash table for faster lookup

14 years agoIt feels much better to let the thread exit voluntarily instead of violently killing it
Pavel Labath [Sun, 20 Sep 2009 12:38:57 +0000 (14:38 +0200)]
It feels much better to let the thread exit voluntarily instead of violently killing it

14 years agofixup for ncurses output
Phil Sutter [Sun, 20 Sep 2009 01:48:00 +0000 (03:48 +0200)]
fixup for ncurses output

14 years agodrop duplicate code
Phil Sutter [Sun, 20 Sep 2009 02:07:45 +0000 (04:07 +0200)]
drop duplicate code

14 years agominor indentation fixup
Phil Sutter [Sun, 20 Sep 2009 01:32:07 +0000 (03:32 +0200)]
minor indentation fixup

14 years agothis was looking wrong
Phil Sutter [Sun, 20 Sep 2009 01:23:46 +0000 (03:23 +0200)]
this was looking wrong

14 years agominor simplification of get_string_width_special()
Phil Sutter [Sun, 20 Sep 2009 01:17:55 +0000 (03:17 +0200)]
minor simplification of get_string_width_special()

14 years agoupdate machinery: keep threads persistent
Phil Sutter [Sun, 20 Sep 2009 01:11:38 +0000 (03:11 +0200)]
update machinery: keep threads persistent

Create each thread upon registration of the callback function, then use
semaphores to signal when it's time to update and when updating is
finished.
Many thanks to pavelo who originally came up with the idea for this.

14 years agosimplify get_string_width() a bit
Phil Sutter [Sun, 20 Sep 2009 01:02:56 +0000 (03:02 +0200)]
simplify get_string_width() a bit

14 years agoFix title in config_settings.html.
Brenden Matthews [Wed, 16 Sep 2009 15:54:12 +0000 (08:54 -0700)]
Fix title in config_settings.html.

14 years agoOBJ -> OBJ_ARG; apparently forgotten in 9f22ba
Pavel Labath [Tue, 15 Sep 2009 21:54:31 +0000 (23:54 +0200)]
OBJ -> OBJ_ARG; apparently forgotten in 9f22ba

14 years agotop.c: fix for unsigned underflow
Phil Sutter [Tue, 15 Sep 2009 20:59:37 +0000 (22:59 +0200)]
top.c: fix for unsigned underflow

Yes, I also thought these are monotonic counters. But it seems like they
are not, at least sometimes the value decreases by 1 leading to a very
very high cpu usage percentage being printed.

14 years agobetter zero out allocated memory
Phil Sutter [Mon, 14 Sep 2009 00:07:45 +0000 (02:07 +0200)]
better zero out allocated memory

14 years agoupdate machinery: run each update callback in it's own thread
Phil Sutter [Thu, 10 Sep 2009 23:18:38 +0000 (01:18 +0200)]
update machinery: run each update callback in it's own thread

14 years agoread_tcp: get rid of heavy indenting
Phil Sutter [Thu, 10 Sep 2009 21:10:07 +0000 (23:10 +0200)]
read_tcp: get rid of heavy indenting

14 years agocore: add OBJ_ARG() and OBJ_IF_ARG() to force arguments
Phil Sutter [Wed, 9 Sep 2009 23:35:57 +0000 (01:35 +0200)]
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.

14 years agoimlib2: don't flood warnings on non-existing images
Phil Sutter [Wed, 9 Sep 2009 23:59:08 +0000 (01:59 +0200)]
imlib2: don't flood warnings on non-existing images

14 years agodo not unconditionally overwrite a variable after conditionally setting it
Phil Sutter [Wed, 9 Sep 2009 23:49:10 +0000 (01:49 +0200)]
do not unconditionally overwrite a variable after conditionally setting it

14 years agominor indenting fixup
Phil Sutter [Wed, 9 Sep 2009 23:42:04 +0000 (01:42 +0200)]
minor indenting fixup

14 years agoapcupsd: drop init_apcupsd() since it was called at the wrong place
Phil Sutter [Wed, 9 Sep 2009 23:37:23 +0000 (01:37 +0200)]
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()).

14 years agoupdate machinery: add some documentation
Phil Sutter [Wed, 9 Sep 2009 22:12:56 +0000 (00:12 +0200)]
update machinery: add some documentation

14 years agoMove vi modelines closer to the beginning, so they're more likely to be actually...
Pavel Labath [Sat, 12 Sep 2009 10:50:51 +0000 (12:50 +0200)]
Move vi modelines closer to the beginning, so they're more likely to be actually used.

14 years agoChangelog...
Pavel Labath [Fri, 11 Sep 2009 21:24:33 +0000 (23:24 +0200)]
Changelog...

14 years agoInclude LUA_LIBS in the tolua configure test
Pavel Labath [Fri, 11 Sep 2009 21:07:50 +0000 (23:07 +0200)]
Include LUA_LIBS in the tolua configure test

14 years agoupdate machinery: fix accidential naming conflict
Phil Sutter [Wed, 9 Sep 2009 20:56:10 +0000 (22:56 +0200)]
update machinery: fix accidential naming conflict

14 years agoupdate machinery: fix for update_stat() on linux
Phil Sutter [Tue, 8 Sep 2009 20:15:09 +0000 (22:15 +0200)]
update machinery: fix for update_stat() on linux

14 years agoWeather forecast documentation fix: high -> hi
Pavel Labath [Wed, 9 Sep 2009 19:18:43 +0000 (21:18 +0200)]
Weather forecast documentation fix: high -> hi

Another option would be to change the code to expect "high" as a parameter

14 years agoFix window width calculation when $lua returns newlines
Pavel Labath [Wed, 9 Sep 2009 19:15:18 +0000 (21:15 +0200)]
Fix window width calculation when $lua returns newlines

I just hope it doesn't break anything.

14 years agoComment out OpenMP leftovers
Pavel Labath [Tue, 8 Sep 2009 18:49:40 +0000 (20:49 +0200)]
Comment out OpenMP leftovers

14 years agoupdate machinery: fix top objects
Phil Sutter [Sun, 6 Sep 2009 23:49:44 +0000 (01:49 +0200)]
update machinery: fix top objects

This is a bit messy, but since the top update stuff could use a rewrite
anyway, this should do.

14 years agoignore the auto-generated script compile
Phil Sutter [Sun, 6 Sep 2009 23:38:13 +0000 (01:38 +0200)]
ignore the auto-generated script compile

14 years agoupdate machinery: let CALLBACK() die again
Phil Sutter [Sun, 6 Sep 2009 23:22:16 +0000 (01:22 +0200)]
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.

14 years agoupdate machinery: clean up
Phil Sutter [Sun, 6 Sep 2009 23:12:11 +0000 (01:12 +0200)]
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.

14 years agoupdate machinery: complete transition
Phil Sutter [Sun, 6 Sep 2009 23:05:33 +0000 (01:05 +0200)]
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.

14 years agorework the update machinery to use callbacks
Phil Sutter [Sun, 6 Sep 2009 22:14:54 +0000 (00:14 +0200)]
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.

14 years agomove the static last_*_update variables into the function
Phil Sutter [Sun, 6 Sep 2009 19:57:19 +0000 (21:57 +0200)]
move the static last_*_update variables into the function

14 years agoRewrite hddtemp support for better scaling
Phil Sutter [Sun, 6 Sep 2009 19:53:53 +0000 (21:53 +0200)]
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).

14 years agouse CLEANFILES instead of defining a custom clean target
Phil Sutter [Sat, 5 Sep 2009 01:34:33 +0000 (03:34 +0200)]
use CLEANFILES instead of defining a custom clean target

14 years agocleanup src/Makefile.am
Phil Sutter [Sat, 5 Sep 2009 01:30:12 +0000 (03:30 +0200)]
cleanup src/Makefile.am

Since the files mentioned in conky_SOURCES are already included in the
distfile, no need to specify them again in EXTRA_DIST.

14 years agofix lua automake rules for distfile creation
Phil Sutter [Sat, 5 Sep 2009 00:33:42 +0000 (02:33 +0200)]
fix lua automake rules for distfile creation

14 years agomove the ncurses.h include from conky.h to core.c
Phil Sutter [Thu, 3 Sep 2009 22:08:40 +0000 (00:08 +0200)]
move the ncurses.h include from conky.h to core.c

Fixes some namespace error with libmpdclient.c.

14 years agooutsource the whole template object machinery
Phil Sutter [Thu, 3 Sep 2009 21:53:20 +0000 (23:53 +0200)]
outsource the whole template object machinery

14 years agoignore lua/.deps/
Phil Sutter [Thu, 3 Sep 2009 20:32:32 +0000 (22:32 +0200)]
ignore lua/.deps/

14 years agoFix if_running not working on linux when a top flavour is not running
Cesare Tirabassi [Thu, 3 Sep 2009 21:13:14 +0000 (23:13 +0200)]
Fix if_running not working on linux when a top flavour is not running

14 years agoDon't abort diskio objects initialisation if the given device doesn't exist, we could...
Cesare Tirabassi [Fri, 14 Aug 2009 16:32:39 +0000 (18:32 +0200)]
Don't abort diskio objects initialisation if the given device doesn't exist, we could have these objects iffed; closes LP: #405188

14 years agoPrecised last two weather_forecast xpaths
Cesare Tirabassi [Tue, 11 Aug 2009 14:10:35 +0000 (16:10 +0200)]
Precised last two weather_forecast xpaths

14 years agoAdd day and date data_type to
Cesare Tirabassi [Mon, 10 Aug 2009 20:46:21 +0000 (22:46 +0200)]
Add day and date data_type to