1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-10-02 23:19:08 +00:00
Commit Graph

2697 Commits

Author SHA1 Message Date
Pavel Labath
af4633a8ee fix compilation errors in previous commit 2010-08-24 22:27:09 +02:00
Pavel Labath
684933416c Fix segfault in i8k (sf.net #3007167)
Apparently, sometimes the value of i8k.right_fan_status is sometimes null. This just makes sure
the null value isn't passed to atoi(3). A better solution would be to figure out why is it null,
but I cannot do that as I don't have the hardware.
2010-08-24 21:50:07 +02:00
Pavel Labath
2c96799e59 Make {overwrite,append}_file lua settings 2010-08-22 13:04:19 +02:00
Pavel Labath
3dd4593bc9 Make max_text_width a lua setting 2010-08-22 12:49:31 +02:00
Pavel Labath
228f65bc52 Make diskio_avg_samples a lua setting 2010-08-22 12:31:11 +02:00
Pavel Labath
9d30e34a01 Make net_avg_samples a lua setting 2010-08-22 12:28:04 +02:00
Pavel Labath
80f3359634 make cpu_avg_samples a lua setting 2010-08-22 12:24:26 +02:00
Pavel Labath
663e99ee53 Make mpd_{host,password,port} lua settings 2010-08-22 12:17:09 +02:00
Pavel Labath
3a9823b7f3 Add one more pushstring overload to lua::state 2010-08-21 21:06:34 +02:00
Pavel Labath
da5d739fd9 gcc-4.5 fix (kinda)
actually it was more of a bug in the code, but it worked in gcc-4.4
2010-08-21 18:01:16 +02:00
Pavel Labath
4cb6606ea2 Make nvidia_display a lua setting 2010-08-21 14:13:07 +02:00
Pavel Labath
179a1a15b9 Merge branch 'master' into lua-config
Conflicts:
	src/conky.cc
	src/mysql.cc
	src/mysql.h
2010-08-21 14:11:33 +02:00
Pavel Labath
6b45fe1ef0 fix apcupsd compilation 2010-08-19 16:26:34 +02:00
Pavel Labath
a087333285 add missing include 2010-08-19 16:22:09 +02:00
Pavel Labath
1936d6a2ef fix typo 2010-08-16 16:42:30 +02:00
Pavel Labath
abeadb59d7 Use getaddrinfo instead of gethostbyname
Patches conky to use getaddrinfo instead of gethostbyname everywhere. gethostbyname is rather
flawed and doesn't support IPv6 properly.

Patch contributed by Pascal Bleser
2010-08-15 15:56:36 +02:00
Pavel Labath
8ff9b58c3b Fix 'nvidia with ncurses segfaults' (sf.net #3006233)
Additionally, add a nvidia_display variable. This enables the $nvidia variable to be used without
out_to_x yes (X11 support still has to be built in, you just don't have to use it).
2010-08-13 15:23:11 +02:00
Pavel Labath
14511b19ea Make $fs_used_perc and $fs_bar report used space correctly
they reported fs->size - fs->avail, which is not correct if fs has super-user reserved blocks.

note that now $fs_used_perc and $fs_free_perc need not add up to 100%, but that is consistent
with what $fs_used and $fs_free do.
2010-08-12 20:58:21 +02:00
Pavel Labath
699d6bed40 Fix buffer overflows in eve.c (sf.net #3034056) 2010-08-12 17:26:07 +02:00
Pavel Labath
074271b430 Fix gcc warning 2010-07-29 16:31:30 +02:00
Pavel Labath
968f5f4201 auto_ptr is deprecated 2010-06-26 12:33:55 +02:00
Pavel Labath
dad4b80c8f Fix double-free bug in mysql.cc 2010-06-23 19:06:32 +02:00
Pavel Labath
b5a4d899ab Make mysql_* lua settings 2010-06-22 01:34:55 +02:00
Pavel Labath
c33d617179 make templateN a lua setting 2010-06-21 00:37:58 +02:00
Pavel Labath
76a1b17e5c make out_to_http a lua setting 2010-06-20 19:31:17 +02:00
Pavel Labath
8c41d3183e make http_refresh a lua setting 2010-06-20 19:15:56 +02:00
Pavel Labath
78ba5c2800 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
	src/conky.h
	src/top.cc
2010-06-20 19:09:13 +02:00
Pavel Labath
e70df5e477 Ignore spaces in {} when breaking up arguments to $lua 2010-06-18 17:55:49 +02:00
Pavel Labath
945b52b9a6 Use pass-by-reference paramers in ccurl_thread where possible 2010-06-17 15:19:31 +02:00
Pavel Labath
1cf1b5c631 Fix overflow in ccurl_thread interval caused by 0f213c89 2010-06-17 15:12:42 +02:00
Pavel Labath
b82250d551 Small build fix & zero playtime and progress bars when XMMS2 playback is stopped.
patch contributed by sleipner
2010-06-13 19:10:59 +02:00
Pavel Labath
0f213c89f2 Simplify timed_thread time calculations with some c++0x magic 2010-06-10 19:19:49 +02:00
Pavel Labath
6642004d61 gcc-4.5 compatibility fix 2010-06-10 19:19:49 +02:00
Pavel Labath
e5c9172de3 Use reference parameters where possible 2010-06-10 19:19:49 +02:00
Nikolas Garofil
99fc975780 Add support for $wireless_freq 2010-06-07 10:50:02 +02:00
Nikolas Garofil
6ccde5e7e7 Add support for $wireless_channel (based on a patch by Timothy Ball) 2010-06-07 09:54:25 +02:00
Nikolas Garofil
b5800a3418 Use fixed-width fonts with out_to_http so that everything lands where it should land 2010-06-05 14:27:20 +02:00
Nikolas Garofil
7a2e292429 Change multiple spaces in  -s when out_to_http is used 2010-06-05 14:05:08 +02:00
Nikolas Garofil
e7eae4ec8f Change newlines in "<br />"-s when out_to_http is used 2010-06-05 02:08:50 +02:00
Nikolas Garofil
edc45d41f2 Add support for http_refresh 2010-06-04 15:47:01 +02:00
Nikolas Garofil
54d4e6518d Add support for out_to_http 2010-06-04 14:41:12 +02:00
Alexander Graf
1180733e13 ${top}: fix bug of living dead processes
This fixes a bug occurred with 0b3e3c637e.
Dead processes still appeared in ${top} under FreeBSD and OpenBSD.  This was
because I forgot to update the g_time variable which is used as time stamp in
the process list.

Signed-off-by: Alexander Graf <agraf@znc.in>
2010-06-03 22:11:57 +02:00
Nikolas Garofil
3fa1ca15e1 Fix previous commit 2010-06-02 19:28:40 +02:00
Nikolas Garofil
d80c372a5c Fix segfault in mail folder (SF: 3007493) 2010-06-02 18:00:38 +02:00
Alexander Graf
319ff32283 shorten top compare functions
A substraction is used instead of if, else if, else.  This is much
shorter.

Signed-off-by: Alexander Graf <agraf@znc.in>
2010-05-30 17:52:00 +02:00
Nikolas Garofil
bf7c2bafc2 fix tiny memleak when $top is used wrong 2010-05-30 17:13:40 +02:00
Alexander Graf
0b3e3c637e ${top}: big cleanup
Linux-specific code in top.cc was moved to linux.cc.

Redundant code (e.g. the parts sorting by CPU usage, CPU time or memory
usage) was removed.  Sorting etc. happens in top.cc, whilst
platform-dependent code in linux.cc, freebsd.cc or openbsd.cc just
builds up the process table.

In the Linux code, some functions had a return value which was never
evaluated.  They return void now.

I tested it on FreeBSD and Linux;  The OpenBSD port does not compile
anyway.  I changed the OpenBSD parts, too, so that it will be less
effort to get conky working under OpenBSD.

Signed-off-by: Alexander Graf <agraf@znc.in>
2010-05-30 13:55:50 +02:00
Alexander Graf
cc35a00a30 Fix segmentation violation bug in freebsd.cc
Last patch removed a needed strndup().

Signed-off-by: Alexander Graf <agraf@znc.in>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-05-28 18:58:23 +02:00
Alexander Graf
b0e5e2cd22 ${top} improvements for FreeBSD
- Displaying of CPU time of the processes now works
- ${top_time} (sorting by CPU time) works
- Using memcpy() instead of many sequential assignments (more clear,
  less lines, maybe faster, less effort to change something)

Signed-off-by: Alexander Graf <agraf@znc.in>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-05-28 18:58:23 +02:00
Nikolas Garofil
53b167a84a Let $ical show recurring events that had the first start in the past but have one of the next starts in the future.
Each recurring event is only showed once, maybe i'll change this in the future
2010-05-25 17:33:55 +02:00
Nikolas Garofil
4bc136be88 Bugfix: $alignr had some problems after commit 40452c9712
Example:
TEXT
alfa bravo
charlie ${alignr}delta
echo ${alignr}foxtrot

Note to self:
It could be that this fix brings back part of the bug that
40452c9712 fixed. Check this !
2010-05-24 21:04:42 +02:00
Alexander Graf
fbd7ad0152 Accept top_name_width on FreeBSD
It was inside #ifdef __linux__, though it is not Linux specific.

Signed-off-by: Alexander Graf <agraf@znc.in>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-05-23 21:54:42 +02:00
Alexander Graf
696d841e97 Compile under FreeBSD
This allows compilation under FreeBSD without errors.

read_tcpip.cc:  Avoid using of SOCK_NONBLOCK argument for socket().
SOCK_NONBLOCK is Linux-specific and its use was substituted with a
fcntl() call after socket().

freebsd.cc:  Change return type of update_*() to int, as required by
common.h.

Signed-off-by: Alexander Graf <agraf@znc.in>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-05-23 21:54:42 +02:00
Cesare Tirabassi
7a61fe8504 Fix battery_bar not parsing arguments correctly (sf: #2998034, lp: #569195) 2010-05-23 11:25:19 +02:00
Nikolas Garofil
4256da3b7f forgot to change header in previous commit 2010-05-09 22:42:06 +02:00
Nikolas Garofil
9838bb2cde Make sure audacious-code compiles 2010-05-09 22:07:12 +02:00
Nikolas Garofil
9cb4583429 Bugfix: mem-problems in ical-code 2010-05-07 02:10:49 +02:00
Nikolas Garofil
78e9a69b4e Bugfix: memleaks in rss-code 2010-05-06 17:29:09 +02:00
Nikolas Garofil
f7980ca5a1 Bugfix: BUILD_WEATHER is replaced by BUILD_WEATHER_METAR and BUILD_WEATHER_XOAP 2010-05-06 16:09:17 +02:00
Nikolas Garofil
f6ab74f3a6 Bugfix: RSS interval was in secs instead of mins 2010-05-06 11:54:47 +02:00
Nikolas Garofil
51f7969571 Bugfix: pthread - $curl related bug 2010-05-06 01:24:30 +02:00
Nikolas Garofil
40452c9712 Bugfix: $alignr only worked on the first line of $execp, $execpi, $lua and $lua_parse 2010-05-05 22:02:28 +02:00
Nikolas Garofil
a32d9e41a4 Bugfix: memory and thread-deleting problems
For example the following config had a problem:
TEXT
$i8k_cpu_temp

I could fix it shorter, but then valgrind would still show memleaks
2010-05-05 18:46:04 +02:00
Pavel Labath
f81c29a42d make out_to_ncurses a lua setting
this completes the porting of bool settings
2010-04-30 19:33:21 +02:00
Nikolas Garofil
3f7ecb3a26 Add support for $irc 2010-04-30 19:32:42 +02:00
Pavel Labath
dfc9efa3cc make out_to_console/stderr lua settings 2010-04-30 19:06:17 +02:00
Pavel Labath
c31f27fe92 make override_utf8_locale a lua setting 2010-04-30 17:51:30 +02:00
Nikolas Garofil
4fe945fbc4 Fix bug in ical's eventlist 2010-04-28 12:18:15 +02:00
Pavel Labath
a7513c76e5 better fix the gcc warning 2010-04-27 18:11:38 +02:00
Nikolas Garofil
a13c56a7a5 Add support for $ical 2010-04-27 16:42:21 +02:00
Nikolas Garofil
b4bcc0814f Solve some gcc warnings 2010-04-25 18:33:08 +02:00
Nikolas Garofil
c2c743f542 complete stock error mesg 2010-04-24 18:26:17 +02:00
Nikolas Garofil
343a2f6842 fix bug in stock 2010-04-24 18:09:09 +02:00
Nikolas Garofil
00c869a2bf Add almost all stock data yahoo provides 2010-04-24 14:57:04 +02:00
Nikolas Garofil
45d63c7fba Default tcp_ping port changed to 80 2010-04-24 12:33:40 +02:00
Nikolas Garofil
a2ae025f56 Add support for $tcp_ping 2010-04-24 01:40:24 +02:00
Pavel Labath
ede92b87bd make gap_[xy] a lua setting 2010-04-23 22:00:32 +02:00
Pavel Labath
feb4100e84 make double_buffer a lua setting 2010-04-23 21:54:40 +02:00
Pavel Labath
9e8bbdd4ef Create a conky window when own_window is set 2010-04-23 21:25:09 +02:00
Pavel Labath
67e37668ec make border_width a lua setting 2010-04-23 01:22:22 +02:00
Pavel Labath
96c966b7a6 Make border_{inner,outer}_margin a lua setting 2010-04-22 21:59:12 +02:00
Pavel Labath
00e91d8c31 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
	src/x11.cc
2010-04-22 21:17:14 +02:00
Nikolas Garofil
ed0dd49dd8 Add some more stock data that yahoo is providing 2010-04-22 16:52:15 +02:00
Nikolas Garofil
3b427bf004 Bugfix: segfault in curl-related code 2010-04-22 16:35:00 +02:00
Nikolas Garofil
52ec22c30a Bugfix: segfault in 2010-04-22 13:52:55 +02:00
Nikolas Garofil
28bf02a451 Removed cleanup functions added in the previous 2 commits
These functions are not everywhere supported.
2010-04-22 12:33:14 +02:00
Nikolas Garofil
bb34971fbf Remove some more memleaks in the curl code, also caused by openssl 2010-04-22 00:47:06 +02:00
Nikolas Garofil
986e1251ae Removed one of the memleaks in curl caused by openssl 2010-04-22 00:05:56 +02:00
Pavel Labath
927394505c Make use_xft a lua setting 2010-04-21 19:33:39 +02:00
Nikolas Garofil
2f838fe676 change specials back to ll (fixed bug mentioned in previous commit) 2010-04-21 18:03:53 +02:00
Nikolas Garofil
f603fbfd88 change specials back into a normal array until i fix the only-1-line-graph-bug 2010-04-21 14:54:45 +02:00
Nikolas Garofil
93de6a1798 Fix bug in previous commit and a old memleak in curl 2010-04-19 22:25:50 +02:00
Nikolas Garofil
bc5a414594 $curl can now use 0 (immediately) as interval 2010-04-19 17:19:56 +02:00
Nikolas Garofil
89c2d4ecdd curl 2010-04-19 14:54:03 +02:00
Nikolas Garofil
d6537aa678 Add support for $stock 2010-04-19 14:45:05 +02:00
Nikolas Garofil
d9930744de fix memleak 2010-04-18 20:49:14 +02:00
Nikolas Garofil
a6e63bcaa0 Add support for MySQL
Warning: Altough the current version works (for me),
the syntax of the configoptions and vars will probably change
over time. Contact me if you have ideas.

The following is a example of how you can use it now:

mysql_host someserver.com
mysql_db my_database
mysql_user loginname
mysql_password "s3cr3t"
TEXT
${mysql select var1 from some_table}${mysql select var2 from some_table}
2010-04-18 17:52:41 +02:00
Nikolas Garofil
15d9a95c95 solve printf warning 2010-04-18 00:23:00 +02:00
Nikolas Garofil
0ab2efc2b2 Add support for $no_update 2010-04-17 15:19:44 +02:00
Nikolas Garofil
0047a132ab Merge read_tcp and read_udp as much as possible 2010-04-17 02:31:37 +02:00
Nikolas Garofil
19ad7d2cc3 Add support for $read_udp 2010-04-16 18:53:48 +02:00
Nikolas Garofil
0ab87b40a5 Improve unknown var error 2010-04-16 00:20:08 +02:00
Nikolas Garofil
131ceb5ccf Bugfix: shifted bars 2010-04-15 23:59:24 +02:00
Nikolas Garofil
2e34a9e1c5 Bugfix: segfault 2010-04-15 21:31:10 +02:00
Nikolas Garofil
ae6810fbd5 Bugfix: read_tcp treated a succesfull connection as failed and vice versa 2010-04-15 19:54:01 +02:00
Nikolas Garofil
5ecb0f7030 Add support for arch linux to $distribution 2010-04-15 16:49:55 +02:00
Nikolas Garofil
5ef6de8822 Add support for $distribution 2010-04-15 16:05:42 +02:00
Nikolas Garofil
a734f86071 Bugfix: memleak at crash caused by missing arg 2010-04-15 13:00:54 +02:00
Nikolas Garofil
5ddf751345 Bugfix: "out_to_x no" was ignored when in a file included with ${include path_to_file} 2010-04-14 21:50:50 +02:00
Nikolas Garofil
f5c147b160 Add support for $nodename_short
This is different implementation (compared to 9e3156a4a6)
because 1.8.1 was still regular c instead of c++
2010-04-14 18:41:25 +02:00
Nikolas Garofil
08ea4391d4 Deprecated max_specials, made it unlimited by changing the data structure for specials 2010-04-14 16:59:50 +02:00
Nikolas Garofil
cda990633c Add support for --stdin-config 2010-04-13 17:02:39 +02:00
Nikolas Garofil
dbfbc5f28c Bugfix: adding/removing use_xft in the config had no effect unless you restarted conky, reloading the config was not enough 2010-04-12 23:27:12 +02:00
Pavel Labath
f1c717286b inotifi_init1() is not available on older systems
-> replace with inotify_init() + fcntl()
atomicity should not be important here, since we don't have any threads running at the point of
the call
2010-04-12 22:40:16 +02:00
Nikolas Garofil
ce5a64d08a Removed all code depending on MIXER_IS_ALSA
Reasons:
-As far as i know, all systems can use the non-MIXER_IS_ALSA way to get the values
-This code shows wrong mixer values
-You can't define MIXER_IS_ALSA with the current cmake configuration
-In the current state this code is incorrect c++ and does not compile (altough it's
probably correct c, i didn't check that)

The 3 last reasons can be fixed, but i'm not in favor of doing that because of the 1st reason
2010-04-12 16:55:03 +02:00
Nikolas Garofil
96ec637af9 Bugfix: mixerbar showed wrong values 2010-04-12 13:37:49 +02:00
Nikolas Garofil
a6b43da875 Bugfix: ac-adapter is sometimes called ADP1 in sysfs instead of AC 2010-04-12 12:33:24 +02:00
Nikolas Garofil
15326c502c Bugfix: battery_bar should also work without argument 2010-04-11 19:13:14 +02:00
Nikolas Garofil
34f3547c0d Bugfix: When the first line behind TEXT was a comment, the start of the second line wasn't parsed 2010-04-10 20:11:20 +02:00
Pavel Labath
939985042a Remove a redundant copy of arg[cv] 2010-03-19 20:33:49 +01:00
Pavel Labath
d3723e727c Fix a leak in mpd.cc (refcount fail) 2010-03-18 21:31:18 +01:00
Pavel Labath
8c30957671 fix "conky's $mpd_* don't update", sf.net #2970555 2010-03-18 21:26:10 +01:00
Pavel Labath
4b38666777 Fix a couple of problems when compiling without OWN_WINDOW 2010-03-14 22:26:29 +01:00
Pavel Labath
5e13dce11c Simplify border width expressions by common subexpression elimination 2010-03-12 19:27:07 +01:00
Pavel Labath
405a175366 add vi modeline 2010-03-12 19:05:59 +01:00
Pavel Labath
88064ef8db set current_text_color if needed 2010-03-12 19:05:01 +01:00
Pavel Labath
0584d423e6 make default_{shade_,outline_,}color lua settings 2010-03-11 12:08:55 +01:00
Pavel Labath
ac8d4385eb Make colorN a lua setting 2010-03-11 11:31:10 +01:00
Pavel Labath
68272383fa make conversion functions inline 2010-03-10 21:18:03 +01:00
Pavel Labath
b1a871b9b9 reorder things a bit, make background_colour setting check the value for validity 2010-03-10 21:02:13 +01:00
Pavel Labath
c41a507e62 Initialize X when out_to_x is set (using the infractructure from previous commit) 2010-03-10 20:01:26 +01:00
Pavel Labath
ba79c58f37 Change setting setter call order, add cleanup function
Call setting setters in the order in which they were registered.
Add a cleanup function, called in the reverse registration order.
2010-03-10 19:33:45 +01:00
Nikolas Garofil
7264b97e7a Add missing header after commit d93dc72e6dbaaa254eaf7ccf0b014d6af1bb45ea;hpb=0336b5d67daf0b03868c4e594a0eca15a4aecd00 2010-03-08 18:13:55 +01:00
Pavel Labath
1d20229d74 make uppercase a lua setting 2010-03-07 13:46:58 +01:00
Pavel Labath
9d8e89a119 make format_human_readable a lua setting 2010-03-07 13:44:33 +01:00
Pavel Labath
06bf26b757 make short_units a lua setting 2010-03-07 13:36:40 +01:00
Pavel Labath
aa95dfdd5e make top_cpu_separate a lua setting 2010-03-07 13:33:48 +01:00
Pavel Labath
357a505dc4 make no_buffers a lua setting 2010-03-07 13:20:16 +01:00
Pavel Labath
d6ff7b7315 make use_spacer a lua setting 2010-03-05 21:05:05 +01:00
Pavel Labath
964b8eaf28 make disable_auto_reload a lua setting 2010-03-05 21:00:25 +01:00
Pavel Labath
667b0d1d8c make extra_newline a lua setting 2010-03-05 20:58:39 +01:00
Pavel Labath
48346c8325 make times_in_seconds a lua setting 2010-03-05 14:20:04 +01:00
Pavel Labath
b713536dad make draw_shades/outline lua settings 2010-03-05 14:10:47 +01:00
Pavel Labath
22931c2c67 make draw_(graph_)borders lua settings 2010-03-05 14:06:15 +01:00
Pavel Labath
147d16e763 make show_graph_scale/range lua settings
PS: at some point a would like to make these per-graph settings, instead of global ones
2010-03-05 13:37:52 +01:00
Pavel Labath
021d6f98c7 make background a lua setting 2010-03-05 13:33:22 +01:00
Pavel Labath
fe9c0609cc Make display a lua setting 2010-03-04 18:31:28 +01:00
Pavel Labath
70d53b770f Merge branch 'master' into lua-config
Conflicts:
	src/conky.cc
2010-03-04 18:23:46 +01:00
Pavel Labath
af02eab4b6 This appears to plug a leak. 2010-03-04 17:40:37 +01:00
Pavel Labath
d93dc72e6d Random C++ification: to_real_path() and current_config 2010-03-04 17:40:20 +01:00
Pavel Labath
241f336f0f Merge remote branch 'origin/master' into lua-config 2010-03-02 20:33:58 +01:00
Pavel Labath
4a4172c92d Make own_window_hints a lua setting 2010-03-02 20:30:15 +01:00
Pavel Labath
5b65fce42d C++ version of lua::state::pushstring 2010-03-02 20:29:37 +01:00
Cesare Tirabassi
0336b5d67d Fix sf: #2961602
Add missing --quiet option and optional arguments to --pause and --interval
(cherry picked from commit a9e5820a34)
2010-03-02 20:29:36 +01:00
Pavel Labath
41ddaf9e23 refactor settings classes
result: easier declaration of settings, easier construction of custom setting classes, commitcount++
2010-03-02 19:29:51 +01:00
Pavel Labath
a810804a6b make own_window_colour a lua setting 2010-02-28 15:51:01 +01:00
Pavel Labath
2ad1809f87 s/substract/subtract/ 2010-02-28 14:05:28 +01:00
Pavel Labath
b8bed06cc8 C++ version of get_x11_color() 2010-02-28 12:26:18 +01:00
Pavel Labath
5c3d06346a Use min() and max() instead of infinity() for default limits
because integral types do not have infinite values
2010-02-28 12:13:37 +01:00
Pavel Labath
a4a08c82b5 make own_window_argb_value a lua setting 2010-02-27 22:28:33 +01:00
Pavel Labath
f6aa8a558f range_checking_accessors class. makes sure setting's value belongs to a specified range 2010-02-27 15:15:25 +01:00
Pavel Labath
4a5304b395 Make own_window_type a lua setting 2010-02-26 18:48:57 +01:00
Pavel Labath
518045eaf6 make own_window_transparent a lua setting 2010-02-26 18:38:15 +01:00
Pavel Labath
94be4f6eb9 make own_window_argb_visual a lua setting 2010-02-26 18:29:46 +01:00
Pavel Labath
1960a511fd Make own_window_title a lua setting 2010-02-26 18:09:55 +01:00
Pavel Labath
fad11cabe1 make own_window_class a lua setting 2010-02-26 17:42:56 +01:00
Pavel Labath
efac83e814 make own_window a lua setting 2010-02-26 14:37:34 +01:00
Nikolas Garofil
fb00ff8fa9 print_version to cpp 2010-02-26 01:17:27 +01:00
Pavel Labath
12e98c7da5 Port out_to_x setting to lua-config 2010-02-25 22:28:34 +01:00
Pavel Labath
d22369333d Merge remote branch 'origin/master' into lua-config 2010-02-25 21:53:31 +01:00
Pavel Labath
54630eb39e Header housekeeping: remove unneeded extern "C", add modelines, add inclusion guards
hopefully, this doesn't break anything
2010-02-25 21:50:50 +01:00
Pavel Labath
724fb2585c Refactor default getters/setter for setting and make them more useful
Adding features AND reducing code size.... yeah
2010-02-25 21:11:39 +01:00
Pavel Labath
f51927241f Add lua_isboolean/toboolean wrappers 2010-02-25 21:10:40 +01:00
Pavel Labath
da3ef0d2c0 Use a named enum for lua types 2010-02-25 16:47:00 +01:00
Pavel Labath
9cf26becf2 Change lua::stack_sentry semantics. Using it should be much simpler now 2010-02-25 16:24:50 +01:00
Nikolas Garofil
cb11cf675a Use isutf() 2010-02-25 07:07:00 +01:00
Nikolas Garofil
6c25f335c4 Shrink code by using more c++ in main() 2010-02-24 22:06:06 +01:00
Pavel Labath
80b049d1c0 Port 'alignment' setting to lua. 2010-02-24 20:51:33 +01:00
Pavel Labath
568c372920 Make modifying settings from C++ a bit easier 2010-02-24 20:27:16 +01:00
Nikolas Garofil
e7ed9a5060 Revert "Use "using namespace std;" and remove all std::'s"
This reverts commit 41e80b9833.
2010-02-24 20:10:26 +01:00
Nikolas Garofil
41e80b9833 Use "using namespace std;" and remove all std::'s
I'm doing this because otherwise i'll will forget to add all those
std::'s and will lose a LOT of time finding the problems.
If you don't agree, undo this patch...
...but i hope you won't :)
2010-02-24 19:39:45 +01:00
Pavel Labath
454f4a12a8 A special class for enum settings, which automatically prints error messages 2010-02-24 18:38:23 +01:00
Pavel Labath
8c6c0aa995 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/CMakeLists.txt
2010-02-24 18:10:22 +01:00
Nikolas Garofil
63133c19d6 cpp-ify conf_cookie.c 2010-02-24 15:37:20 +01:00
Nikolas Garofil
c1648e6558 Use free_and_zero in [u-z]*.cc where appropriate 2010-02-24 12:04:28 +01:00
Nikolas Garofil
da76381300 Use free_and_zero in [st]*.cc where appropriate 2010-02-24 11:52:59 +01:00
Nikolas Garofil
4afe96b9ce cpp-ify prioqueue.c and use free_and_zero in [p-r]*.cc where appropriate 2010-02-24 02:46:45 +01:00
Nikolas Garofil
6092d063c9 Use free_and_zero in [m-o]*.cc where appropriate 2010-02-24 02:14:20 +01:00
Nikolas Garofil
1fa465efb6 Use free_and_zero in l*.cc where appropriate 2010-02-24 01:51:02 +01:00
Pavel Labath
a2110d44d7 Include guard fail 2010-02-23 23:59:03 +01:00
Nikolas Garofil
72d581279a Use free_and_zero in [d-k]*.cc where appropriate 2010-02-23 23:13:11 +01:00
Nikolas Garofil
f236523f30 Use free_and_zero in conky.cc and core.cc where appropriate 2010-02-23 22:06:04 +01:00
Pavel Labath
c9447ddb8e Put zero in free_and_zero 2010-02-23 19:36:47 +01:00
Nikolas Garofil
45dfe4994d Use template for free_and_zero 2010-02-23 16:31:17 +01:00
Nikolas Garofil
c51972b5e2 Use free_and_zero in ccurl_common.cc where appropriate 2010-02-23 15:48:18 +01:00
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
Phil Sutter
057855442c cleanup proc.c obj->data mess
Use a local variable named 'pathbuf' of sufficient size to hold the
generated path name.
2009-12-01 00:32:32 +01:00
Phil Sutter
d9dbd528c4 simplify iconv_convert() a bit (exit early on error) 2009-12-01 00:32:32 +01:00
Phil Sutter
938af98ff3 convert iconv objects to callbacks 2009-12-01 00:32:32 +01:00
Phil Sutter
b8e600b9a4 convert bsd apm objects to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
d48c2f143c convert $include to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
3ed82a34dd convert blink to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
dc0af635d6 convert to_bytes to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
8da8b26ddf use gen_print_nothing for $apcupsd 2009-12-01 00:32:32 +01:00
Phil Sutter
37cbdcf89b convert $endif to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
718ed9d280 convert $else to callbacks.iftest 2009-12-01 00:32:32 +01:00
Phil Sutter
f1454767b2 convert image to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
3fa5c55933 convert some non-openbsd objects to callbacks.{print,iftest} 2009-12-01 00:32:32 +01:00
Phil Sutter
c652427aed convert freq and freq_g to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
31c3734cc8 convert acpitemp to callbacks.{print,free} 2009-12-01 00:32:32 +01:00
Phil Sutter
a67ab7a3c8 convert some ifblock objects to callbacks.iftest 2009-12-01 00:32:32 +01:00
Phil Sutter
721cdbdd30 convert eval to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
f5596a6505 trivial conversion of cmdline_to_pid to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
871c4b2d02 convert buffers and cached to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
1f8bafbcfc convert processes and threads objects to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
82d6d349ba convert user objects to callbacks.{print,free} 2009-12-01 00:32:32 +01:00
Phil Sutter
b4aa2328d7 convert uptime objects to callbacks.print 2009-12-01 00:32:32 +01:00
Phil Sutter
cce12efda7 convert sysname to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
e9dde6293b convert nodename to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
d9e2f687b6 convert format_time to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
f84b14904c convert kernel and machine to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
177da5ffbb convert mem and swap objects to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
ef60b7eb8a drop update_x11info()
instead:
- call XDefaultScreen() and XScreenCount() directly from the print
  callback
- have no update callback at all for the desktop objects (seems to work
  well without)
2009-12-01 00:32:31 +01:00
Phil Sutter
6004ab961a convert desktop and monitor objects to callbacks.print 2009-12-01 00:32:31 +01:00
Phil Sutter
2dca262c00 convert if_smapi_bat_installed to callbacks.iftest 2009-12-01 00:32:31 +01:00
Phil Sutter
9887bfdfdf convert smapi_bat_perc to callbacks.percentage 2009-12-01 00:32:31 +01:00
Phil Sutter
bc1b82771f convert mpd_percent to callbacks.percentage 2009-12-01 00:32:31 +01:00
Phil Sutter
61591def8e convert mixer values to callbacks.percentage 2009-12-01 00:32:31 +01:00
Phil Sutter
36a202091e convert fs_*_perc to callbacks.percentage 2009-12-01 00:32:31 +01:00
Phil Sutter
61c4efb305 convert entropy_perc to callbacks.percentage 2009-12-01 00:32:31 +01:00
Phil Sutter
0631b2ab2e convert swapperc to callbacks.percentage 2009-12-01 00:32:22 +01:00
Phil Sutter
feba298efa convert memperc to callbacks.percentage 2009-12-01 00:31:09 +01:00
Phil Sutter
07f82f5cb6 convert cpu to callbacks.percentage 2009-12-01 00:29:28 +01:00
Phil Sutter
79f5726832 merge loadgraph to callbacks.graphval 2009-12-01 00:29:28 +01:00
Phil Sutter
bd752e8506 merge {down,up}speedgraph to callbacks.graphval 2009-12-01 00:29:28 +01:00
Phil Sutter
fe05542318 merge diskiographs to callbacks.graphval 2009-12-01 00:29:28 +01:00
Phil Sutter
9581914f7d reuse barval callbacks where applicable 2009-12-01 00:28:53 +01:00
Phil Sutter
cba2460397 merge apcupsd_loadbar to callbacks.barval 2009-12-01 00:07:07 +01:00
Phil Sutter
4988947829 convert xmms2_bar to callbacks.barval 2009-12-01 00:06:23 +01:00
Phil Sutter
997805c46b convert smapi_bat_bar to callbacks.barval 2009-12-01 00:05:20 +01:00
Phil Sutter
fcd3d58960 convert mpd_bar to callbacks.barval 2009-12-01 00:04:35 +01:00
Phil Sutter
f79c58ef47 merge mixer bars to callbacks.barval 2009-12-01 00:02:48 +01:00
Phil Sutter
4d7f2e720d merge lua_bar to callbacks.barval 2009-12-01 00:02:04 +01:00
Phil Sutter
4f8e700d64 convert fs bars to callbacks.barval 2009-12-01 00:01:04 +01:00
Phil Sutter
a5ff5d39d0 merge execibar to callbacks.barval 2009-11-30 23:59:13 +01:00
Phil Sutter
95fbecc385 merge entropy_bar to callbacks.barval 2009-11-30 23:58:09 +01:00
Phil Sutter
b78664d8c5 merge audacious_bar to callbacks.barval 2009-11-30 23:57:04 +01:00
Phil Sutter
086829b017 convert swapbar to callbacks 2009-11-30 23:55:48 +01:00
Phil Sutter
d2f3ae7e15 convert mem{gauge,graph,bar} to callbacks 2009-11-30 23:54:52 +01:00
Phil Sutter
b2b9155514 fix execigauge conversion to callbacks 2009-11-30 23:49:58 +01:00
Phil Sutter
685d4ca4e8 fix execbar merge to callbacks 2009-11-30 23:48:54 +01:00
Phil Sutter
4e63422d10 battery_bar: convert to callbacks.barval 2009-11-30 23:48:04 +01:00
Phil Sutter
a11a1a1253 wireless_link_bar: convert to callbacks.barval 2009-11-30 23:35:49 +01:00
Phil Sutter
c85295202b convert cpubar to callbacks.barval 2009-11-30 23:34:20 +01:00
Phil Sutter
06a4650f60 if_xmms2_connected: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
cec0f3b8c6 cleanup mpd code 2009-11-29 22:21:49 +01:00
Phil Sutter
41f32f8766 if_mpd_playing: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
482f2d50b4 if_mixer_mute: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
5249c9da04 if_mounted: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
9af79a4907 if_up: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
27c1207cd1 if_gw: convert to callbacks.iftest 2009-11-29 22:21:49 +01:00
Phil Sutter
bb70c21c36 nvidia: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
0188eb0aaa top: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
1832cf79c9 ioscheduler: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
712caa8ab3 convert obsd_* to callbacks.print (completely untested) 2009-11-29 22:21:49 +01:00
Phil Sutter
a249b9bc44 convert disk_protect to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
2660cb7590 convert execpi to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
60ad080d1d convert pb_battery to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
3f83bd34f4 convert laptop_mode to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
f3cafc6a7c convert gw_* objects to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
faa47450ad convert sony_fanspeed to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
42b71217e3 loadgraph: convert to callbacks.print 2009-11-29 22:21:49 +01:00
Phil Sutter
ee40c63542 xmms2: outsource code and convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
6bf79b7ebe combine: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
65effae144 scroll: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
67559fdaca moc: convert to callbacks.print and callbacks.free 2009-11-29 22:21:48 +01:00
Phil Sutter
dd8ec48fcb bmpx: convert to callbacks.print
While here, also drop those calls to memset, as the whole info object is
being zeroed at the beginning of main(). (Probably this is useful upon
config reload, too.)
2009-11-29 22:21:48 +01:00
Phil Sutter
6371551153 audacious: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
974d28a667 apcupsd: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
ac80e6f55f hddtemp: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
49cacbbc91 offset, align, tailhead: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
e0a3a82932 fs objects: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
18d2319d73 tcp-portmon: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
d0a2c51f4b font: convert scan_font to match common signature 2009-11-29 22:21:48 +01:00
Phil Sutter
9247d838c3 hddtemp: convert to callbacks.free 2009-11-29 22:21:48 +01:00
Phil Sutter
eb612dfcb0 hr, stippled_hr: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
4927eb85a2 goto, tab: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
9c8805ee7b shadecolor: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
f9036f58a2 outlinecolor: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
1a6803454c color: convert to callbacks.print 2009-11-29 22:21:48 +01:00
Phil Sutter
08122354a9 convert some special printing functions to common signature
Also add a little hack to $scroll to omit the need to call new_fg() from
inside print_scroll(). Instead of inserting a new special after printing
the scrolled text, insert a new object after the scroll object when
parsing text objects to handle the color reset.
2009-11-29 22:21:48 +01:00
Phil Sutter
2e83ff05c5 text object list: allow appending a list of objects 2009-11-29 22:21:11 +01:00
Phil Sutter
02d104cc6a free_text_objects: drop empty switch cases 2009-11-29 21:40:48 +01:00
Phil Sutter
9cf2b88242 bunch of trivial conversions to gen_free_opaque() 2009-11-29 21:40:48 +01:00
Phil Sutter
697e64272e text_object: provide generic object free routine
This is a valid replacement to a custom routine for objects using data.s
or data.opaque to point to dynamically allocated data.
2009-11-29 21:40:48 +01:00
Phil Sutter
fa3118993e huge bunch of trivial conversions to obj->callbacks 2009-11-29 21:40:38 +01:00
Phil Sutter
7b05bdd665 text_object: introduce text_object_callbacks
The callback functions are:
print - to be called from generate_text_internal()
iftest - same as print for ifblock objects (triggers jumping)
barval - same as above for bar objects (returns current bar value)
gaugeval - same as above for gauge objects
graphval - same as above for graph objects
percentage - for percentage objects, returns actual percentage
free  - called in free_text_objects()

Until conversion is complete, if the function pointer is NULL the old
lookup by type is being done.

Note that it's possible to assign both 'print' and 'iftest' callbacks.
In this case, the code simply ignores the 'iftest' callback, though this
could easily be changed (always calling DO_JUMP at last, of course) in
order to allow ifblock objects to print something in addition to jumping
somewhere (or not).
2009-11-29 21:33:30 +01:00
Phil Sutter
d989f5b34a cleanup exec.c 2009-11-29 21:28:58 +01:00
Brenden Matthews
f36f747aca Add (broken) cmake build stuff. 2009-11-26 11:25:32 -08:00
Nikolas Garofil
4652e834b1 Add support for max_text_width configuration setting 2009-11-25 16:04:49 +01:00
Nikolas Garofil
4c4770eb77 Fix: $scroll,$if_running and $apcupsd_lastxfer can now have long arguments if text_buffer_size is increased 2009-11-24 13:23:58 +01:00
Nikolas Garofil
b2987b9354 Fix: Templates only work when they end with a space or a } 2009-11-23 12:58:20 +01:00
Nikolas Garofil
fb3c59baec Fix building with --disable-x11 2009-11-22 23:05:08 +01:00
Phil Sutter
970420106c fix new_graph parameters
One should never print into buffers without knowing their size. Although
new_graph consumes only a single char, this may already be too much.
2009-11-22 21:12:54 +01:00
Phil Sutter
346b4cfbc1 move get_x11_color() to colours.c 2009-11-22 21:07:42 +01:00
Nikolas Garofil
6ee76e5c55 Fix compiling with --disable-x11 2009-11-22 14:05:11 +01:00
Phil Sutter
66df73f74a implement ASCII gauge and enable all gauge objects for use with no X 2009-11-22 02:09:46 +01:00
Phil Sutter
c2eb77c3f0 realise seamless integration of new_bar_in_shell
The decision about whether to print ASCII or X11 bar is done from within
specials.c, so all those #ifdef + if () blocks can be dropped. This also
implicitly enables the ASCII bar for some bar printing objects which where
forgotten before.
2009-11-22 02:09:46 +01:00
Nikolas Garofil
c131c1d129 Bugfix: letting XmbSetWMProperties set the windowtitle causes a memleak with some versions of Xlib 2009-11-21 23:58:02 +01:00
Nikolas Garofil
20a7f5eb72 Merge branch 'master' of ssh://git.omp.am/home/omp/git/conky 2009-11-21 15:50:35 +01:00
Nikolas Garofil
567a86f99a Fix segfault in X11-related code
Conky sometimes tries to clears part of a window before it's created,
this breaks closing the displaying. For example with this config:
TEXT
$lua
2009-11-21 15:45:00 +01:00
Phil Sutter
d7f9e64824 allow AF_INET6 in libmpdclient since mpd supports it
Thanks to Kaleb Elwert (belak, IRC) who reported the problem and tested
the fix.
2009-11-20 23:00:47 +01:00
Nikolas Garofil
b85b0d5aab Bugfix: Sx in $format_time prints out wrong values when number of seconds ends with a zero and has no numbers behind the point 2009-11-20 15:23:54 +01:00
Phil Sutter
7291184783 simplify conky_version and co. a bit 2009-11-20 00:03:15 +01:00
Phil Sutter
c8bed3a28d voltage: outsource printing code 2009-11-20 00:02:42 +01:00
Phil Sutter
b25be92273 xmms2: do 'gg=G' in vim :) 2009-11-20 00:01:47 +01:00
Phil Sutter
c439c8e7b6 mpd: outsource printing code
In order to make life a bit easier, the struct mpd_s field "volume" has
been renamed to just "vol" to match the object's name (mpd_vol).

Although format_media_player_time() is probably meant to be used by all
supported media players, it's currently being used by mpd only. So for
now this function can reside statically in mpd.c
2009-11-20 00:01:33 +01:00
Phil Sutter
87873bceeb lines, words: outsource code 2009-11-19 23:59:50 +01:00
Phil Sutter
ea22f21252 smapi: outsource printing code 2009-11-19 23:57:38 +01:00
Phil Sutter
bb35c25284 ibm: convert to common signature 2009-11-19 23:57:16 +01:00
Phil Sutter
91b0c66617 mixer: convert to common signature 2009-11-19 23:56:01 +01:00
Phil Sutter
80e41032cd {down,up}speedgraph: convert to match common signature 2009-11-19 23:52:39 +01:00
Phil Sutter
80114f3b1e diskio: convert print functions to match common signature 2009-11-19 23:51:13 +01:00
Phil Sutter
b9f1dc7283 cleanup times_in_seconds enhancement
This also adds code to unset the variable before reloading the config.
2009-11-19 23:39:08 +01:00
Phil Sutter
45a183d840 xlib: do exit() on IOError instead of abort()
The IOError happens every time I close conky's normal own window, so I
guess the situation is not as abnormal as abort() indicates. Calling
exit() instead should really suffice and give the process a chance to
clean up (by calling destructor routines for instance).
2009-11-19 23:04:09 +01:00
Phil Sutter
6f9bfe970a fix potential buffer overflow when printing top values 2009-11-19 23:04:09 +01:00
Phil Sutter
9efa384bbc lua: outsource code 2009-11-19 23:04:09 +01:00
Phil Sutter
b6d1ff6c42 i8k: outsource code 2009-11-19 23:04:09 +01:00
Nikolas Garofil
fe1d7da3d5 Add support for $pid_read and $pid_write 2009-11-19 12:32:14 +01:00
Nikolas Garofil
f8bae62234 $format_time treats ( and ) as special chars 2009-11-19 00:21:49 +01:00
Nikolas Garofil
59594e70d2 Added support for \Sx to $format_time 2009-11-19 00:04:49 +01:00
Nikolas Garofil
4a1be880d3 Make $user_time, $mpd_elapsed and $mpd_length compatible with times_in_seconds 2009-11-18 21:25:05 +01:00
Nikolas Garofil
d9ad73af65 Make sure $format_time only works when times_in_seconds is enabled 2009-11-18 20:27:53 +01:00
Nikolas Garofil
8f42831a62 Add support for time_in_seconds configuration setting 2009-11-18 20:07:47 +01:00
Nikolas Garofil
4cfb042df9 Fix bug in $pid_cmdline 2009-11-18 18:02:10 +01:00
Nikolas Garofil
6046198053 Fix bug in $pid_nice, $pid_priority, $pid_time, $pid_time_kernelmode and $pid_time_usermode 2009-11-18 17:13:20 +01:00
Nikolas Garofil
0215298c27 Added support for $format_time 2009-11-18 15:35:35 +01:00
Nikolas Garofil
90f5701f3e Bugfix: crash when apcupsd isnt running 2009-11-16 20:19:57 +01:00
Phil Sutter
a1ddcc0786 fix potential buffer overflow in parse_conky_vars() 2009-11-16 19:52:48 +01:00
Phil Sutter
70e5afe5ac ifblock: fix clash with specials when freeing objects
Murphy hit me again: in my naive attempt to fix the clash between
ifblocks and objects parsing text objects due to the double use of the
'sub' field, I overlooked this problem with reusing the 'special_data'
field. So here comes the real thing (TM), donating ifblocks their own
field for pointing to the jump target.
2009-11-16 19:52:12 +01:00
Phil Sutter
44f76f4876 drop leftover freq_dynamic code in freebsd.c and openbsd.c
As the comment states, those functions were originally copied from
linux.c; in fact just the code which has been removed due to licensing
issues.
2009-11-16 19:41:06 +01:00
Pavel Labath
e97b67aa20 IPv6 support for $tcp_portmon
In theory, this may fail to compile on ancient systems that don't have IPv6 types (struct
sockaddr_in6 et al.) available. If it turns out that such systems are still in use, the best way
to solve it would be to provide dummy declarations via configure tests.
2009-11-16 18:17:16 +01:00
Nikolas Garofil
84d6095c40 Use seconds instead of centiseconds as unit for $pid_time_kernelmode, $pid_time_usermode and $pid_time 2009-11-16 16:59:41 +01:00
Nikolas Garofil
7b05f78de8 Added support for $pid_time_usermode, $pid_time_kernelmode and $pid_time 2009-11-16 15:30:57 +01:00
Nikolas Garofil
015d275098 Add support for $pid_nice and $pid_priority 2009-11-16 15:01:43 +01:00
Nikolas Garofil
f93aa2a68d Added support for $pid_threads and $pid_thread_list 2009-11-16 09:54:17 +01:00
Nikolas Garofil
f3e250df55 Bugfix: make sure $else works correct and without memleaks 2009-11-16 08:39:05 +01:00
Nikolas Garofil
5eebf1c516 Fix invalid free for all $if_-vars 2009-11-16 00:21:49 +01:00
Nikolas Garofil
f0211cd43d fix invalid free in if_up 2009-11-15 23:45:33 +01:00
Pavel Labath
ec879680d2 Forgot to set top_running when $running_processes is used 2009-11-15 23:00:14 +01:00
Nikolas Garofil
2ed76a345f Added support for $pid_vmpeak, $pid_vmsize, $pid_vmlck, $pid_vmhwm, $pid_vmrss, $pid_vmdata, $pid_vmstk, $pid_vmexe, $pid_vmlib, $pid_vmpte 2009-11-15 19:44:37 +01:00
Pavel Labath
72412c463b Rename $running_processes to $running_threads, implement real $running_processes 2009-11-15 17:55:03 +01:00
Nikolas Garofil
2c2e87061b Added support for $gid_name 2009-11-15 17:46:41 +01:00
Nikolas Garofil
3fa868f35b Added support for $uid_name 2009-11-15 17:21:55 +01:00
Nikolas Garofil
d38049fb96 Added support for $pid_uid, $pid_euid, $pid_suid, $pid_fsuid, $pid_gid, $pid_egid, $pid_sgid and $pid_fsgid 2009-11-15 14:49:55 +01:00
Nikolas Garofil
b8e6b1a58d Add support for $pid_parent 2009-11-15 13:26:40 +01:00
Phil Sutter
68278e4a45 yet another fix for FreeBSD (somehow sneaked through last time) 2009-11-14 16:47:30 +01:00
Phil Sutter
40792b7d05 fix compiling for freebsd
Tested using default options, lua disabled as only lua50 available in
7.2-RELEASE.
2009-11-15 01:36:17 +01:00
Phil Sutter
8f1eae1b94 add generated files for profiling to clean list 2009-11-15 01:36:17 +01:00
Nikolas Garofil
038e182c38 argument of $cmdline_to_pid doesnt have to be the full commandline 2009-11-15 00:51:38 +01:00
Nikolas Garofil
7b6e01b869 fix last commit 2009-11-14 22:17:41 +01:00
Nikolas Garofil
fa459f0539 Make it possible to use other vars as arguments for the $pid-vars, add support for $pid_state_short, add support for $cmdline_to_pid 2009-11-14 22:07:54 +01:00
Cesare Tirabassi
e582acf1a0 Merge branch 'master' of git.omp.am:/home/omp/git/conky 2009-11-14 15:58:06 +01:00
Cesare Tirabassi
0ee5e9935a Refactoring of commit 363cf1ab73
The problem with the original commit was that some session-managers set
stdin to /dev/null for the processes they launch, therefore the variable
wasn't very effective.
This commit change the variable conky_user_time to user_time.
This variable has a mandatory argument, a console identifier
(eg. tty7, pts/0, etc.).
Once called, this will list how long the user for the given console has been
logged in for.
This commit also allows multiple user_time to be specified for different
consoles, as well as correctly handle a conky restart.
2009-11-14 15:57:45 +01:00
Nikolas Garofil
1a4c2c61e8 Shrink proc.c 2009-11-14 15:08:41 +01:00
Nikolas Garofil
44de7fe6be Support for $pid_state 2009-11-14 13:58:07 +01:00
Pavel Labath
6db3b5809d Add middle_middle alignment, mostly for completeness 2009-11-13 21:35:49 +01:00
Nikolas Garofil
ab0b80e495 Added support for $pid_chroot 2009-11-13 16:54:40 +01:00
Cesare Tirabassi
f1272dbd31 Merge branch 'master' of git.omp.am:/home/omp/git/conky 2009-11-13 16:36:49 +01:00
Cesare Tirabassi
363cf1ab73 Add $conky_user_time (sf.net #2830919)
The bug reporter asks if it is possible to add a variable giving the "current
user time" only, since the variable user_times reports the times for ALL
logged users.
AFAIK, the only info one can gather inside conky, is the login time for the
tty connected to conky's standard input.
This commit adds support for it (it should work on any posix compliant *nix).
Note that in coherence with the definition, the variable is called
conky_user_time (for a single user stand-alone machine used as a desktop
this would be the "current" user time).
2009-11-13 16:30:04 +01:00
Nikolas Garofil
e9d92ae717 Fix bug in $pid_openfiles 2009-11-13 16:29:44 +01:00
Phil Sutter
bde5845077 drop adt746x objects
This was really creepy stuff. Last updated in April, 2006 to work with
kernels > 2.6.12. I consider this "fobar" (fscking obsolete beyond all
recognition) and doubt anyone still uses this. If you do, blame me. :)
2009-11-13 00:47:23 +01:00
Nikolas Garofil
52df1d2bf2 Merge branch 'master' of ssh://git.omp.am/home/omp/git/conky 2009-11-13 00:38:13 +01:00
Nikolas Garofil
52629bef61 Added support for $pid_openfiles 2009-11-13 00:36:46 +01:00
Phil Sutter
8922603b91 entropy: outsource code
This patch ought to be small and simple ...

The reason why it's not is me wanting the entropy data out of struct
information. This means update_entropy() can not be used anymore, as it
uses this globally available object.

The solution I am presenting here is quite messy regarding header
includes. Hopefully this will go away soon as I plan on creating some
sort of "OS library" containing all OS specific routines and defining
macros for easier capability checking in the non-specific code. This on
the other hand means we'll need "wrappers" around OS specific objects,
but that's not as bad as it seems - having non-specific text objects
only will definitely clean up the code, and capabilities can be checked
where they should be.
2009-11-13 00:02:16 +01:00
Phil Sutter
e787870eb4 top: fix segfault for $if_running
The "name" field may be zero, which makes strcmp() freak out.
2009-11-13 00:02:16 +01:00
Nikolas Garofil
e26c9977f2 fix potential bugs in snprintf 2009-11-12 21:48:15 +01:00
Nikolas Garofil
1d0b68e60d Fix building without C99 2009-11-12 21:33:57 +01:00
Nikolas Garofil
6c4f069f00 Added support for $pid_exe and $pid_stdin, $pid_stdout and $pid_stderr 2009-11-12 20:34:43 +01:00
Nikolas Garofil
6b20156a1b Added support for $pid_environ_list 2009-11-12 15:42:18 +01:00
Nikolas Garofil
d595a65077 Add support for $pid_environ 2009-11-11 22:56:12 +01:00
Nikolas Garofil
cb96b3bcca Add cwd to $pid and split into $pid_cmdline and $pid_cwd 2009-11-11 16:27:19 +01:00
Nikolas Garofil
aa761584db fix previous commit 2009-11-11 13:44:50 +01:00
Nikolas Garofil
db99693091 fix tiny compile problem 2009-11-11 13:43:14 +01:00
Nikolas Garofil
65cf0439a0 Fix memleak and change literals to defines 2009-11-11 13:23:05 +01:00
Nikolas Garofil
8276da8777 Add proc.c and proc.h 2009-11-11 11:33:28 +01:00
Nikolas Garofil
46dd6ca513 Add support for ${pid cmdline} 2009-11-11 10:55:25 +01:00
Nikolas Garofil
827be3bde8 Fix $if_mpd_playing and $mpd_percent when you stop playing a song, thanks Sakari Matikka 2009-11-10 13:23:00 +01:00
Nikolas Garofil
ccbaf9ea89 Fix memleak 2009-11-10 00:15:30 +01:00
Nikolas Garofil
7025477402 Fix $scroll only scrolls once 2009-11-09 02:38:20 +01:00
Nikolas Garofil
e292dd5e28 Fix segfault and memleaks in curl 2009-11-08 21:49:28 +01:00
Phil Sutter
37071ccd8e ifblock objects: fix bug for sub-object parsing ifblocks
When dropping the ifblock field of struct text_object, I short-sightedly
reused the sub field for holding the pointer to the matching else/endif.
This however doesn't work for objects parsing their own object list, as
they need the sub field for themselfs.

Since we have it, simply reuse the special_data field instead and hope
there won't ever be an object which is both special and ifblock. ;)
2009-11-08 20:20:47 +01:00
Phil Sutter
581c86f070 fix conversion bug when freeing exec objects 2009-11-08 20:20:47 +01:00
Nikolas Garofil
a1e199c85a Fix building with metar but without xoap 2009-11-08 18:00:13 +01:00
Nikolas Garofil
ce99d1a782 Use a define for the maximum number of network devices 2009-11-07 23:46:46 +01:00
Nikolas Garofil
aad43bea8d Added support for $threads and fixed $processes on Linux 2009-11-07 18:14:04 +01:00
Nikolas Garofil
1ed564fd0b Revert "Added support for and fixed on Linux"
This reverts commit 43c7c0373b.
2009-11-07 18:13:21 +01:00
Nikolas Garofil
43c7c0373b Added support for and fixed on Linux 2009-11-07 18:06:07 +01:00
Nikolas Garofil
ff1fab20c2 Fix building with --disable-xft and add ncurses to the -v option 2009-11-07 15:32:03 +01:00
Nikolas Garofil
68ca9485da Fix building with --disable-iostats 2009-11-07 13:21:47 +01:00
Nikolas Garofil
74145a7fef Fix building with --disable-x11 --disable-lua --disable-ncurses 2009-11-07 12:21:48 +01:00
Phil Sutter
e909cdd4eb scan_graph: allow giving a "hint" about a good scale value
This is more or less a temporary fix to restore the former behaviour. In
the long term objects will define a max value, which will be of use for
all kinds of meters.
2009-11-06 00:10:00 +01:00
Phil Sutter
c88d01af95 weather: fix this embarrassing bug 2009-11-05 22:27:34 +01:00
Phil Sutter
556751c8c9 top: drop problematic field totalmem
The field totalmem was formerly used to hold the percentage of used mem
by a process. So at update time, the field info.memmax was being
addressed, which is potentially being updated at the same time, As all
updating routines potentially run in parallel. Though there is an
(quite) easy fix for this: calculate the percentage upon object
printing. This works because conky synchronises all update routines
right before printing the result. (To omit locking on it's own.)
2009-11-03 23:24:09 +01:00
Phil Sutter
e08bc8fad7 enum special_types: define nonspecial for completeness 2009-11-03 23:23:23 +01:00
Phil Sutter
4dd54b3df6 if_gw: no need to free unused obj->data.s 2009-11-03 23:23:23 +01:00
Phil Sutter
f61d8d108f text_object: completely remove the need for data.ifblock 2009-11-03 23:23:23 +01:00
Phil Sutter
9a770295d1 drop useless ifblock.str 2009-11-03 23:23:23 +01:00
Phil Sutter
66c187e7a1 no need to save the args passed to if_empty and if_match 2009-11-03 23:23:23 +01:00
Phil Sutter
7304378d73 drop a few unused fields from struct text_object 2009-11-03 23:23:23 +01:00
Phil Sutter
d9ec45b25d drop struct text_object field pair, since it got unused due to latest commits 2009-11-03 23:23:23 +01:00
Phil Sutter
76b433c809 drop struct text_object field f 2009-11-03 23:23:23 +01:00
Phil Sutter
f98a360089 drop now unused SIZE_DEFAULTS macro 2009-11-03 23:23:23 +01:00
Phil Sutter
041059f1c2 specials: convert stippled_hr object to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
3458db80aa specials: convert tab object to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
50e2b5961a specials: convert gauge objects to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
bbec0db498 specials: convert graph objects to new style 2009-11-03 23:23:23 +01:00
Phil Sutter
a4777c7c55 misc smaller fixes 2009-11-03 23:23:23 +01:00
Phil Sutter
22251dca51 specials: introduce dedicated per-object data and merge graph objects 2009-11-03 23:23:23 +01:00
Phil Sutter
0bed05997b review load* code 2009-11-03 23:23:23 +01:00
Phil Sutter
42dfb7ac69 move loadavg and loadgraph code to common.c 2009-11-03 23:23:23 +01:00
Phil Sutter
63079a2075 local_mails: convert to generic object payload
This also includes a little header include cleanup.
2009-11-03 23:23:22 +01:00
Phil Sutter
90ed7d8a2c mail: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
35ecbb3330 mail: use a private common struct mail_s instead of info.mail 2009-11-03 23:23:22 +01:00
Phil Sutter
ac99833646 text_object: use field i instead of cpu_index 2009-11-03 23:23:22 +01:00
Phil Sutter
3a365bcd33 if_up: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
2112b1f0ee drop now unused sensor field 2009-11-03 23:23:22 +01:00
Phil Sutter
0de0047bdc obsd_sensors: cleanup code (untested) 2009-11-03 23:23:22 +01:00
Phil Sutter
f2188a67a1 ibm: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
c8f07daceb net_stats: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
0740e91911 diskio: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
aa4d61d3d7 combine: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
64ec783475 scroll: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
bf9263bc5e read_tcp: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
b74e0494de exec: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
0dc60481cf top: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
4b0c1d3226 mboxscan: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
dd36fc4caa mixer: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
c45decda5e curl: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
4716969cc6 weather objects: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
046ae1dd61 rss: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
9202a9da87 eve: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
94ac89e091 sysfs objects: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
d2be5980ca tcp_portmon: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8d1640f30b fs_*: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
f31e5cefe7 fs_bar, fs_bar_free: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
f6942c8c98 tailhead: convert to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
1d73d82b87 convert tztime to generic object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
8165a91f0a nvidia: convert to generic text object payload 2009-11-03 23:23:22 +01:00
Phil Sutter
eff3f75014 text_object: introduce a generic payload pointer 2009-11-03 23:23:22 +01:00
Phil Sutter
d1b2c7eac3 local_mails: put code to where it belongs
Note that the code does not only use a pre-processor generator for
defining the print functions, but also for their prototypes. Sadly, this
generated a conflict in mboxscan.c which this patch resolves, too.
2009-11-03 01:50:28 +01:00
Phil Sutter
fa9135f9df mail: put imap and pop3 code to where it belongs 2009-11-03 01:50:28 +01:00
Phil Sutter
8b76d8fb60 net_stats: outsource network-related objects 2009-11-03 01:50:28 +01:00
Phil Sutter
9efa29be28 combine: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
37658b540b scroll: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
24d9e8bf24 read_tcp: outsource code 2009-11-03 01:50:28 +01:00
Phil Sutter
7a168c377b exec: put all exec-related stuff into it's own file
While here, also merge the execi and texeci fields of struct
text_object, so more common code can be shared in between.
2009-11-03 01:50:28 +01:00
Phil Sutter
2631f42820 ibm: put specific code to where it belongs 2009-11-03 01:50:28 +01:00
Phil Sutter
7fc1c801aa gw_info: move code to where it belongs 2009-11-03 01:50:28 +01:00
Cesare Tirabassi
27a2a253a8 Fix indenting of last commit 2009-11-01 18:42:29 +01:00
Cesare Tirabassi
4ea99e27f1 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?
2009-11-01 18:37:48 +01:00
Phil Sutter
f7f3b37807 rss.h: drop useless header include 2009-10-12 23:04:41 +02:00
Phil Sutter
d1ed9c8399 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.
2009-10-12 23:00:06 +02:00
Phil Sutter
a106b52698 curl: put init and print code to where it belongs
This also fixes a bug in arg parsing, effectively forcing an interval to
be specified.
2009-10-12 21:33:02 +02:00
Phil Sutter
ad8dd36cb7 weather objects: move init and print code to weather.c 2009-10-12 21:33:02 +02:00
Phil Sutter
6a2f58a25c rss: move init and print code into rss.c 2009-10-12 21:33:02 +02:00
Phil Sutter
ddca4aac68 spend some time with eve.{c,h}
* minimise core code hooks
* drop useless exporting of private functions (and make them static)
* reorder functions in eve.c so no prototypes are needed
* drop massive header include and add double include barrier in eve.h
2009-10-12 21:33:02 +02:00
Phil Sutter
700a32b2e7 sysfs objects: merge init and print routines 2009-10-12 21:33:02 +02:00
Phil Sutter
da7876468f tcp_portmon: drop useless function pointer cast, use OBJ_ARG 2009-10-12 21:33:02 +02:00
Phil Sutter
4d70cf07b8 fs_bar, fs_bar_free: merge init and print routines 2009-10-12 21:33:02 +02:00
Phil Sutter
b9a28c37a8 tail, head: use OBJ_ARG to simplify code 2009-10-12 21:33:02 +02:00
Phil Sutter
a529ac52de hddtemp: drop dead code (custom per-object data) 2009-10-12 21:33:02 +02:00
Cesare Tirabassi
066af067f0 Fix global info.desktop variables were incorrectly freed, sf #2876647 2009-10-12 13:38:48 +02:00
Phil Sutter
ea92e63a44 tztime: fix argument parsing bug, clarify docs 2009-10-04 04:03:21 +02:00
Phil Sutter
1e893ec6e3 iconv: outsource code into it's own file
While testing, I found two already existing bugs:
* the variable 'a' passed to iconv_convert() needs to be passed by
  reference in order to allow for the desired side effect.
* Somehow the trailing junk after an iconv_conversion to a shorter
  string messes things up (and gets printed!). I couldn't exactly find
  out why this happens, but setting (*p) = 0; solves this problem.
2009-10-04 03:41:45 +02:00
Phil Sutter
adf9d23927 outsource time, utime and tztime into a separate file 2009-10-04 03:24:04 +02:00
Phil Sutter
e3e77ce75e move the SIZE_DEFAULTS() macro to where it belongs to 2009-10-04 03:24:04 +02:00
Brenden Matthews
584d05d2ad Add the -p/--pause command line option. 2009-10-03 14:26:39 -07:00
Brenden Matthews
88a8799bf5 Improve IMAP/POP3 code, fix compiler error. 2009-09-30 18:06:18 -07:00
Brenden Matthews
7fc4d40eb2 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.
2009-09-27 10:40:06 -07:00
Brenden Matthews
4a0676d4d0 Fix IMAP IDLE with Google's IMAP service. 2009-09-26 18:38:55 -07:00
Pavel Labath
28978461a7 Put OBJ(image) in $ifdefs
so that conky produces more meaningful error message when compiled without imlib
2009-09-25 14:43:46 +02:00
Pavel Labath
bfda285567 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.
2009-09-22 18:19:08 +02:00
Phil Sutter
cfccea4079 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.
2009-09-20 19:04:45 +02:00
Phil Sutter
d163293f66 index processes in a hash table for faster lookup 2009-09-20 16:10:05 +02:00
Pavel Labath
596449c902 It feels much better to let the thread exit voluntarily instead of violently killing it 2009-09-20 14:38:57 +02:00
Phil Sutter
d45aa362b0 fixup for ncurses output 2009-09-20 13:52:46 +02:00
Phil Sutter
4823b1f428 drop duplicate code 2009-09-20 13:18:10 +02:00
Phil Sutter
3569ece513 minor indentation fixup 2009-09-20 13:16:43 +02:00
Phil Sutter
e391fa40a9 this was looking wrong 2009-09-20 13:16:43 +02:00
Phil Sutter
15e262a3ca minor simplification of get_string_width_special() 2009-09-20 13:16:20 +02:00
Phil Sutter
4840de39cd 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.
2009-09-20 13:14:08 +02:00
Phil Sutter
2cb45085e0 simplify get_string_width() a bit 2009-09-20 13:12:56 +02:00
Pavel Labath
7ad3e34e34 OBJ -> OBJ_ARG; apparently forgotten in 9f22ba 2009-09-15 23:54:31 +02:00
Phil Sutter
fea72bd8f8 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.
2009-09-15 23:16:39 +02:00
Phil Sutter
7fa59c6c90 better zero out allocated memory 2009-09-15 23:16:39 +02:00
Phil Sutter
b7b9329e38 update machinery: run each update callback in it's own thread 2009-09-15 23:16:39 +02:00
Phil Sutter
925ac2b7ba read_tcp: get rid of heavy indenting 2009-09-15 23:16:35 +02:00
Phil Sutter
9f22bab657 core: add OBJ_ARG() and OBJ_IF_ARG() to force arguments
These macros can be used just like their OBJ() and OBJ_IF()
counterparts, just that they bail out hard when arg is unset. While
here, also cleanup the macro definition by using __* macros and fully
cleanup the macro namespace when the job is done.

Although this makes conky kind of less robust when it comes to
configuration errors, aborting is the right thing to do to avoid
ambiguity between unknown text objects.
2009-09-15 23:12:15 +02:00
Phil Sutter
77cc646080 imlib2: don't flood warnings on non-existing images 2009-09-15 23:12:15 +02:00
Phil Sutter
f33affdc03 do not unconditionally overwrite a variable after conditionally setting it 2009-09-15 23:12:15 +02:00