monky
15 years agoAdding if_up support for FreeBSD.
Nikos Ntarmos [Sat, 28 Mar 2009 23:15:20 +0000 (01:15 +0200)]
Adding if_up support for FreeBSD.

Moved interface_up(...) from linux.{c.h} to common.{c,h} and taught it
to check for ENXIO as well to make it work on FreeBSD.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agoBringing FreeBSD up to date with latest commits
Nikos Ntarmos [Sat, 28 Mar 2009 19:53:02 +0000 (21:53 +0200)]
Bringing FreeBSD up to date with latest commits

Several things were broken after the switch to 1.7-rc branches. This
diff fixes all compilations issues and updates some functions that were
left empty previously.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agosysfs is a Linux-only feature.
Nikos Ntarmos [Sat, 28 Mar 2009 19:46:20 +0000 (21:46 +0200)]
sysfs is a Linux-only feature.

Moving sysfs-related functions and defs out of common.h and into
linux.h, as sysfs exists only on Linux, and updating openbsd.c,
netbsd.c, and freebsd.c accordingly.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agoExtra includes to fix compiling on FreeBSD
Nikos Ntarmos [Sat, 28 Mar 2009 17:53:35 +0000 (19:53 +0200)]
Extra includes to fix compiling on FreeBSD

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agoFix FOPENCOOKIE detection glitch
Nikos Ntarmos [Sat, 28 Mar 2009 17:49:56 +0000 (19:49 +0200)]
Fix FOPENCOOKIE detection glitch

Using AM_CONDITIONAL's inside an if block is considered "confusing" by
the automake manual[1] and in fact leads to configure code that won't
work unless fopencookie actually exists in a system.

[1] http://sources.redhat.com/automake/automake.html#Conditionals

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agoFix a typo and teach linux code to use data
Nikos Ntarmos [Sat, 28 Mar 2009 17:47:53 +0000 (19:47 +0200)]
Fix a typo and teach linux code to use data

Typo: __LINUX__ was used in a conditional code block, while the rest of
      the code uses __linux__

data: free_text_objects(...) #define's 'data' to be 'obj->data' to make
  the code more compact. The linux-specific parts of the code still
  used obj->data, which should expand to obj->obj->data, which is
  wrong.

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>

15 years agoupdate README and manpage
Phil Sutter [Tue, 24 Mar 2009 00:25:56 +0000 (01:25 +0100)]
update README and manpage

15 years agoadd eval object, evaluating it's args
Phil Sutter [Mon, 23 Mar 2009 23:27:51 +0000 (00:27 +0100)]
add eval object, evaluating it's args

This object makes use of the possibility to escape dollar signs in TEXT.
Take the following example in the conkyrc:
| $${downspeed ${gw_iface}}
will be evaluated to (assuming the gw_iface is eth0):
| ${downspeed eth0}
and finally interpreted to print the gateway interface's downspeed rate.

15 years agofix dollar escape in TEXT
Phil Sutter [Mon, 23 Mar 2009 23:29:07 +0000 (00:29 +0100)]
fix dollar escape in TEXT

The idea found in the code is any double dollar ($$) is being treated as
explicit dollar sign ($) instead of the start of a text object
reference. Due to missing update of the 's' variable, when creating a
text object for the text following the second dollar sign, the later was
prepended, leading to a double dollar in the output.

15 years agofix temporary printing of "(null)" for mpd vars
Phil Sutter [Mon, 23 Mar 2009 22:42:59 +0000 (23:42 +0100)]
fix temporary printing of "(null)" for mpd vars

To minimise the chance of printing variables in an undefined state, call
free() as late as possible (i.e., right before strdup()'ing the new
value).

15 years agoCouple minor fixes.
Brenden Matthews [Thu, 19 Mar 2009 19:40:49 +0000 (13:40 -0600)]
Couple minor fixes.

Make X11_initialise() work as it should, clarified IBM/Lenovo aka smapi
support in configure script.

15 years agoMake print_config() stuff match configure.
Brenden Matthews [Wed, 18 Mar 2009 06:29:01 +0000 (00:29 -0600)]
Make print_config() stuff match configure.

15 years agoRegenerate docs.
Brenden Matthews [Wed, 18 Mar 2009 05:26:56 +0000 (23:26 -0600)]
Regenerate docs.

15 years agoAdds the docs for the gauges
newclearman [Thu, 19 Mar 2009 07:20:38 +0000 (00:20 -0700)]
Adds the docs for the gauges

Signed-off-by: Brenden Matthews <brenden@rty.ca>

15 years agoFix: make sure compiling without X11 works
Nikolas Garofil [Tue, 17 Mar 2009 17:36:46 +0000 (18:36 +0100)]
Fix: make sure compiling without X11 works

15 years agoFix possible mem leak with net stats.
Brenden Matthews [Mon, 16 Mar 2009 21:56:37 +0000 (15:56 -0600)]
Fix possible mem leak with net stats.

15 years agoUpdate changelog.
Brenden Matthews [Mon, 16 Mar 2009 21:31:42 +0000 (15:31 -0600)]
Update changelog.

15 years agoMerge branch 'master' of git.omp.am:/home/omp/git/conky
Nikolas Garofil [Mon, 16 Mar 2009 20:21:11 +0000 (21:21 +0100)]
Merge branch 'master' of git.omp.am:/home/omp/git/conky

15 years agoNo limits for environment variables
Nikolas Garofil [Mon, 16 Mar 2009 20:14:22 +0000 (21:14 +0100)]
No limits for environment variables

Use dynamic allocated memory for skey and svalue,
allocate the length of value so that there are no limits,
but don't use the %a gnu extension to maintain compatibility

15 years agoFix wacky net speed values on startup.
Brenden Matthews [Mon, 16 Mar 2009 20:13:33 +0000 (14:13 -0600)]
Fix wacky net speed values on startup.

15 years agoMake gauge stuff look a little less funny.
Brenden Matthews [Mon, 16 Mar 2009 19:40:22 +0000 (13:40 -0600)]
Make gauge stuff look a little less funny.

15 years agoUnbreak alias stuff.
Brenden Matthews [Mon, 16 Mar 2009 19:21:09 +0000 (13:21 -0600)]
Unbreak alias stuff.

It was broken by commit 98c64d8b3ea93a5a3ee098783b1399982f8c97a2, I did
a lowsy job of checking the patch over.

15 years agoUpdate docs for $if_running.
Brenden Matthews [Mon, 16 Mar 2009 04:14:07 +0000 (22:14 -0600)]
Update docs for $if_running.

15 years agoUpdate configure.ac.in for 1.7.x.
Brenden Matthews [Mon, 16 Mar 2009 02:03:12 +0000 (20:03 -0600)]
Update configure.ac.in for 1.7.x.

15 years agoUpdating changelog.
Brenden Matthews [Mon, 16 Mar 2009 01:37:11 +0000 (19:37 -0600)]
Updating changelog.

15 years agoI added Gagues to monitor variables
aner [Wed, 11 Mar 2009 00:37:24 +0000 (17:37 -0700)]
I added Gagues to monitor variables

Signed-off-by: Brenden Matthews <brenden@rty.ca>

15 years agoDisk i/o support on FreeBSD patch.
Nikos Ntarmos [Mon, 16 Mar 2009 01:11:49 +0000 (19:11 -0600)]
Disk i/o support on FreeBSD patch.

Patch sf.net id #2657227 (thanks Nikos).

15 years agoUpdating changelog.
Brenden Matthews [Mon, 16 Mar 2009 01:01:06 +0000 (19:01 -0600)]
Updating changelog.

15 years agoAdd extra_newline option for awesome's wiboxes
Ali Polatel [Wed, 25 Feb 2009 21:16:05 +0000 (23:16 +0200)]
Add extra_newline option for awesome's wiboxes

Hi Brenden,
Below is an updated patch, it works for me with the master.

p.s: don't forget to use git-am to apply the patch ;p

Signed-off-by: Brenden Matthews <brenden@rty.ca>

15 years agoFix compilation errors.
Brenden Matthews [Mon, 16 Mar 2009 00:34:40 +0000 (18:34 -0600)]
Fix compilation errors.

I hope I didn't break the alias stuff.

15 years agofix use_spacer in default config (sf.net id #2638653)
Nikolas Garofil [Sun, 15 Mar 2009 16:39:53 +0000 (17:39 +0100)]
fix use_spacer in default config (sf.net id #2638653)

15 years agofix problems with negative numbers (sf.net id #2644593) (thanks Zhoushen Huang)
Nikolas Garofil [Sun, 15 Mar 2009 16:09:35 +0000 (17:09 +0100)]
fix problems with negative numbers (sf.net id #2644593) (thanks Zhoushen Huang)

15 years agobugfix: segfault when nothing x11-related is mentioned before TEXT
Nikolas Garofil [Sun, 15 Mar 2009 00:17:32 +0000 (01:17 +0100)]
bugfix: segfault when nothing x11-related is mentioned before TEXT

15 years agoAdded alias configfile setting
Nikolas Garofil [Sat, 7 Mar 2009 14:12:09 +0000 (15:12 +0100)]
Added alias configfile setting

This patch is written by a anonymous author, see patch on sf.net
id #2663691 . I changed it a bit so that it can't overwrite
existing environment variables and updated the docs and syntaxfiles

15 years agoupdate README and manpage
Phil Sutter [Sun, 1 Mar 2009 20:12:46 +0000 (21:12 +0100)]
update README and manpage

15 years agofix padding of $processes
Phil Sutter [Sun, 1 Mar 2009 20:06:23 +0000 (21:06 +0100)]
fix padding of $processes

Padding to 4 digits allows for max 9999 processes, which should really
be more than enough for systems running conky. ;)

15 years agofix padding in temp_print
Phil Sutter [Sun, 1 Mar 2009 20:03:49 +0000 (21:03 +0100)]
fix padding in temp_print

15 years agointroduce percent_print() for printing percentages
Phil Sutter [Sun, 1 Mar 2009 19:53:47 +0000 (20:53 +0100)]
introduce percent_print() for printing percentages

15 years agorewrite human_readable() to minimise padding
Phil Sutter [Sun, 1 Mar 2009 19:24:22 +0000 (20:24 +0100)]
rewrite human_readable() to minimise padding

Also fix spaced_print(): when given a width of e.g. 3, output at least 3
characters, not 2 as it was before.

15 years agoif_updatenr added
Nikolas Garofil [Sun, 1 Mar 2009 14:10:01 +0000 (15:10 +0100)]
if_updatenr added

15 years agomove the custom defined memrchr to the right place
Phil Sutter [Tue, 24 Feb 2009 23:22:31 +0000 (00:22 +0100)]
move the custom defined memrchr to the right place

And make it static, as tailhead.c is the only user of it.

15 years agofix 966a05a9848f20a740c5e695d182039ebfe7d2fd
Phil Sutter [Mon, 23 Feb 2009 22:28:12 +0000 (23:28 +0100)]
fix 966a05a9848f20a740c5e695d182039ebfe7d2fd

15 years agoadd help text for --print-config option
Phil Sutter [Sun, 22 Feb 2009 17:55:39 +0000 (18:55 +0100)]
add help text for --print-config option

While here, fix also -C for builds with --disable-x11.

15 years agowhitespace cleanup
Phil Sutter [Sun, 22 Feb 2009 17:35:47 +0000 (18:35 +0100)]
whitespace cleanup

15 years agoremove x11 dependency of fonts
Phil Sutter [Sun, 22 Feb 2009 17:21:15 +0000 (18:21 +0100)]
remove x11 dependency of fonts

Instead, we just ignore them. Less errors in output, little less
ifdef's.

15 years agosplit off specials from conky.c
Phil Sutter [Sun, 22 Feb 2009 16:53:30 +0000 (17:53 +0100)]
split off specials from conky.c

As a side effect, font and colour specific stuff got outsourced, too.
This is because the apropriate functions are used by conky.c as well as
specials.c, so they should be kept on their own.

In the long term I hope for positive impact on the X11 integration mess.
(Take e.g. the mass of X11 ifdefs cluttering conky.c.) Though this
commit contains no optimisations in this direction, just plain
outsourcing, to ensure minimised (intended: none) changes to conky's
interface behaviour.

15 years agoadd doxygen support
Phil Sutter [Sun, 22 Feb 2009 16:40:45 +0000 (17:40 +0100)]
add doxygen support

Since we have no doxygen compatible code comments (we hardly have
comments at all ;) there is not much documentation to be extracted. But
this is still useful, as doxy generates us nice callgraphs showing the
internal code flow chaos. :)

Usage is as follows: after having run ./autogen.sh, doxygen can be
triggered by simply issuing 'make doxy'. This will generate a doxy
config if none exists, and preset some stuff inside (especially
parsing of undocumented stuff). Before all consecutive invocations, the
doxy config (named 'Doxyfile') can be customised to one's personal
needs.

15 years agofix for building with --disable-x11
Phil Sutter [Sun, 22 Feb 2009 02:07:14 +0000 (03:07 +0100)]
fix for building with --disable-x11

15 years agomerge tail and head into a single source file
Phil Sutter [Mon, 5 Jan 2009 12:11:13 +0000 (13:11 +0100)]
merge tail and head into a single source file

This allows having the same init-function for both objects. Code size
could be further reduced, as the print-functions share some code, too.

15 years agoput tail and head code into separate files
Phil Sutter [Mon, 5 Jan 2009 00:27:07 +0000 (01:27 +0100)]
put tail and head code into separate files

In fact these two objects share a lot of code, so the bigger plan is to
merge them into a single file to share equal code.

This should not change anything to the code flow, besides making conky
startup a bit more robust due to less use of CRIT_ERR.

15 years agomerge ibm-acpi and smapi together
Phil Sutter [Sat, 3 Jan 2009 23:25:15 +0000 (00:25 +0100)]
merge ibm-acpi and smapi together

Well, not really. I don't dare putting it all together into a single
source file, as that would just not make sense. Instead, this patch
eliminates the --enable-smapi configure option and all related checks,
replacing them with the equivalents from --enable-ibm.

15 years agooutsource ibm-acpi stuff into it's own source file
Phil Sutter [Sat, 3 Jan 2009 23:00:52 +0000 (00:00 +0100)]
outsource ibm-acpi stuff into it's own source file

Despite this is actually not much code and could stay inside linux.c as
well, this makes sense as I want to combine smapi and ibm-acpi
functionality. Virtually every user of a notebook made by IBM/Lenovo
will want both, so this should be a feature not a bug.

Besides making the ibm-acpi objects being built optionally, this should
not change anything to the code flow.

15 years agorewrite linux diskio code
Phil Sutter [Thu, 25 Dec 2008 15:36:29 +0000 (16:36 +0100)]
rewrite linux diskio code

Instead of using a hardcoded maximum number of slots for
stats of different disks, use a linked list. Also since the algorithm to
update each device's counters is the same for updating the totals, share
equal code, which in my eyes not only saves a bunch of LoC, but also
drastically increases readability.

15 years agofix potential segfault
Phil Sutter [Thu, 25 Dec 2008 14:06:38 +0000 (15:06 +0100)]
fix potential segfault

The segfault can be triggered by using any diskio object with a
non-existent device, as prepare_diskio_stat() then returns 0 and the
call to obj->data.diskio->current in conky.c:4050 pulls the trigger.

In fact, it's not a problem when the device doesn't exist, as
update_diskio() simply won't fill in any values. So skip the check and
upon device node appearance everything goes it's normal way.

While there, also eliminate double readout of the last line of
/proc/diskstats: after the last line has been read, FEOF is not yet set.
BUT fgets() will return NULL when trying to read the next line. So
better check for fgets()'s return value instead of using feof().

Also strncmp() is useless here, since we really want to compare the full
paths. Besides, text_buffer_size also should be big enough to not make a
difference here.

15 years agofix coding style of the last few patches
Phil Sutter [Sat, 21 Feb 2009 23:37:15 +0000 (00:37 +0100)]
fix coding style of the last few patches

Also, note that free() does not zero the passed pointer. So conditional
freeing always needs to look like this:
| if (var) {
|     free(var);
|     var = 0;
| }

15 years agoNo space between number and units please.
Brenden Matthews [Wed, 18 Feb 2009 05:50:43 +0000 (22:50 -0700)]
No space between number and units please.

15 years agoNull mpd variables should have an empty string patch sf.net id #2564747.
Sattvik [Wed, 18 Feb 2009 05:42:08 +0000 (22:42 -0700)]
Null mpd variables should have an empty string patch sf.net id #2564747.

15 years agoXMMS2 fix and refactoring patch sf.net id #2579357 (thanks Tamim).
Tamim Khan [Wed, 18 Feb 2009 05:29:42 +0000 (22:29 -0700)]
XMMS2 fix and refactoring patch sf.net id #2579357 (thanks Tamim).

15 years agoExtended support for local Maildir patch sf.net id #2561323 (thanks Nicolas).
Nicolas Sierro [Wed, 18 Feb 2009 05:26:15 +0000 (22:26 -0700)]
Extended support for local Maildir patch sf.net id #2561323 (thanks Nicolas).

15 years agoFix shown battery status patch.
Martin Tůma [Wed, 18 Feb 2009 05:19:25 +0000 (22:19 -0700)]
Fix shown battery status patch.

Fix shown battery status when the battery is not charging any more but is not full charged patch sf.net id #2556056 (thanks Martin).

15 years agoPatch to clarify things in conky.conf sf.net id #2548805 (thanks Carpathia).
Carpathia [Wed, 18 Feb 2009 05:14:59 +0000 (22:14 -0700)]
Patch to clarify things in conky.conf sf.net id #2548805 (thanks Carpathia).

15 years agoFix nvidia memory frequency reading patch sf.net id #2493134.
Alexander Monakov [Wed, 18 Feb 2009 05:10:15 +0000 (22:10 -0700)]
Fix nvidia memory frequency reading patch sf.net id #2493134.

15 years agoFix diskio_read/write patch sf.net id #2493084 (thanks Alexander).
Alexander Monakov [Wed, 18 Feb 2009 05:04:38 +0000 (22:04 -0700)]
Fix diskio_read/write patch sf.net id #2493084 (thanks Alexander).

15 years agoPatch by Kim Holviala sf.net id #2484548.
Kim Holviala [Wed, 18 Feb 2009 05:00:23 +0000 (22:00 -0700)]
Patch by Kim Holviala sf.net id #2484548.

* change the height of execbar and execibar to be the same as other
bars have by default (6 pixels)
* treat mixer values as percentages as they're usually 0-100 (switch
to spaced_print() with pad_percents)
* change temp_print() from snprintf() to spaced_print()
* remove decimals from temp_print() as none of the current sources can
supply values smaller than 1 degree (C or F, doesn't matter)
* add a space between number and the unit in human_readable()
* fix number printing in human_readable()
* network $upspeed and $downspeed now use human_readable()

15 years agoPatch to add $battery_short variable.
Swoög [Wed, 18 Feb 2009 04:49:45 +0000 (21:49 -0700)]
Patch to add $battery_short variable.

15 years agoMisc compilation fixes.
Brenden Matthews [Wed, 18 Feb 2009 04:45:06 +0000 (21:45 -0700)]
Misc compilation fixes.

15 years agoout_to_x can now be turned off
Nikolas Garofil [Sat, 14 Feb 2009 12:03:11 +0000 (13:03 +0100)]
out_to_x can now be turned off

15 years agodocs and syntax for overwrite_file and append_file
Nikolas Garofil [Thu, 12 Feb 2009 22:04:39 +0000 (23:04 +0100)]
docs and syntax for overwrite_file and append_file

15 years agoappend_file output method
Nikolas Garofil [Thu, 12 Feb 2009 21:45:18 +0000 (22:45 +0100)]
append_file output method

15 years agooverwrite_file output method
Nikolas Garofil [Thu, 12 Feb 2009 21:35:00 +0000 (22:35 +0100)]
overwrite_file output method

15 years agoAdded output_to_stderr
Nikolas Garofil [Tue, 10 Feb 2009 08:43:20 +0000 (09:43 +0100)]
Added output_to_stderr

15 years agoFix my last 'fix'.
Brenden Matthews [Mon, 9 Feb 2009 19:36:10 +0000 (12:36 -0700)]
Fix my last 'fix'.

15 years agoFix warning on older versions of gcc.
Brenden Matthews [Sun, 8 Feb 2009 17:29:49 +0000 (10:29 -0700)]
Fix warning on older versions of gcc.

15 years agoCouple fixes for the top_time stuff.
Brenden Matthews [Sun, 8 Feb 2009 17:13:54 +0000 (10:13 -0700)]
Couple fixes for the top_time stuff.

15 years agobetter combine top, top_mem and top_time handlers
Alexander Graf [Sun, 8 Feb 2009 16:19:10 +0000 (17:19 +0100)]
better combine top, top_mem and top_time handlers

15 years agoAlso free process list when ${top_time} is used
Alexander Graf [Sun, 8 Feb 2009 15:16:12 +0000 (16:16 +0100)]
Also free process list when ${top_time} is used

15 years agotop.c: Allow heavier optimization
Alexander Graf [Sun, 8 Feb 2009 15:13:45 +0000 (16:13 +0100)]
top.c: Allow heavier optimization

This makes it possible for the compiler to do better optimizations by
adding "static" to functions which do not need to be exported.

Since some of them (e.g. the compare_*() functions) are called very
often, this may decrease conky's need of resources a bit.

15 years agoDon't do unneeded sp_acopy() calls
Alexander Graf [Sun, 8 Feb 2009 15:05:42 +0000 (16:05 +0100)]
Don't do unneeded sp_acopy() calls

15 years agoUpdate README and conky.1
Alexander Graf [Sat, 7 Feb 2009 16:44:19 +0000 (17:44 +0100)]
Update README and conky.1

With my last patch I did only update the XML documentation file without
updating the auto-generated manpage and README file.

This patch also updates README and conky.1.

15 years agoAdd ${top_time} sorting processes by CPU time
Alexander Graf [Sat, 7 Feb 2009 14:01:50 +0000 (15:01 +0100)]
Add ${top_time} sorting processes by CPU time

15 years agoBuild fix patch
mipas [Tue, 23 Dec 2008 03:59:42 +0000 (20:59 -0700)]
Build fix patch

This patch fixes build errors on some platforms due to missing includes.

15 years agosimplify declaration of ifblock objects
Phil Sutter [Mon, 22 Dec 2008 18:43:12 +0000 (19:43 +0100)]
simplify declaration of ifblock objects

Like OBJ_THREAD, OBJ_IF automatically calls obj_be_ifblock_if() when the
object matches.

15 years agouse a global struct moc_s
Phil Sutter [Mon, 22 Dec 2008 18:31:48 +0000 (19:31 +0100)]
use a global struct moc_s

Since there is no choice of which moc player to get information from,
all moc objects' data source can be identical. Also hide some internal
data (the thread e.g.). Since from now on there can only be one moc
thread (not highlander ;), we don't need to treat the thread object
specially.

While here, fix indenting.

15 years agoseparate parsing and interpreting text objects for certain objects
Phil Sutter [Mon, 22 Dec 2008 17:36:44 +0000 (18:36 +0100)]
separate parsing and interpreting text objects for certain objects

All objects parsing text into objects formerly parsed and evaluated
their arguments each update interval. This does only make sense when the
parsed text could change between updates, which is the case for execp
and execpi objects, but none of the others. So have them parse the text
when creating them, so each update interval only the output has to be
re-extracted.

In fact, this should give a performance boost when using any of the
affected objects, as parsing the input text is quite expensive since
we're evaluating templates.

15 years agomove and add function prototypes to src/conky.c
Phil Sutter [Mon, 22 Dec 2008 16:55:21 +0000 (17:55 +0100)]
move and add function prototypes to src/conky.c

15 years agodo not use a global ifblock stack
Phil Sutter [Mon, 22 Dec 2008 16:45:08 +0000 (17:45 +0100)]
do not use a global ifblock stack

Using a global ifblock stack for all parsed ifblock objects causes
problems when doing sub-parsing in objects taking other objects as
parameters, because the possibly non-empty stack at startup leads to
false alarm when checking for stack emptiness after parsing the objects.

Use a void ** as the object to pass around, so callers don't need to
know struct ifblock_stack_obj.

15 years agotreat mpd opjects as non-threaded
Phil Sutter [Sat, 20 Dec 2008 01:32:45 +0000 (02:32 +0100)]
treat mpd opjects as non-threaded

In fact, they are. But we don't want to treat them as those, because
the rewrite made the only situation when threaded objects matter
uncritical, i.e. when an object calls calling parse_conky_vars().

15 years agoadd if_match object comparing strings, floats and ints
Phil Sutter [Sat, 20 Dec 2008 01:31:00 +0000 (02:31 +0100)]
add if_match object comparing strings, floats and ints

In general, argument types should match, but for combined long and
double usage the long is being converted to double before evaluation.

A few examples:
${if_match ${cpu} < 30}
${if_match "asdf" != "qwer"}
${if_match 0.5 < 0.50001}
${if_match 49.999 < 50}

15 years agofix segfault for diskiograph
Phil Sutter [Thu, 18 Dec 2008 14:03:02 +0000 (15:03 +0100)]
fix segfault for diskiograph

The crux is to split args between those for scan_graph() on one hand and
prepare_diskio_stat() on the other hand. To make the code working with
minimal changes, move the yet optional devicename to the end.

General note on graphs:
- for all graphs there exist the optional arguments for scan_graph()
  which come first and are optional (intended duplicate)
- all other args are object specific, and may be optional as well

15 years agointernal rewrite of mpd support
Phil Sutter [Thu, 18 Dec 2008 12:37:53 +0000 (13:37 +0100)]
internal rewrite of mpd support

Handle mpd internal information inside mpd.c. Use a refcounter to check
if the mpd-information can be freed (maybe useless). Remove the now
useless "full" flag of free_text_objects.

15 years agoMerge branch 'master' of git://nwl.cc/~n0-1/conky
Brenden Matthews [Thu, 18 Dec 2008 00:03:33 +0000 (17:03 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky

15 years agoMake gateway objects also detect routes with missing RTF_GATEWAY flag
Phil Sutter [Wed, 17 Dec 2008 01:06:34 +0000 (02:06 +0100)]
Make gateway objects also detect routes with missing RTF_GATEWAY flag

This was a bug, not a feature. From the FreeBSD manpage rtentry(9):

| Vt struct sockaddr *rt_gateway;
|
| The "target" of the route, which can either represent a destination in
| its own right (some protocols will put a link-layer address here), or
| some intermediate stop on the way to that destination (if the
| RTF_GATEWAY flag is set).

So for a default route with "dest" and "mask" both zero, either
RTF_GATEWAY is present, or "gate" is zero.

15 years agoPossible fix for minor IMAP idle bug.
Brenden Matthews [Tue, 16 Dec 2008 04:55:48 +0000 (21:55 -0700)]
Possible fix for minor IMAP idle bug.

15 years agoUpdate docs.
Brenden Matthews [Tue, 16 Dec 2008 04:18:24 +0000 (21:18 -0700)]
Update docs.

15 years agoPatch to allow escaping newlines in the config.
Itai Zukerman [Tue, 16 Dec 2008 04:17:56 +0000 (21:17 -0700)]
Patch to allow escaping newlines in the config.

15 years agoMerge branch 'master' of git://nwl.cc/~n0-1/conky
Brenden Matthews [Tue, 16 Dec 2008 04:01:58 +0000 (21:01 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky

15 years agosimplify human_readable
Phil Sutter [Tue, 16 Dec 2008 02:18:35 +0000 (03:18 +0100)]
simplify human_readable

The only change of behaviour occurs when adjusting the unit of positive
values. For some reason 1000LL was used, which has now been replaced by
1024LL. Usage of abs() and MAX() might be OS dependent, but it should
not be too hard to implement them by hand if they're missing somewhere.

15 years agomake use_spacer an enum
Phil Sutter [Tue, 16 Dec 2008 01:56:26 +0000 (02:56 +0100)]
make use_spacer an enum

It was a static int before, holding the (already defined) enum's value,
which doesn't make sense. Also it's used only inside conky.c. Since
enums can't be assigned other values than what are defined, we can skip
checking for illegal spacer value at each invocation of spaced_print,
and then also drop the function name argument, which apparently didn't
make sense at all, because use_spacer is a global option.

15 years agosimplify diskio stats
Phil Sutter [Tue, 16 Dec 2008 01:32:30 +0000 (02:32 +0100)]
simplify diskio stats

Instead of splitting information, use diskio_stats[0] in diskio.c for
the totals. This saves a few branches, and frees some data from struct
information.

15 years agoMerge branch 'master' of git://nwl.cc/~n0-1/conky
Brenden Matthews [Tue, 16 Dec 2008 01:00:05 +0000 (18:00 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky