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

2002 Commits

Author SHA1 Message Date
Pavel Labath
1e49ea9274 Safer version of free_and_zero 2010-02-23 15:13:49 +01:00
Pavel Labath
d7d8bb84ea Add missing include 2010-02-23 15:07:12 +01:00
Nikolas Garofil
0e80e2908a Use free_and_zero in ccurl_thread.cc where appropriate 2010-02-23 14:54:03 +01:00
Nikolas Garofil
397a7a252a Fix removing the config and sending a SIGUSR1 results in segfault
This re-implements the fix of the previous commit because that one
assumed that only overwriting the configfile can cause the config
to reload
2010-02-23 02:58:44 +01:00
Cesare Tirabassi
8be18483e3 Fix LP: #525926; conky sigsegv if config file is deleted
Basically, we only relod if the file is modified but still handle the case
where the watch gets lost. Maybe we should just ignore IN_IGNORE altogether?
(cherry picked from commit 085c39d394)
2010-02-22 22:48:59 +01:00
Nikolas Garofil
c2c58cd8d7 Use free_and_zero where possible in bmpx.cc 2010-02-22 22:03:14 +01:00
Nikolas Garofil
ad1b72ed94 Fix wrong output when nesting $combine-s 2010-02-22 19:27:05 +01:00
Nikolas Garofil
44a9e75290 Fix output of $combine when used in combination with $head 2010-02-22 16:30:37 +01:00
Nikolas Garofil
ade4f3fc0c Minimize change in free_text_objects introduced by b88d69dbfc 2010-02-22 14:22:24 +01:00
Nikolas Garofil
15e84fcfa1 Fix last memleak in $combine 2010-02-22 14:08:38 +01:00
Nikolas Garofil
e50ec9ded6 Fix $combine reading unallocated memory 2010-02-22 13:02:24 +01:00
Nikolas Garofil
b88d69dbfc Implement fix from previous commit in another way to fix a leak that happens when conky closes 2010-02-21 20:15:08 +01:00
Nikolas Garofil
31e22acb4b Fix crash with (for example): conky -s '${combine $uptime $uptime}' 2010-02-21 19:26:11 +01:00
Nikolas Garofil
d184efb418 When using without argument, make sure that it shows the essid of the first device that has one instead of using the default network device (because most of the times this will be a non-wireless device) 2010-02-21 15:12:38 +01:00
Nikolas Garofil
d91214e290 Fix using the wireless-vars 2010-02-20 17:59:51 +01:00
Nikolas Garofil
cbc5aaad91 Shrink code by adding free_and_zero() 2010-02-20 15:28:05 +01:00
Nikolas Garofil
a2a9ed054d Shrink code by letting a separate function handle the resetting of optind 2010-02-20 14:34:40 +01:00
Nikolas Garofil
99b5352cff Add --for-scripts support 2010-02-20 02:25:38 +01:00
Nikolas Garofil
0627946ca1 Make hiding ncurses memleaks optional and disable it by default 2010-02-19 13:21:40 +01:00
Nikolas Garofil
f695ed58d9 Hide false memleaks in a debugbuild
This makes sure valgrind doesn't show false memleaks that are caused by ncurses
instead of our code when we do a 'Debug' build. There is a also a disadvantage:
When your ncurses library is not build with the '--disable-leaks' option (this
is the case in the default version of ncurses of most distro's) and you build
conky with ncurses and debug turned on then you will see a segmentation fault
when you stop conky. On the other hand people that want to build conky as a
debug build with ncurses support will probably also have a ncurses with
--disable-leaks ...
2010-02-19 00:09:24 +01:00
Caleb Spare
c7fa36a5f2 $memwithbuffers object and bar (sf.net #2954143)
I've added $memwithbuffers to complement $mem, $memeasyfree, etc. This
variable indicates the used system memory, regardless of buffers/caches. If
the "no_buffers" option is set to "no", it will be the same as $mem. The
reason I find this change useful is that I like to display both the total
used system memory and the memory being used by applications.

I've also included a memwithbuffersbar, which is the same as membar except
that it uses $memwithbuffers as the size instead of $mem.

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-02-18 18:32:25 +01:00
Nikolas Garofil
9b1a89e617 Fix current_mail_spool memleak 2010-02-18 01:25:32 +01:00
Pavel Labath
07746cdd5a Merge remote branch 'origin/master' into lua-config 2010-02-17 22:53:39 +01:00
Pavel Labath
c61376b60b A framework for registering config settins
similar to the one for data sources.
2010-02-17 22:52:19 +01:00
Nikolas Garofil
a1a73c23cb Fix memleak in if_match 2010-02-17 20:26:50 +01:00
Pavel Labath
2585fabc52 Try to make $if_match better handle stranger inputs
This should fix sf.net #2953283
2010-02-17 19:44:02 +01:00
Ben Kibbey
d56a862467 Added AF_UNIX socket support.
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-02-17 09:32:54 -08:00
Nikolas Garofil
3ceb8cb570 Add support for scrolling in the other direction 2010-02-17 17:49:03 +01:00
Nikolas Garofil
afffe49977 Undo efb39867c7 , memleaks were falsely reported by valgrind 2010-02-17 14:49:06 +01:00
Nikolas Garofil
549e9740ff Fix previous commit which breaks building with X11 2010-02-17 13:21:07 +01:00
Cesare Tirabassi
26fc643ffb Fix commit 2c8ef724e6 which fails to build when X11 is not enabled 2010-02-17 12:51:11 +01:00
Nikolas Garofil
efb39867c7 Fix 3 memleaks in ncurses-related code 2010-02-16 19:20:48 +01:00
Nikolas Garofil
c06e54157f Fix building in ncurses 2010-02-16 17:00:33 +01:00
Pavel Labath
a152a32d66 lua_isnil() binding 2010-02-16 16:46:16 +01:00
Nikolas Garofil
b9a7b0e33e Fix last memleaks in scroll
This fix reverts reverts a part of commit 08122354a9
this is necessary because that commit blocks the calling of free_scroll
2010-02-16 15:45:32 +01:00
Pavel Labath
8bc8d9d7b8 Remove unneeded #includes 2010-02-16 15:14:40 +01:00
Nikolas Garofil
247c62c5d8 Fix another memleak in scroll 2010-02-16 13:27:49 +01:00
Pavel Labath
5b743293da Add some comments to explain how things work 2010-02-16 12:32:53 +01:00
Nikolas Garofil
a6debedc93 Fix 3 memleaks that happen when scroll receives wrong args 2010-02-15 16:02:29 +01:00
Pavel Labath
ad6707fac9 More refactoring and (hopefully) simplification
The idea was to avoid passing the data_source factory function through two std::binds.
2010-02-15 13:18:53 +01:00
Pavel Labath
56266e9476 add lua_settop() binding 2010-02-15 13:00:33 +01:00
Nikolas Garofil
53af0f379f Fix multiple definitions when building in FreeBSD 2010-02-14 22:58:02 +01:00
Nikolas Garofil
3763c263c3 Make sure bsdapm functions can be reached 2010-02-14 21:22:31 +01:00
Pavel Labath
1d6009594c Simplify data source creation, create it directly inside lua userdata 2010-02-14 20:36:17 +01:00
Nikolas Garofil
4c06be139c Make sure that bsdapm.cc compiles in FreeBSD 2010-02-14 15:36:22 +01:00
Nikolas Garofil
7de3b9736a Make sure that freebsd.cc compiles in FreeBSD 2010-02-14 15:26:44 +01:00
Nikolas Garofil
7791e34900 Make sure that fs.cc compiles in FreeBSD 2010-02-14 15:09:12 +01:00
Nikolas Garofil
8db1e1a2a2 Make sure that conky.cc compiles in FreeBSD 2010-02-14 14:00:26 +01:00
Pavel Labath
fa02cdceab An object-oriented api for accessing data sources from lua 2010-02-13 17:00:20 +01:00
Pavel Labath
b3411782e6 Rephrase an error message 2010-02-12 23:04:32 +01:00
Pavel Labath
851e8b8ef0 Merge remote branch 'origin/master' into lua-config 2010-02-12 18:44:09 +01:00
Pavel Labath
f59a198a04 export functions for accessing data sources to lua
this adds some code to main() which tests these features and then exits, so it's normal that
conky doesn't work anymore.
2010-02-12 18:39:01 +01:00
Pavel Labath
00d8215e00 added state::createuserdata template function 2010-02-12 17:41:24 +01:00
Pavel Labath
0ae2ba5210 Retab luamm in line with setting we use (yeah... i know :/) 2010-02-12 17:11:50 +01:00
Pavel Labath
3e98e18324 add lua_pushnumber wrapper
there are still some functions whose C++ wrappers i didn't create. add them if you need them
2010-02-12 17:06:24 +01:00
Nikolas Garofil
064c6f9e42 Fix wrong mixer values on some systems (thanks hoffa) 2010-02-12 17:03:25 +01:00
Pavel Labath
2d4d2ef4c0 std::function can't be used as a __gc function, provide a simple alternative 2010-02-12 15:05:46 +01:00
Nikolas Garofil
0f399a18e8 Warn at wrong alignment setting 2010-02-12 01:58:30 +01:00
Nikolas Garofil
2c8ef724e6 Make sure alignment is disabled when the windowtype is dock 2010-02-12 00:39:50 +01:00
Pavel Labath
6e5c781a78 small bugfix in lua::state::settable 2010-02-11 21:29:02 +01:00
Pavel Labath
fd671ced8f Move rawset() to the proper category 2010-02-11 21:08:32 +01:00
Pavel Labath
8fe39ab39b Add a function for retrieving registered data sources 2010-02-11 21:01:59 +01:00
Pavel Labath
109770ac31 Merge remote branch 'origin/master' into lua-config 2010-02-11 16:40:37 +01:00
Pavel Labath
4eda1a8eda A framework for registering data sources
This is needed so that we know which sources to export to lua, and a huge switch or something is
just too ugly.
2010-02-11 16:30:05 +01:00
Nikolas Garofil
b206ecc93d new should be combined with delete instead of free (to stop valgrind from complaining) 2010-02-11 14:44:15 +01:00
Pavel Labath
4a68be2494 include <config.h>
not that we need it much, but...
2010-02-11 01:43:48 +01:00
Nikolas Garofil
463836ebf9 Combine print_execp and print_exec as much as possible 2010-02-11 01:08:25 +01:00
Nikolas Garofil
f0ed783041 dog^H^H^Hcat should become cat in all exec-related vars 2010-02-10 23:31:35 +01:00
Nikolas Garofil
aea8d3ed52 Combine print_texeci and print_execi as much as possible 2010-02-10 21:23:21 +01:00
Pavel Labath
dfb106ac0e Fix multiple definition error 2010-02-10 21:17:40 +01:00
Pavel Labath
90b30f14f9 Oops, forgot inclusion guards 2010-02-10 19:47:16 +01:00
Nikolas Garofil
c010d7cd00 Let execp use fill_p 2010-02-10 19:45:42 +01:00
Nikolas Garofil
36ad680a98 Let print_execi and print_texeci call fill_p for filling p 2010-02-10 19:04:31 +01:00
Pavel Labath
e4461782ef C++ binding for lua, with some fancy features
such as being able to throw exceptions across c++-lua boundary. For more details, see comments
in the source code.
2010-02-10 17:34:09 +01:00
Nikolas Garofil
9fefa79551 Obsolete threaded_exec_caller with help of previous commit 2010-02-10 15:54:50 +01:00
Nikolas Garofil
e017870b58 Combine print_texeci and print_texecpi as much as possible 2010-02-10 15:21:00 +01:00
Nikolas Garofil
456142241c Combine print_execi and print_execpi as much as possible 2010-02-10 15:02:00 +01:00
Nikolas Garofil
b601c21c04 cpp-ify eve.c 2010-02-09 23:12:10 +01:00
Nikolas Garofil
f0eec1e0c5 cpp-ify iconv_tools.c 2010-02-09 22:34:24 +01:00
Nikolas Garofil
886049122c Add missing memory header needed by std::unique_ptr 2010-02-09 17:43:56 +01:00
Nikolas Garofil
332cf86b7b Merge branch 'master' of ssh://git.omp.am/home/omp/git/conky 2010-02-09 16:49:31 +01:00
Pavel Labath
3d70f3a415 Fix `ISO C++ forbids variable length array' errors with maintainer mode enabled 2010-02-09 15:54:55 +01:00
Nikolas Garofil
325a29e438 cpp-ify prss.c 2010-02-09 15:24:58 +01:00
Nikolas Garofil
526e8d346e cpp-ify xmms2.c 2010-02-09 13:38:12 +01:00
Nikolas Garofil
043b12b15a cpp-ify a lot of files 2010-02-09 13:11:56 +01:00
Nikolas Garofil
66a63d9e87 cpp-ify timeinfo.c 2010-02-09 02:24:41 +01:00
Nikolas Garofil
196f6bc796 cpp-ify text_object.c 2010-02-09 02:15:32 +01:00
Nikolas Garofil
9544239a19 cpp-ify read_tcp.c 2010-02-09 02:02:00 +01:00
Nikolas Garofil
d0646bc4bb cpp-ify mboxscan.c 2010-02-09 01:49:51 +01:00
Nikolas Garofil
b49ac8e6d3 cpp-ify template.c 2010-02-09 00:28:33 +01:00
Nikolas Garofil
a5ed45fc7b put same stuff from print_texeci and print_texecpi in a separate function 2010-02-08 16:12:46 +01:00
Nikolas Garofil
223eefcdd7 Forgot one letter in previous commit... 2010-02-07 14:46:22 +01:00
Nikolas Garofil
01e3bb62a2 Implements texecpi variable 2010-02-07 10:29:43 +01:00
Pavel Labath
ff52605930 Fix compilation without --enable-argb
Bug reported by zaphire
2010-02-03 22:42:19 +01:00
Cesare Tirabassi
b1b91c80fa Replaces commit 44e3708cdb
Thanks to ichelm610x for the patch.
I just added memoization to reduce the impact of the many system calls.
(cherry picked from commit 1eedf2633b)
2010-01-31 21:01:08 +01:00
Cesare Tirabassi
80c56d099e Modify last commit to keep compiler happy since it claims devbuf can never be null (should we really trust gcc that much?) 2010-01-30 19:17:17 +01:00
Cesare Tirabassi
ddec718a62 Fix diskio total computation for kernel > 2.6.31 (sf: #2942117)
(cherry picked from commit 44e3708cdb)
2010-01-30 14:32:05 +01:00
Brenden Matthews
a11cf38aaa Only ever fork() once. 2010-01-26 13:06:17 -08:00
Brenden Matthews
5ed1f82ff5 Only pause during startup, not after reload. 2010-01-26 12:38:35 -08:00
Cesare Tirabassi
4264f759bb Fix minor memory leak in mail.cc (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566524) 2010-01-24 22:15:52 +01:00
Pavel Labath
1de2a9e6c5 Add optional argument to $acpiacadapter
The exact location of the state information seems hardware dependent, so this adds the option to
specify it manually. (linux only)
2010-01-24 15:34:03 +01:00
Pavel Labath
6e89ed7e2d Get $iconv vars working again 2010-01-20 18:17:30 +01:00
Pavel Labath
9bee219adf Make conky not crash when drawing on root window
It was failing in XQueryColor because colourmap was NULL. This seemed to help.
2010-01-20 00:01:01 +01:00
Pavel Labath
ae4be102b6 Another off-by-one found by valgrind. 2010-01-17 19:51:17 +01:00
Nikolas Garofil
287c38a0b9 Added support for builtin config in cmake 2010-01-17 03:00:51 +01:00
Dmitry Marakasov
5664cc3d13 Add SMP support for FreeBSD.
Original patch written by Ivan Klymenko <fidaj@ukr.net>.

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-16 10:55:20 -08:00
Pavel Labath
3a23eb5f6c Fix "off-by-one" bug in hddtemp found by valgrind 2010-01-15 23:41:04 +01:00
Brenden Matthews
002685c0ce Make timed-thread a lib, rename files. 2010-01-13 10:52:54 -08:00
Pavel Labath
b7028cb9e5 Make weather.cc more c++-ish (and get rid of a leak in the process) 2010-01-13 13:59:24 +01:00
Pavel Labath
c62266a5db Make sure the $exec buffer is null-terminated 2010-01-13 13:34:14 +01:00
Pavel Labath
86e744d334 Fix slightly over-zealous s/// 2010-01-13 10:49:36 +01:00
Brenden Matthews
081d04a059 Pass by value here too. 2010-01-12 10:38:30 -08:00
Brenden Matthews
e0502719a0 Pass function by value to timed_thread::create(). 2010-01-12 10:30:37 -08:00
Pavel Labath
0f3a56ccbe An attempt at making wifi work
Someone who has iwlib should really test this.
2010-01-11 01:13:42 +01:00
Pavel Labath
47509b38bd An attempt at making lua bindings work 2010-01-11 00:35:22 +01:00
Phil Sutter
bdda06f4ea fix segfaults in CRIT_ERR condition
- pthread_join() on uninitialised threads causes segfault
- XFreeFont() dislikes font being zero
2010-01-10 22:09:33 +01:00
Phil Sutter
3ab853af65 fix for a fatal X11 error (possible creation of zero-sized window) 2010-01-10 22:07:52 +01:00
Phil Sutter
0bdff28f69 fix smapi move to C++ 2010-01-10 22:06:01 +01:00
Phil Sutter
081f5e1699 make imlib2.c a C++ source, as it uses the C++ symbol 'to_real_path()' 2010-01-10 22:04:15 +01:00
Pavel Labath
e554e6ff67 If we want a function to change the object, we need to pass it by reference 2010-01-07 19:50:00 +01: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
7e78f036f0 Use consistent naming for build option macros.
Probably have broken some build features with this commit.
2010-01-06 18:39:44 -08:00
Pavel Labath
d61c545973 "Port" nvidia code to c++ 2010-01-06 20:57:13 +01:00
Brenden Matthews
9b46a61ae6 Don't include non-existent files. 2010-01-06 11:33:42 -08:00
Brenden Matthews
5d20ed4b8c Fix small logic error in diskio. 2010-01-06 10:18:32 -08:00
Cesare Tirabassi
2568030509 Fix sigsegv if cpu_usage has not yet been populated (seen on 1.8.0_rc1) 2010-01-05 16:59:50 +01:00
Brenden Matthews
7ff762e4af Resolve issues with timed_thread rewrite WIP. 2010-01-04 19:21:12 -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
d3a8c4d22e timed_thread
Convert everything (everything? maybe missed some stuff) from old
timed_thread to new timed_thread.
2010-01-04 19:21:12 -08:00
Brenden Matthews
01ac47d082 Implement timed_thread rewrite in C++.
Rewrote timed_thread library in C++ using fancy new C++0x features.  The
main reason for this is to phase out poor encapsulation and C-style
function pointers.
2010-01-04 19:21:12 -08:00
Brenden Matthews
58cbbf57a3 Coulpe minor build fixes. 2010-01-04 18:43:40 -08:00
Brenden Matthews
b8a678728c Remove automake build system, fix defconfig.h. 2010-01-04 18:07:49 -08:00
Cesare Tirabassi
36b6facaf5 Remove compiler warning about uninitialized variable 2010-01-03 18:52:22 +01:00
Brenden Matthews
9acf0bb4c0 Fix some minor memleaks, fix crash on reload.
It seems that closing xft fonts on reload is a bad idea, but this seems
to result in a memory leak.  As far as I can tell, the leak doesn't grow
beyond the initial allocation however.
2010-01-02 14:44:20 -08:00
Brenden Matthews
39f01e216b Added disable_auto_reload option, callback fixes.
There were some issues with reloading and the threaded callback
framework, which I think are mostly resolved now, but may need more
testing.
2010-01-02 14:44:12 -08:00
Brenden Matthews
19303af8da Fix reload problem with ARGB. 2010-01-02 12:12:46 -08:00
Ben Kibbey
c00e7b0a42 Fixes $xmms2_percent and a couple other build fixes.
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-02 11:50:53 -08:00
Ben Kibbey
ed5e86eb88 Fix the quiet command line option.
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-02 11:48:50 -08:00
Brenden Matthews
0f5f2a1afe Improve handling of ARGB visuals a bit.
Conflicts:

	src/conky.cc
2010-01-02 11:43:29 -08:00
Brenden Matthews
2951f5571c Add missing copyright notices. 2010-01-01 15:49:41 -08:00
Brenden Matthews
cf9e498b24 Update copyright notices. 2010-01-01 15:46:17 -08:00
danielb
6c5fa44660 Add ARGB visual support.
This patch adds the possibility to use a argb visual for the conky
window.  Adding a boolean configuration entry 'own_window_argb_visual'.
the 'set_transparent_background' method sets the alpha bytes of the argb
color for transparency, instead of pseudo transparency.  This patch
would close following feature request:
https://sourceforge.net/tracker/?func=detail&aid=1563931&group_id=143975&at
id=757311 and would be a workaround for some reported transparency bugs
(https://sourceforge.net/tracker/?func=detail&aid=1968923&group_id=143975&a
tid=757308 for example)

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-01 15:03:40 -08:00
Ben Kibbey
87e422c224 $scroll fix for a text length <= length
This fixes $scroll to only scroll when the text length is greater than
the specified length; hopefully without breaking anything.

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-01 14:51:46 -08:00
Ben Kibbey
6e6a1f59e8 Fix hddtemp with disabled drives.
Some drives are unable to return their temperature when in standby mode.
If there is more than one drive installed then other drives may not be
able to get parsed. This patch will skip over the unparsable output for
the current drive and let others get parsed.

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-01-01 14:50:42 -08:00
Brenden Matthews
4d7d2b27f3 Minor build fix. 2010-01-01 13:45:16 -08:00
Cesare Tirabassi
72bbe51a8c The HAPPY NEW YEAR commit
This should close sf #2850092.
Basically, before this change, for strings which includes
SECRIT_MULTILINE_CHAR the computed maximum substring width was getting
summed to the width of the last substring.
The old behaviour is kept but for the case of strings including
SECRIT_MULTILINE_CHAR, for which now the maximum width of all substrings
is taken.
I don't think this will break anything else but blame me if it does ...
2009-12-31 23:49:02 +01:00
Phil Sutter
db2282968f parse the -D flag as early as possible
In fact, this will make -D being parsed at least before the conkyrc is
being read, allowing for debug-output from inside the config-parser. :)
2009-12-29 00:18:12 +01:00
Phil Sutter
6f587402d8 cosmetic fixup session
- kill trailing whitespace (grep -n ' $' src/*.{c,cc,h})
- eliminate space before tab (grep -n ' 	' src/*.{c,cc,h})
  (insert tab by pressing CTRL-v first)
- little indenting fixup in configure.ac.in (we indent using tabs, not
  spaces)

note: this should not change the actual code at all - if it does, feel
free to blame me personally ;)
2009-12-28 21:32:07 +01:00
Phil Sutter
7d92e46533 include llua.h where it's really needed 2009-12-28 21:31:49 +01:00
Phil Sutter
46bd87b05e move extract_object_args_to_sub() to a more convenient place 2009-12-28 03:02:06 +01:00
Phil Sutter
c4c2377d0e drop commas at end of enum in top.h 2009-12-28 03:02:06 +01:00
Phil Sutter
dcb35db39d check return value of write() 2009-12-28 03:02:05 +01:00
Phil Sutter
e99118cf2e fix for unused results in tailhead.c 2009-12-28 03:02:05 +01:00
Phil Sutter
1ff3f84068 fix for unused results in mboxscan.c 2009-12-28 03:02:05 +01:00
Phil Sutter
43ee33a28d check return type of dup() in exec.c 2009-12-28 03:02:05 +01:00
Phil Sutter
ac8bb1489d fix for unused results in eve.c 2009-12-28 03:02:05 +01:00
Phil Sutter
6e53e3278d implement a safe_asprintf for timeinfo.c 2009-12-28 03:02:05 +01:00
Phil Sutter
aa95dde706 fix for unused results in smapi.c 2009-12-28 03:02:05 +01:00
Phil Sutter
8662e6630e fix for unused results in linux.c 2009-12-28 03:02:05 +01:00
Phil Sutter
c986aa6346 fix unused result warnings in mail.c 2009-12-28 03:02:05 +01:00
Brenden Matthews
fb33419cd4 Add CMake build support for Lua bindings. 2009-12-17 19:46:26 -08:00
Brenden Matthews
32c5f451b9 Minor build fixes 2009-12-17 18:55:54 -08:00
Brenden Matthews
51ff65ede0 Merge branch 'master' of git.omp.am:/home/omp/git/conky 2009-12-17 18:52:05 -08:00
Phil Sutter
0522832350 cleanup apcupsd a bit, fix some whitespace errors 2009-12-17 23:07:15 +01:00
Phil Sutter
9b66a4715b hide smapi internal functions and cleanup header 2009-12-17 22:45:00 +01:00
Phil Sutter
861988be24 font_h could be used uninitialised (so it says) 2009-12-17 22:42:52 +01:00
Phil Sutter
bf1e5108ab we shall not ignore the return value of functions declared with warn_unused_result 2009-12-17 22:42:52 +01:00
Phil Sutter
1724a1fe49 ISO C++ forbids variable length arrays 2009-12-17 22:42:52 +01:00
Phil Sutter
de049dcbde --enable-testing rejects commas at end of enumerator lists 2009-12-17 22:42:47 +01:00
Phil Sutter
4229fbd380 introduce a generic priority queue implementation 2009-12-13 17:10:45 +01:00
Phil Sutter
bb72583a95 simplify this conditional a bit 2009-12-13 03:42:14 +01:00
Phil Sutter
bad6d62b31 little header cleanup in conky.cc 2009-12-13 02:54:48 +01:00
Phil Sutter
8bc17ca311 top: add update callbacks conditionally, drop useless check 2009-12-12 19:50:36 +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
Phil Sutter
5c86a80614 fix $scroll color reset (add missing callback) 2009-12-12 15:43:39 +01:00
Pavel Labath
52b5fe11ed Fix race condition in update_stat() 2009-12-11 22:54:11 +01:00
Pavel Labath
a49000ba22 Eliminate warnings in mail.c
PS: functions pop3_thread and imap_thread look ridiculously similar. It may be worth merging them
at some point.
2009-12-11 21:34:41 +01:00
Nikolas Garofil
6d4ba8b2f4 Fix anonymous enum warning 2009-12-11 17:58:25 +01:00
Brenden Matthews
48e834d1eb More work on CMake build system. 2009-12-10 20:37:56 -08:00
Brenden Matthews
07e2002b03 Build libtcp-portmon as a separate library. 2009-12-10 15:19:13 -08:00
Pavel Labath
316198a0c3 Explicitly cast NULL to the specific type for compilers that (for some unknown reason) require it 2009-12-10 23:42:22 +01:00
Pavel Labath
b4feb01818 Fix memory allocation problem in exec.c
Bug reported by c0nv1ct.
2009-12-10 23:09:56 +01:00
Brenden Matthews
b6331b4eb6 Switch some more bits to C++, more CMake changes. 2009-12-09 20:05:32 -08:00
Phil Sutter
475b00e709 drop local definitions of _GNU_SOURCE since it's passed to gcc 2009-12-10 02:03:56 +01:00
Pavel Labath
2790d35e06 Set CXXFLAGS in-line with current CFLAGS settings (autoconf)
Also, replaced #define _GNU_SOURCE (in config.h) with -D_GNU_SOURCE command-line parameter
because, for some reason g++ defines it implicitly and then complains about multiple definitions.
Also, removed -Winline from C(XX)FLAGS because it causes a lot of warnings for c++ code that
can't be easily removed and are not very significant.
2009-12-09 23:59:08 +01:00
Pavel Labath
78da8a1946 Update cmake to address portmon change. 2009-12-09 23:59:07 +01:00
Pavel Labath
e9d4e32f8f Replace GHashTable with tr1::unordered_map in tcp_portmon
This means portmon no longer depends on glib.
2009-12-09 23:59:07 +01:00
Brenden Matthews
8c9ed7b109 Minor build fixes. 2009-12-07 21:16:11 -08:00
Brenden Matthews
11c76e4c0d More CMake work. 2009-12-07 20:46:49 -08:00
Pavel Labath
b1cbc64f60 Remove some strange network related code
Reported by norsetto.
This code disallows network traffic to be 0.
Brenden says it once had a purpose, but noone can think of what would that be atm.
2009-12-07 21:13:04 +01:00
Brenden Matthews
d80cacd4b7 Handle build.h, too. 2009-12-07 11:51:00 -08:00
Brenden Matthews
c5cbb3c38f Produce error if src/config.h exists. 2009-12-07 10:08:01 -08:00
Brenden Matthews
4dcce0b386 Improve platform stuff. 2009-12-07 09:35:43 -08:00
Phil Sutter
4baba32459 replace modulo by bitwise AND for hash table lookups
This operation is a lot faster, but depends on the hash table size
be a power of 2 (so HTABSIZE - 1 is a row of 1's). Also a define for the
magic value cleans things up a bit.
2009-12-06 21:49:27 +01:00
Phil Sutter
36f6af922b improve hash_process() by inserting at bucket's top instead of bottom 2009-12-06 17:28:30 +01:00
Brenden Matthews
0406000351 More CMake build work, added Lua support. 2009-12-05 18:45:26 -08:00
Brenden Matthews
07cb6efdaf More work on CMake build system (see README.cmake for instructions). 2009-12-05 12:00:10 -08:00
Phil Sutter
3764c883c7 convert mixer bars to double 2009-12-04 22:18:54 +01:00
Phil Sutter
1160e74d35 convert fs bars to double 2009-12-04 22:18:54 +01:00
Phil Sutter
361e5eba83 convert exec bars to double 2009-12-04 22:18:54 +01:00
Phil Sutter
b2c305a995 convert execbarval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
3361ea907b convert *speedgraphval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
a68a523d40 convert diskiographval_* to double 2009-12-04 22:18:54 +01:00
Phil Sutter
1382915d1e convert loadgraphval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
f74ae19944 convert apcupsd_loadbarval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
c52ee46cc3 convert entropy_barval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
2fc1efa8d5 convert lua_barval to double 2009-12-04 22:18:54 +01:00
Phil Sutter
f1a57e40aa convert audacious_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
e2e7c47c48 convert xmms2_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
202bbf01ff convert mpd_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
9e587ae6d5 convert smapi_bat_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
db2b056969 convert swap_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
c5a8949784 convert mem_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
d46a2cb1b2 convert cpu_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
bfd7eabc0f convert get_battery_perct_bar to double 2009-12-04 22:18:53 +01:00
Phil Sutter
4133d8fdbe convert wireless_link_barval to double 2009-12-04 22:18:53 +01:00
Phil Sutter
e5d32f4ad0 convert meter type object values from uint8_t to double 2009-12-04 22:17:40 +01:00
Phil Sutter
1e25633fc1 rename specials field "graph_scale" to a generic "scale" 2009-12-04 00:53:11 +01:00
Phil Sutter
82ef68aafa hook in the scale value for bar and gauge objects
This patch already implements complete auto-scaling for bars and gauges,
therefore introducing a flags field in order to signal whether
auto-scaling is enabled (and the scale field contains just the max value
seen so far).
2009-12-04 00:50:13 +01:00
Phil Sutter
dae785e5d0 introduce scale field for bar and gauge specials 2009-12-02 01:36:22 +01:00
Phil Sutter
a49fb53ea3 fix scaling for exec*graph 2009-12-01 23:59:12 +01:00
Pavel Labath
018ca8e0ef Fix $memgraph and $cpugraph in a way that doesn't break other things 2009-12-01 23:45:31 +01:00
Pavel Labath
24ebff6a62 Fix $memgraph (i think) 2009-12-01 14:20:35 +01:00
Nikolas Garofil
e24bc153b3 Fix building without X11 2009-12-01 14:07:22 +01:00
Nikolas Garofil
a2c9ac648d Fix compiling without C99 2009-12-01 12:35:23 +01:00
Phil Sutter
d3aafc4a75 reenable top for all target OS's
Occurs to work fine on FreeBSD, the other BSD's probably need more work,
anyway.
2009-12-01 00:45:17 +01:00
Phil Sutter
d4bc07b1f1 fix for compiling on freebsd 2009-12-01 00:32:33 +01:00
Phil Sutter
b6a57a8f77 cleanup free_text_objects() 2009-12-01 00:32:33 +01:00
Phil Sutter
3f00e817c5 free desktop information where it should be done 2009-12-01 00:32:33 +01:00
Phil Sutter
5ed38bfe0d convert top objects to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
ba47b49d88 move free_all_processes() to where it really should be 2009-12-01 00:32:33 +01:00
Phil Sutter
8ef2f13e9d convert xmms2 objects to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
6fb5302778 convert mpd objects to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
4c4a7c4096 convert nameserver to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
781bc7b024 convert gateway objects to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
93c2079af0 generically free obj->sub if non-zero in free_text_objects() 2009-12-01 00:32:33 +01:00
Phil Sutter
87472a3daa convert cmdline_to_pid to callbacks.free 2009-12-01 00:32:33 +01:00
Phil Sutter
ede0838e17 drop struct information parameter from generate_text_internal() 2009-12-01 00:32:33 +01:00
Phil Sutter
0f8b7d1186 cleanup generate_text_internal() 2009-12-01 00:32:33 +01:00
Phil Sutter
92ae6fab8a replace substitute_newlines() object typecheck with object field
This is the more generic way, although I doubt this is really error
preventing. To me, it's not totally clear as to when
substitute_newlines() is forbidden and when not. Maybe someone (the
author?) can shed light on the internal algorithm of this feature.
2009-12-01 00:32:33 +01:00
Phil Sutter
c9f1c318aa convert OBJ_text to callbacks
This is tricky: there is no such thing as $text. In fact, everything
below TEXT in the conkyrc which is NOT a text object will become one of
type OBJ_text.

To make life easy, introduce a function obj_be_plain_text() converting a
given object to the given plain text.
2009-12-01 00:32:33 +01:00
Phil Sutter
e569803324 convert if_updatenr to callbacks.iftest 2009-12-01 00:32:33 +01:00
Phil Sutter
841a3814c8 convert $updates to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
ffec9dd50c font: convert to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
95b92d6cff new_font: convert to common signature 2009-12-01 00:32:32 +01:00
Phil Sutter
e5b25fd30a unconditionally call load_fonts()
Since load_fonts() iterates over font_count fonts which is initially -1,
it turns into a NOP when no fonts where added.
2009-12-01 00:32:32 +01:00
Phil Sutter
68a09f7a02 gid_name, uid_name: outsource sub object parsing and convert to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
4ba0f9ff4f pid objects: convert to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
5b686294f3 pid objects: outsource sub object evaluation 2009-12-01 00:32:32 +01:00