Nikolas Garofil [Thu, 12 Feb 2009 22:04:39 +0000 (23:04 +0100)]
docs and syntax for overwrite_file and append_file
Nikolas Garofil [Thu, 12 Feb 2009 21:45:18 +0000 (22:45 +0100)]
append_file output method
Nikolas Garofil [Thu, 12 Feb 2009 21:35:00 +0000 (22:35 +0100)]
overwrite_file output method
Nikolas Garofil [Tue, 10 Feb 2009 08:43:20 +0000 (09:43 +0100)]
Added output_to_stderr
Brenden Matthews [Mon, 9 Feb 2009 19:36:10 +0000 (12:36 -0700)]
Fix my last 'fix'.
Brenden Matthews [Sun, 8 Feb 2009 17:29:49 +0000 (10:29 -0700)]
Fix warning on older versions of gcc.
Brenden Matthews [Sun, 8 Feb 2009 17:13:54 +0000 (10:13 -0700)]
Couple fixes for the top_time stuff.
Alexander Graf [Sun, 8 Feb 2009 16:19:10 +0000 (17:19 +0100)]
better combine top, top_mem and top_time handlers
Alexander Graf [Sun, 8 Feb 2009 15:16:12 +0000 (16:16 +0100)]
Also free process list when ${top_time} is used
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.
Alexander Graf [Sun, 8 Feb 2009 15:05:42 +0000 (16:05 +0100)]
Don't do unneeded sp_acopy() calls
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.
Alexander Graf [Sat, 7 Feb 2009 14:01:50 +0000 (15:01 +0100)]
Add ${top_time} sorting processes by CPU time
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.
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.
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.
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.
Phil Sutter [Mon, 22 Dec 2008 16:55:21 +0000 (17:55 +0100)]
move and add function prototypes to src/conky.c
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.
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().
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}
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
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.
Brenden Matthews [Thu, 18 Dec 2008 00:03:33 +0000 (17:03 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky
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.
Brenden Matthews [Tue, 16 Dec 2008 04:55:48 +0000 (21:55 -0700)]
Possible fix for minor IMAP idle bug.
Brenden Matthews [Tue, 16 Dec 2008 04:18:24 +0000 (21:18 -0700)]
Update docs.
Itai Zukerman [Tue, 16 Dec 2008 04:17:56 +0000 (21:17 -0700)]
Patch to allow escaping newlines in the config.
Brenden Matthews [Tue, 16 Dec 2008 04:01:58 +0000 (21:01 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky
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.
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.
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.
Brenden Matthews [Tue, 16 Dec 2008 01:00:05 +0000 (18:00 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky
Phil Sutter [Mon, 15 Dec 2008 21:40:24 +0000 (22:40 +0100)]
here comes the big header include rewrite
Some statics are now defined by configure.ac.in, conky.h got a lot
smaller, which I see as a positive sign.
This patch should not change any functionality, just change what's
defined where. Some features I did/could not test are probably broken,
also compiling for any other OS surely won't complete now. Though I
think fixing these problems is as easy as including some missing
headers.
I've done compile checks with the following configure options:
./configure --enable-eve --enable-rss --enable-smapi
--enable-wlan --enable-debug --enable-testing
So what needs to be tested is:
- audacious
- BMPx
- xmms2
- nvidia
Phil Sutter [Mon, 15 Dec 2008 18:09:57 +0000 (19:09 +0100)]
outsource ifblock and text_object helpers
Phil Sutter [Mon, 15 Dec 2008 17:31:23 +0000 (18:31 +0100)]
put text_object stuff into an own header
For now this is only the object type enum and struct text_object, but it
will do to prepare further outsourcing from both conky.c and conky.h.
Phil Sutter [Mon, 15 Dec 2008 01:44:21 +0000 (02:44 +0100)]
organise text objects in a linked list
In fact, this eases code a lot. Even the ifblock handling, which was the
biggest problem of the rewrite, could be cleaned up a lot.
Phil Sutter [Mon, 15 Dec 2008 15:59:07 +0000 (16:59 +0100)]
have a maximum width for all variable length mpd vars
Thanks to FreakGuard (IRC) preparing this one.
Phil Sutter [Mon, 15 Dec 2008 15:54:57 +0000 (16:54 +0100)]
simplify free_text_objects a bit
Phil Sutter [Mon, 15 Dec 2008 15:39:48 +0000 (16:39 +0100)]
simplify if_existing evaluation
Brenden Matthews [Mon, 15 Dec 2008 05:42:20 +0000 (22:42 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky
Conflicts:
configure.ac.in
Phil Sutter [Sun, 14 Dec 2008 16:53:31 +0000 (17:53 +0100)]
enable DEV_NAME to handle symlinks
Using a macro is not possible anymore, so have a function dev_name() do
the job. Functionality is the same as the old DEV_NAME, unless the
specified path is a symlink in which case it's being dereferenced first.
To save callers from having to free the returned string, a static local
buffer is used (effectively rendering the function non-reentrant).
Phil Sutter [Sun, 14 Dec 2008 13:36:44 +0000 (14:36 +0100)]
use the builtin config also as a default one
This depends on fopencookie, which is linux-specific. For BSD, there is
a similar function called funopen, which can be used as a drop-in
replacement.
Brenden Matthews [Sun, 14 Dec 2008 03:55:45 +0000 (20:55 -0700)]
Improve behaviour of $pb_battery.
Phil Sutter [Sun, 14 Dec 2008 03:21:46 +0000 (04:21 +0100)]
print config output support in the final stats
Brenden Matthews [Sun, 14 Dec 2008 03:16:34 +0000 (20:16 -0700)]
Build fix for config output.
Brenden Matthews [Sun, 14 Dec 2008 02:53:05 +0000 (19:53 -0700)]
Move imap/pop3 stuff into mail.c
Brenden Matthews [Sun, 14 Dec 2008 03:18:54 +0000 (20:18 -0700)]
Add text2c.sh to EXTRA_DIST.
Brenden Matthews [Sun, 14 Dec 2008 03:16:34 +0000 (20:16 -0700)]
Build fix for config output.
Phil Sutter [Sun, 14 Dec 2008 03:04:31 +0000 (04:04 +0100)]
add missing text2c for config printing support
Brenden Matthews [Sun, 14 Dec 2008 03:04:22 +0000 (20:04 -0700)]
Merge branch 'master' of git://nwl.cc/~n0-1/conky
Brenden Matthews [Sun, 14 Dec 2008 02:53:05 +0000 (19:53 -0700)]
Move imap/pop3 stuff into mail.c
Brenden Matthews [Sun, 14 Dec 2008 02:39:29 +0000 (19:39 -0700)]
Add conky.1 back into repo.
Phil Sutter [Sun, 14 Dec 2008 01:51:50 +0000 (02:51 +0100)]
fix disk_protect for linux-2.6.27
The path for the sysfs attribute has changed. Also negative values show
disabled disk protect, so catch this when interpreting the file's
content.
Phil Sutter [Fri, 12 Dec 2008 14:33:25 +0000 (15:33 +0100)]
implement sample config printing support
This patch makes Conky print a sample config when being called with the
'-C' flag.
A short test showed an increase of ~10kbytes of the conky binary's size.
Phil Sutter [Fri, 12 Dec 2008 14:32:16 +0000 (15:32 +0100)]
update the default config along with the syntax files
Phil Sutter [Tue, 9 Dec 2008 13:44:14 +0000 (14:44 +0100)]
rewrite tcp-portmon hooks
Global variables belonging to tcp-portmon are now separated from
conky.c, cleaning up struct information and struct text_object a bit.
Phil Sutter [Mon, 8 Dec 2008 23:12:23 +0000 (00:12 +0100)]
make semantics of custom strndup() comply with glibc
From strdup(3):
| If s is longer than n, only n characters are copied, and a
| terminating null byte ('\0') is added.
So allocate at most n+1 bytes and make sure the last one is zero, as
strncpy() doesn't add it itself.
So in fact to allow a maximum space for string dup of 23, strndup() has
to be called like this:
| dup = strndup(src, 23 - 1);
FIXME: Find the critical points in code this change touches and make
sure the invocation there is correct.
Phil Sutter [Mon, 8 Dec 2008 23:07:32 +0000 (00:07 +0100)]
rewrite template engine completely
Two things that pissed me off about the old one:
* only limited support for nesting templates
* totally broken output when using conditionals inside a template
The later one was the hard one to fix. ;)
It requires to already have the full text substituted before the text
objects are being created from it. Generating only the contained objects
broke, because the conditionals got wrong offsets to jump to.
After that was fixed, full nesting support is realised by simply
repeating the replacement until no more template objects are found.
Brenden Matthews [Tue, 9 Dec 2008 23:37:24 +0000 (16:37 -0700)]
Fix call to timed_thread_test().
Brenden Matthews [Tue, 9 Dec 2008 23:35:49 +0000 (16:35 -0700)]
Removing old svn keywords.
Brenden Matthews [Tue, 9 Dec 2008 23:15:06 +0000 (16:15 -0700)]
Fix broken cpu usage stuff (due to a previous commit).
Brenden Matthews [Tue, 9 Dec 2008 08:37:59 +0000 (01:37 -0700)]
Add an option to timed_thread_test() to not wait for the interval period (so that IMAP IDLE works better)
Brenden Matthews [Tue, 9 Dec 2008 06:15:20 +0000 (23:15 -0700)]
Merge branch 'master' of git.omp.am:/home/omp/git/conky
Brenden Matthews [Tue, 9 Dec 2008 06:14:46 +0000 (23:14 -0700)]
Update READMEs.
Brenden Matthews [Tue, 9 Dec 2008 06:12:58 +0000 (23:12 -0700)]
Removing svn ebuild, changing svn references to git.
Philip Kovacs [Tue, 9 Dec 2008 04:49:35 +0000 (23:49 -0500)]
added additional ignore files for later libtool versions.
Brenden Matthews [Tue, 9 Dec 2008 04:26:12 +0000 (21:26 -0700)]
We need the README for autmake to work correctly.
Phil Sutter [Mon, 8 Dec 2008 15:19:35 +0000 (16:19 +0100)]
update changelog
Phil Sutter [Mon, 8 Dec 2008 15:11:39 +0000 (16:11 +0100)]
drop docs of dropped objects
All the Fahrenheit specific objects have been removed due to
f5259295cf4ae642fc3c90151e5aab218aedf85b, remove their documentation
also.
Phil Sutter [Mon, 8 Dec 2008 15:03:46 +0000 (16:03 +0100)]
remove the automatically created README from git
This is causing trouble, as after each build switching branches is
impossible until the local modifications of README are being committed.
Since the whole file will be created when compiling conky, we can safely
ignore it (like with doc/conky.1).
Phil Sutter [Mon, 8 Dec 2008 15:01:15 +0000 (16:01 +0100)]
rewrite hddtemp
Phil Sutter [Mon, 8 Dec 2008 14:05:29 +0000 (15:05 +0100)]
fix for renamed DEBUG2 macro (again)
Phil Sutter [Sun, 7 Dec 2008 20:44:56 +0000 (21:44 +0100)]
set conky in dock mode to be withdrawn
Withdrawn windows are those you get from applications supporting the
'-w' flag, like e.g. gkrellm or all those sweet WindowMaker dockapps
(wmcpu and Co.). In Fluxbox, these windows are drawn into the slit. Most
other window managers put them into their "taskbar", AFAIK.
This patch makes Conky act exactly the same if the following settings
are selected:
| own_window yes
| own_window_type dock
Phil Sutter [Sun, 7 Dec 2008 19:08:29 +0000 (20:08 +0100)]
make unit of all temperatures selectable
This introduces a new configuration variable called "temperature_unit",
specifying the unit of all temperature sensors. To achieve this, each
object outputting a temperature has to call temp_print() like so:
| temp_print(p, p_max_size, <temp val as double>, <unit of val>);
to specify the input temperature unit, either one of the constants
TEMP_CELSIUS or TEMP_FAHRENHEIT.
Phil Sutter [Sun, 7 Dec 2008 18:47:57 +0000 (19:47 +0100)]
fix runtime debugging macros
Sadly, configure --enable-debug defines the macro DEBUG which conflicts
with the level1 debugging output macro. Rename them to DBG() and DBG2().
Brenden Matthews [Sun, 7 Dec 2008 22:58:40 +0000 (15:58 -0700)]
Limit $battery_percent to 100 (bug 2145006)
Brenden Matthews [Sun, 7 Dec 2008 22:54:40 +0000 (15:54 -0700)]
Don't put unit with hddtemp values for consistency (bug 2133107)
Brenden Matthews [Sun, 7 Dec 2008 22:49:04 +0000 (15:49 -0700)]
Fix broken $execbar (bug 2133709)
Brenden Matthews [Sun, 7 Dec 2008 22:44:10 +0000 (15:44 -0700)]
Fix last 'fix'
Brenden Matthews [Sun, 7 Dec 2008 22:34:46 +0000 (15:34 -0700)]
Allow more than 9 CPUs for CPU stats (bug 2155500)
Brenden Matthews [Sun, 7 Dec 2008 22:15:57 +0000 (15:15 -0700)]
Removing $freq_dyn and $freq_dyn_g
I have decided to remove $freq_dyn and $freq_dyn_g due to license issues
(see sf.net tracker bug #2166612)
Brenden Matthews [Sun, 7 Dec 2008 08:35:56 +0000 (01:35 -0700)]
Update README, fix file perms for changelog2html.py.
Brenden Matthews [Sun, 7 Dec 2008 08:28:36 +0000 (01:28 -0700)]
Regenerating docs.
Brenden Matthews [Sun, 7 Dec 2008 08:08:27 +0000 (01:08 -0700)]
Add some more debug messages to imap/pop3 stuff, refactor some pop3
code, add filename:lineno to DEBUG() macro.
Brenden Matthews [Sun, 7 Dec 2008 07:38:50 +0000 (00:38 -0700)]
Updating .gitignore
Erik Waling [Sun, 7 Dec 2008 07:38:06 +0000 (00:38 -0700)]
Fetch volume through Audacious API (thanks Erik)
Cesare Tirabassi [Sun, 7 Dec 2008 07:31:53 +0000 (00:31 -0700)]
Fix for buffer overflow with $execi (thanks Cesare)
Brenden Matthews [Sun, 7 Dec 2008 07:25:59 +0000 (00:25 -0700)]
Re-generating docs
Lassi Selander [Sun, 7 Dec 2008 07:22:05 +0000 (00:22 -0700)]
Adds a variable if_xmms2_connected to hide objects when xmms2d is not
running (thanks Lassi)
Pavol Rusnak [Sun, 7 Dec 2008 07:18:34 +0000 (00:18 -0700)]
Fix for wrong usage of strncat (thanks Pavol)
Brenden Matthews [Sun, 7 Dec 2008 06:39:16 +0000 (23:39 -0700)]
Updating changelog (and testing ciabot).
Brenden Matthews [Sun, 7 Dec 2008 06:03:24 +0000 (23:03 -0700)]
First commit to fresh new hip git repo for Conky.
Phil [Sat, 6 Dec 2008 19:10:27 +0000 (19:10 +0000)]
since DEV_NAME() is used when calling, this check is needless
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1274
7f574dfc-610e-0410-a909-
a81674777703
Phil [Sun, 30 Nov 2008 20:53:20 +0000 (20:53 +0000)]
Add debugging output at runtime
The new command line option '-D' ('--debug') increases debugging level by one.
For debugging output a user could be interested in, use the macros DEBUG() and
DEBUG2(). Functionality is equal to the ERR() macro. DEBUG2() prints stuff only
if debugging level is greater one, which means that '--debug' has been
specified more than once. This patch also includes usage of the macros for the
new template object (as debugging syntax errors in templates is one thing a
user potentially needs to do).
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1273
7f574dfc-610e-0410-a909-
a81674777703
Phil [Sat, 29 Nov 2008 13:03:50 +0000 (13:03 +0000)]
update README and manpage
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1272
7f574dfc-610e-0410-a909-
a81674777703
Phil [Sat, 29 Nov 2008 13:02:42 +0000 (13:02 +0000)]
improve template support
* handle escaped characters in parameters to the template object, too
* add samples to the documentation
* do some code cleanup by outsourcing the string substitution into it's
own function
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1271
7f574dfc-610e-0410-a909-
a81674777703
Phil [Sat, 29 Nov 2008 01:34:54 +0000 (01:34 +0000)]
add support for template objects
Basically you can define a template like this:
| template0 \1:\n ${fs_free \2} / ${fs_used \2}
and use it later like this:
| ${template0 root /}
| ${template0 boot /boot}
which is exactly the same as the following:
| root:
| ${fs_free /} / ${fs_used /}
| boot:
| ${fs_free /boot} / ${fs_used /boot}
hope you like it, I do already. :)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1270
7f574dfc-610e-0410-a909-
a81674777703
Phil [Tue, 4 Nov 2008 23:25:28 +0000 (23:25 +0000)]
fix my own fix
The second parameter is optional, so have conky act accordingly. This time I
tested using either two or three params and it worked flawlessly.
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1269
7f574dfc-610e-0410-a909-
a81674777703
Phil [Tue, 4 Nov 2008 21:42:48 +0000 (21:42 +0000)]
fix a potential segfault
* happened when passing wrong arguments to ${scroll}, particularly with only
one instead of the mandatory two unsigned ints
* as it's not clear whether %n will change the value returned by sscanf or not,
use a solution that works in both situations (%n incrementing the return
value or not)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1268
7f574dfc-610e-0410-a909-
a81674777703