1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00
Commit Graph

2244 Commits

Author SHA1 Message Date
Pavel Labath
ee8a9e6b0f Don't abort when config references a non-existant hwmon file
this sort of fixes sf.net #3306538. The person there correctly tested for the existance of the
file with $if_existing, but the problem is we run the callbacks regardless of the conditional
tests.
2011-10-13 10:28:12 +02:00
Christian Brabandt
354e577b15 Cmus support added to conky 2011-10-13 09:41:53 +02:00
Pavel Labath
b1f6ac1688 Remove 'top_field' enum since it is unused 2011-10-10 22:12:05 +02:00
Pavel Labath
6c04ba542b Add uid to "top" output (sf.net #3178916)
original patch submitted by Thomas Wiegner, I added support for printing of raw uids.
2011-10-10 22:11:34 +02:00
Pavel Labath
f6b38df642 Remove SECRIT_MULTILINE_CHAR hack
Noone knows what it was supposed to do and removing it seems to fix sf.net #3411610 (and probably
a few others). If it turns out it was doing something useful, we will try to reintroduce it
without breaking other things.
2011-10-10 21:04:57 +02:00
Pavel Labath
ddaa48a29e Use %llu instead of %Lu in the previous commit 2011-10-02 19:29:07 +02:00
Peter Hercek
4345050a6a mem_vsize and mem_res need to be 64 bit (sf.net #3366272)
if process allocated 4GiB or more of ram then {top mem_vsize} did not report correct number

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2011-10-02 19:26:10 +02:00
Pavel Labath
3be2b41fbf fix compilation of freebsd.cc 2011-10-02 14:44:52 +02:00
Pavel Labath
ec2398ff18 c++ify linux.cc:is_disk() 2011-10-02 14:43:44 +02:00
Pavel Labath
0493ba853c Emulate O_CLOEXEC on systems that don't support it 2011-10-01 22:18:25 +02:00
Pavel Labath
b2331969d5 Fix a crash on exit when using curl
The problem was that the callback thread is destroyed only in the destructor of the callback_base
class (which is called after the destructor of the derived classes). This means that the thread
is running even when it's object is partly destroyed, which can cause segfaults, race conditions
and other nasty problems.

I've fixed it so that the thread is destroyed before the underlying object's destructor is
called.
2011-09-28 18:31:05 +02:00
Pavel Labath
6480df48f3 Revert "Fix short_units for below kilo values."
I revert this, because it breaks padding for numbers < 1000, which causes ugly text shifts when
numbers change from <1000 to >1000. If someone disagrees with this, we can talk about it in
 #conky. I asked before doing this, but noone seemed to care.

This "fixes" bug #3389641 on sf.net, reported by sakalisc.

This reverts commit c9cf08d9e9.

Conflicts:

	src/conky.cc
2011-09-18 19:16:14 +02:00
Pavel Labath
c9a306defd Use monotonic time when calculating the update interval (fixes sf.net #2970255)
when the system clock is moved backwards, the update interval would be calculated incorrectly. If
it was moved back far enough, conky would use 100% cpu. Conky now uses monotonic clock to prevent
this. If it turns out to be unsupported on some platform, an appropriate fallback can be added.

problem reported by norsetto
2011-09-17 13:12:30 +02:00
Pavel Labath
542e0c085e Support imap passwords with strange characters (sf.net #3402448)
conky now sends the password using the length + string format, which should not need any quoting
of special characters. Hopefully, we won't find a server which does not support this encoding.

This also fixes a bug which prevented the password from being entered from the console.

bug reported by Brent
2011-09-16 22:16:05 +02:00
Pavel Labath
1321a41015 Fix 'conky-1.8.1 does not build with curl-7.21.7' (sf.net #3383906)
In the new version of curl, types.h no longer exists. I just removed the offending include as
is seems to be unnecessary.

bug reported by billie80.
2011-08-01 22:40:23 +02:00
Nikolas Garofil
d59751e19f Fix a few warnings with gcc 4.4.5 2011-03-27 20:42:18 +02:00
Pavel Labath
b1eab2be0e gcc-4.5 compatibility fixes 2011-03-27 14:45:38 +02:00
Pavel Labath
17cf8517c3 Merge remote branch 'origin/master' into lua-config 2011-03-26 21:09:00 +01:00
Pavel Labath
75e147fa25 Remove timed_thread code as it is no longer used. 2011-03-26 21:04:07 +01:00
Pavel Labath
f3dfb21859 Make mpd vars use the new update system 2011-03-26 19:35:11 +01:00
Pavel Labath
ba9be3fa18 Make moc vars use the new callback system 2011-03-26 19:35:11 +01:00
Pavel Labath
ad8dfc0853 Make audacious vars use the new update system 2011-03-26 19:35:03 +01:00
Pavel Labath
06304030a2 update system: clear multiple posts in case of slow updates 2011-03-25 12:33:13 +01:00
Pavel Labath
b99c7291bc Make mail variables use the new callback system 2011-03-25 12:26:49 +01:00
Pavel Labath
367bb58dae Improvements in the update callback system
- a function for easier access to the members of the tuple
- the is_done() function
2011-03-20 16:53:15 +01:00
Pavel Labath
0eaf5edbb8 Outsource merging of two callbacks into a separate function 2011-03-15 15:13:13 +01:00
Pavel Labath
70da1c8b37 Allow xmms2_smart to display only the title (sf.net #3140371)
In the current implementation of xmms2_smart, when a song being played does not have an artist
name (as is the case with many streams) conky displays an empty space a dash followed by the
title (ex: " - Song Title"). The following patch improves this by only displaying the song title
in xmms2_smart when the song artist is empty. Moreover, the patch also fixes an issue that
existed with the previous xmms2_smart which seemed to be checking the string length of the song
title twice before outputing the url of the song. This seems like a typo and what this line
likely meant to do was check that both the song artist and song title were empty before
displaying the song url.

Patch contributed by Tamim Khan.

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2011-03-04 19:29:52 +01:00
Pavel Labath
82d563e18a gcc-4.5 compatibility fix (kinda)
(kinda = I don't know why it compiled in 4.4 in the first place)
2011-03-03 23:58:26 +01:00
Pavel Labath
3c7f2192b2 update callback objects can now signal termination with a write to a pipe as well 2011-02-27 22:43:40 +01:00
Pavel Labath
bcfc90accb C++ wrapper of pipe2(2) 2011-02-27 22:43:40 +01:00
Pavel Labath
536f719c65 exception class for c functions which set errno 2011-02-27 22:43:40 +01:00
Pavel Labath
9d6d26154a added a convenient c++ wrapper for strerror_r
as a bonus, it can be used to insulate us from the GNU vs. XSI strerror_r interface differences
2011-02-27 22:43:40 +01:00
Pavel Labath
b96f112106 Make $exec et al. use the new callback system
I removed the code for automatic killing of stuck children, because (by admission of the person
who wrote it) it wasn't working. I also removed the $pre_exec variable, because one can use lua
to generate the config on the startup, if one wants to.
2011-02-27 22:43:32 +01:00
Pavel Labath
7cf37f7de0 Make $rss use the new callback system 2011-02-16 00:33:22 +01:00
Nikolas Garofil
cb544bd1f7 Check that there is no writing outside the string 2011-02-13 00:10:20 +01:00
Nikolas Garofil
5aaac61f4e make cast unnecessary 2011-02-12 19:11:01 +01:00
Nikolas Garofil
678d79e6fe use sscanf() instead of hextobyte() 2011-02-12 18:01:41 +01:00
Nikolas Garofil
723255f142 Use inet_ntop(), thanks to pavelo for telling me about this 2011-02-12 17:18:33 +01:00
Nikolas Garofil
70b6f35a84 fix racecondition in eve, based on a patch from Vasiliy Kulikov, based on a patch from Brandon 2011-02-11 18:30:04 +01:00
Nikolas Garofil
18ce365d16 change reading args of $v6addrs and add docs 2011-02-11 15:43:01 +01:00
Nikolas Garofil
2754fab78d Support for scope in $v6addrs 2011-02-11 13:05:00 +01:00
Nikolas Garofil
997dcc87d9 fix build without ipv6 support 2011-02-11 00:27:12 +01:00
Nikolas Garofil
b548f476cc Support for -n in $v6addrs 2011-02-10 23:27:14 +01:00
Nikolas Garofil
ac4a3682ae Fix security bug in 's getSkillname 2011-02-10 16:20:06 +01:00
Nikolas Garofil
5a5e8f80b1 Support for short-version ipv6-addresses 2011-02-10 16:01:16 +01:00
Nikolas Garofil
2aafb591ee Add fscanf_no_i18n() to fix sf.net #3154556 2011-02-10 01:08:34 +01:00
Nikolas Garofil
6287b22a3d Add $v6addrs to increase IPv6 support
This is only the beginning of the ipv6 support,
This var isn't documented and only works on Linux.
It should also be patched to show the addresses in compressed format
Some other vars should also be added to see things like netmask, scope, routes, ...
2011-02-09 18:49:52 +01:00
Pavel Labath
fb81e3a9b3 Make $weather use the new callback system 2011-01-06 16:26:53 +01:00
Pavel Labath
10d7605a51 use get_result_copy() instead of get_result()
i don't seem to follow my own advice :/
2011-01-06 15:32:10 +01:00
Pavel Labath
b0deb283ec make $curl use the new callback system instead of timed_thread
ps: this breaks $rss and $weather, they need to be ported as well
2011-01-06 15:29:51 +01:00
Pavel Labath
41dc5db094 Initialize special_t when allocating it (this should fix sf.net #3138243) 2011-01-05 13:54:04 +01:00
Pavel Labath
87591f502e add a $memdirty variable
patch contributed by Piotr Karbowski (sf.net #3138195)
2011-01-04 14:48:33 +01:00
Pavel Labath
5237fe9d23 Revert "$mixer: report more reasonable values for mono devices"
the user reports this didn't fix the problem (see sf.net #3131452)

This reverts commit 540f78f0bd.
2011-01-02 14:24:10 +01:00
Pavel Labath
f0d48190ff $mixer: report more reasonable values for mono devices 2011-01-01 11:37:31 +01:00
Pavel Labath
9d0932d711 Use the new callback system instead of add_update_callback() & co. 2010-12-31 13:39:54 +01:00
Tiago Vale
c5d065d119 Added support for POWER_SUPPLY_POWER_NOW In Linux, apparently POWER_SUPPLY_CURRENT_NOW was deprecated and replaced by POWER_SUPPLY_POWER_NOW. In my system, ever since kernel 2.6.36.1 battery lifetime showed "unknown" in conky. Check http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532000.
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-12-30 14:42:16 +01:00
Pavel Labath
c5fe259ae0 a new update callback system
it should replace both timed_thread and run_update_callback() systems
it features:
- automatic removal of callbacks which are not used
- ability to run callback less frequent than the update_interval
- avoidance of running the same callback multiple times
2010-12-24 15:09:40 +01:00
Pavel Labath
29ef75083a Fix 'comparison between signed and unsigned expressions' warning 2010-12-23 18:25:31 +01:00
Pavel Labath
44a30fac3d kvm_proc needs synchronized access
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>

Conflicts:

	src/conky.c
	src/freebsd.cc
	src/freebsd.h
2010-12-09 19:22:34 +01:00
Nikos Ntarmos
3b5d5f33b3 Build fixes for bmpx
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2010-12-09 18:46:51 +01:00
Pavel Labath
f1bc24f199 fclose(3) instead of pclose(3) as the latter seems to leak file descriptors
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>

Conflicts:

	src/exec.c - had to merge manually
2010-12-05 21:16:01 +01:00
Pavel Labath
43d81169f6 Use initializer list for member initialization 2010-11-26 18:03:41 +01:00
Nikolas Garofil
99c359b212 Fix displaying UTF-8 without XFT 2010-11-26 17:59:07 +01:00
Nikolas Garofil
f6a4588b3c Include default values set by cmake in print_version(), Don't set HTTPPORT when BUILD_HTTP is unset 2010-11-24 18:17:53 +01:00
Nikolas Garofil
d48e83e0d4 Bugfix: Shades weren't placed correct after a $goto 2010-11-24 16:47:29 +01:00
Nikolas Garofil
b43e130180 small rewrite print_version() 2010-11-24 00:46:29 +01:00
Pavel Labath
981ed0b609 fix own_window_colour setting name 2010-11-23 23:18:50 +01:00
Nikolas Garofil
7b128a9f16 Merge branch 'lua-config' 2010-11-23 18:56:58 +01:00
Nikolas Garofil
c93f9817cb Merge branch 'master' into lua-config 2010-11-23 18:50:48 +01:00
Nikolas Garofil
687407479f Make sure template_ in calc_cpu_total() can also be TMPL_LONGPROC 2010-11-23 18:50:40 +01:00
Pavel Labath
5aa59f55fa Make xmms2 work again (not tested yet) 2010-11-23 18:42:48 +01:00
Nikolas Garofil
1b791ed1c8 Merge branch 'master' into lua-config 2010-11-23 17:42:00 +01:00
Nikolas Garofil
23a193fe89 Complete previous commit 2010-11-23 17:40:53 +01:00
Nikolas Garofil
c1933dc186 Make sure char-arrays filled with read() are null-terminated 2010-11-23 17:33:26 +01:00
Pavel Labath
cc98b26119 Fix small error in old config handling 2010-11-23 16:45:42 +01:00
Pavel Labath
4ab7f6d0d1 Replace the if(&l) unused hack with unused attribute 2010-11-23 16:43:14 +01:00
Nikolas Garofil
5781e4f1e7 Fix build with BUILD_X11 but without OWN_WINDOW 2010-11-23 13:58:53 +01:00
Nikolas Garofil
529392aef0 Fix building without BUILD_OLD_CONFIG 2010-11-22 23:45:38 +01:00
Nikolas Garofil
c119410c78 A bit i18n 2010-11-21 23:39:35 +01:00
Pavel Labath
5a7ec7fb0b Simplify exception handling and get rid of conky::critical_error
As i said in my rant somewhere, it's up to the person catching the exception to decide if the
error is critical or not. The person throwing the exception should specify the type of error and
that's where his job ends.
2010-11-21 22:44:04 +01:00
Pavel Labath
5c49c52a0b make convert.lua "bimodal"
it does The Right Thing(tm) both when called from conky and as standalone
2010-11-21 22:26:35 +01:00
Nikolas Garofil
b5216499c2 Don't quit when configfiles are deleted 2010-11-21 16:56:50 +01:00
Nikolas Garofil
5a85fc9053 Don't quit when configfiles are deleted 2010-11-21 16:46:58 +01:00
Nikolas Garofil
b0e1c3d8a5 Remove useless try-catch 2010-11-21 15:46:42 +01:00
Nikolas Garofil
bce7064cdb Bugfix: segfault at config reload 2010-11-21 14:32:59 +01:00
Nikolas Garofil
a87c3ee205 Shrink code 2010-11-21 00:23:27 +01:00
Nikolas Garofil
199f8876fb Fix leaks that happen when there is no config available (these are only tiny leaks because conky will shutdown anyway when there is no config available) 2010-11-21 00:05:20 +01:00
Nikolas Garofil
cad18ce2e0 Fix leaks that happen when there is no config available (these are only tiny leaks because conky will shutdown anyway when there is no config available) 2010-11-20 23:35:02 +01:00
Nikolas Garofil
c63f42a693 fix manual merge 2010-11-20 17:25:06 +01:00
Nikolas Garofil
fcf318c6dd Fix bug with SF ID 3101185 (manual merge) 2010-11-20 17:18:34 +01:00
Nikolas Garofil
0ee557a4ee Fix bug with SF ID 3101185 2010-11-20 16:59:32 +01:00
Nikolas Garofil
559d4ebb53 clean up code a bit 2010-11-19 15:52:21 +01:00
Nikolas Garofil
5d28bed7db Support for old config syntax (Optional) 2010-11-19 14:27:18 +01:00
Pavel Labath
3db3e6045f Fix segfault when out_to_x is set to false 2010-11-18 16:09:36 +01:00
Nikolas Garofil
e19f1c76a9 Some errormessages 2010-11-18 00:36:36 +01:00
Pavel Labath
b7a80fa449 Fix segfault when own_window is set to false 2010-11-17 14:43:49 +01:00
Pavel Labath
8d37f8b498 Woops.. forgot to actually declare the nvidia_display setting 2010-11-17 14:36:48 +01:00
Pavel Labath
ad79c87376 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
2010-11-16 22:55:33 +01:00
Nikolas Garofil
8123e447e2 Replace a CRIT_ERR in combine by trying,throwing and catching
PS: I want to replace all similar CRIT_ERR's like this, opinions ?
2010-11-16 13:41:44 +01:00
Nikolas Garofil
fd9dd921a4 Extra constructor for own msg 2010-11-15 17:59:53 +01:00