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

2089 Commits

Author SHA1 Message Date
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