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

335 Commits

Author SHA1 Message Date
roy-mustang
3b4b9abd97 Implemented goto action for ncurses mode (#299) 2016-07-20 09:53:48 -07:00
Ovnuniarchos
e2bd14e7b7 Use coordinate offsets to draw shades/outlines. Corrects behavior when GOTO-ing. (#287) 2016-07-14 09:45:06 -07:00
Stephane Fontaine
587631a15b Add native support for pulseaudio. (#283)
* Add native support for pulseaudio.

This adds ability to get Pulseaudio current volume without calling an
external program. Also it provides a few other parameters like card's
current profile similarly to pavucontrol. Currently it only queries the
default sink (and associated card).

* Switch to pulse async API.

This us by far the most efficient as conky subscribe to a few pulseaudio
notifications. Whenever pulseaudio server changes (volume or default
sink or default card), conky's callback updates the results.
2016-06-24 07:17:20 -07:00
Maximilian K
5d50e9be67 don't get stat on path after it was removed from config file (#250) 2016-05-06 07:24:52 -04:00
Nelis Oostens
2a9e21e23b Added BUILD_XINERAMA to print_version (#252)
Added BUILD_XINERAMA to the print_version output.
2016-05-06 07:24:41 -04:00
luebking
06f87b9c26 Update immediately when the root pixmap changes (#230)
* use CLOCK_MONOTONIC if supported

get_time is used to control the update interval etc. so there's
no need to query the system time

* repaint immediately when the root pixmap changed

Original patch by pweisenburger,
In addition resets the next_update_time to ensure "now"

FIXES: #48
2016-04-13 10:33:33 -07:00
Guillaume Maudoux
7d7e9b6fd8 Fix race conditions in signal handling (#233)
SIGHUP, SIGUSR1, SIGKINT and SIGTERM are no longer lost to race
    conditions. In particular, a SIGHUP can no more cancel a SIGTERM.
2016-04-13 10:33:04 -07:00
Alexander Graf
505c4286b4 keep next_update_time modulo update_interval zero
This patch modifies logic for setting next_update_time such that the
update is done at full update_interval seconds. That is, for example
with update_interval 60.0, update is done at 00:00:00, 00:01:00,
00:02:00, etc.

This might be useful for using conky as a clock widget which only needs
to be updated once per minute, but is obliged to update exactly at
minute change.

It is implemented in a way that is (hopefully) immune to clockchanges
(as for example by NTP or DST).
2016-02-08 22:41:30 +01:00
Marc Payne
57d9fdd0e0 Comment some of the callback-related code
Some of the code dealing with callbacks and updates was a little
obscure. A few extra comments should help clarify the meaning.
2016-01-09 10:23:36 -07:00
Brenden Matthews
2fab2d3820 Merge pull request #185 from mxmlnkn/issue-128
Fix BUILD_MATH flag not working, partial #128
2015-12-11 12:56:58 -08:00
mxmlnkn
e7cdccd964 Border cases of scale < 1 would lead to negative lengths, crashing conky
e.g. in the beginning the scale is always 0, leading to NaN and a crash
fixes the "show_graph_scale" not working bug, not yet reported (even though I actually noticed that before, didn't seem to bother me)
also cpugauge works again because fo this BUILD_MATH MATH problem
2015-12-11 11:10:23 +01:00
mxmlnkn
a85ffd5d0d logscale not working was caused by using MATH instead of BUILD_MATH 2015-12-11 01:39:59 +01:00
mxmlnkn
d8f75860b2 Fix for initial spike on program start plus documentation as much as needed to implement that fix
Also some end of line white spaces were automatically removed by SciTE.
2015-12-10 21:46:44 +01:00
Nelis Oostens
8bf8859c73 Added missing build flags to the print_version function
Added:
BUILD_ICAL
BUILD_ICONV
BUILD_MYSQL
BUILD_LUA_RSVG
BUILD_XSHAPE
2015-07-24 16:42:47 +00:00
Łukasz Stelmach
00481ee9a9 Read configuration from ~/.config/conky/conky.conf
Try to load configuration from ~/.config/conky/conky.conf before
falling back to ~/.conkyrc and /etc/conky/conky.conf.
2014-11-17 22:06:27 +01:00
Andrew Deason
f670e70d7c Set uninitialized inotify_fd to -1, not 0
Currently we set inotify_fd to the value 0 when inotify_fd hasn't been
created yet, or after we close it. But 0 is a valid fd, and we check
for the value -1 to see if it's been initialized. So, if inotify
support is compiled in, but we disable_auto_reload, we can end up
closing fd 0. This can screw up various other things in weird ways,
including that exec'd processes appear to have an invalid stdin.

So, set inotify_fd to -1 to clear all of this up.
2013-08-18 13:50:17 -05:00
Brenden Matthews
318324fc63 Remove unused variable. 2013-01-29 10:59:23 -08:00
Maxime Villard
622bf0cd7e Assorted fixes found by valgrind
== common.cc ==
'result' can be uninitialized.

== conky.cc ==
strcpy()'s overlap: undefined behaviour. memmove()'s one is
defined.

== eve.cc ==
Some simplifications, and there are two leaks:
1. 'mySkill' could be leaked. So, let's make 'skill' point to it instead
   of strdup()'ing the buffer.
2. 'output' could be leaked at l.390.

== freebsd.cc ==
Leak of 'freq_sysctl'.

== net_stat.cc ==
free() already null-checks, so we don't need to do it again.

== proc.cc ==
Leak.

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2012-12-26 23:22:34 +01:00
Pavel Labath
6f62e113f1 Do not truncate non-human-readable numbers to 32bit (sf.net #3564560)
patch by hdastwb
2012-09-04 12:58:54 +02:00
Nikolas Garofil
a0052f6b19 Fix building without X11
Fix by Scott Moreau
2012-08-26 13:53:25 +02:00
Nikolas Garofil
3cca68ed3e Fix -i, -u, -x and -y option 2012-07-17 00:05:54 +02:00
Magliano Andrea
98196d0e6b Preliminary import from 2.8.1 git release
* don't use kvm_* calls, just sysctl (so no suid perm necessary)

* sysctls calls in general aren't thread safe, collapse callbacks
  using same sysctls (specifically total/running procs and proc list
  ones).

  Some sysctls need two calls (first to get size of obj returned,
  second to get object self); if different threads use this schema
  on same sysctl, weird values are returned (first/second calls
  sequence should be serialized).

  In general it makes not much sense too having more threads that use
  the same sysctl; just get info once and populate all data.

* add DragonFly specific extended uname string ($version in conky.conf)
  with git version and signature

Todo:

- top process list logic is old style, use top.cc funcs.
- find a solution for cpu freq

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2012-06-28 18:56:01 +02:00
Pavel Labath
4c1ec83174 Fix "Using log-scaled graph with show_graph_scale causes segfault" (sf.net #3538674)
bug reported by Nikslay
2012-06-28 18:26:49 +02:00
Pavel Labath
6b0d6a9f32 Fix a segfault in graph drawing code (sf.net #3537523)
PS: boy, is that code messy or what

bug reported by b3niup
2012-06-26 22:43:12 +02:00
Pavel Labath
b5dc59e9b2 Fix building with BUILD_HTTP
bug reported by arclance
2012-06-04 23:29:27 +02:00
Pavel Labath
11e32706d4 Fix `using "draw_shades yes" lua script runs twice per update' (sf.net #3524540)
bugreported by arclance
2012-06-03 16:24:37 +02:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Jim Duchek
413ad89ecf Fixed version string
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2012-05-03 14:06:50 -07:00
Jim Duchek
13a324a462 Remove comment
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2012-05-03 14:06:50 -07:00
Jim Duchek
bf7248ecd6 Fixed GCC 4.7.0 issues, double buffering
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2012-05-03 14:06:50 -07:00
Nikolas Garofil
6cce8e8e11 fix wrong alignments when font changes (sf.net #3461442) 2012-01-12 20:55:11 +01:00
Pavel Labath
3ed782c75c A slightly better fix for the double-free problem
one of those frees is completely unnecessary
2011-11-01 19:10:37 +01:00
Pavel Labath
749328456b Avoid double free on tempgrad graphs
bug reported by billie.
2011-11-01 19:06:41 +01:00
Brenden Matthews
e9a5b23711 Fix another regression from c1277d650b. 2011-10-31 15:16:54 +01:00
Brenden Matthews
e08ccb7512 Fix for regression introduced by 951cb1ac7e. 2011-10-31 13:41:30 +01:00
Pavel Labath
951cb1ac7e Fix graph updating for large (>512pix) graphs (sf.net #3253656)
apparently, this was actually a feature as someone made it deliberately act that way. However, I
agree with the bug reporter that it is strange so I remove it.
2011-10-23 22:34:51 +02:00
Christian Brabandt
354e577b15 Cmus support added to conky 2011-10-13 09:41:53 +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
ec2398ff18 c++ify linux.cc:is_disk() 2011-10-02 14:43:44 +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
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
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
2754fab78d Support for scope in $v6addrs 2011-02-11 13:05:00 +01:00
Pavel Labath
fb81e3a9b3 Make $weather use the new callback system 2011-01-06 16:26:53 +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
9d0932d711 Use the new callback system instead of add_update_callback() & co. 2010-12-31 13:39:54 +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
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
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
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
Nikolas Garofil
e19f1c76a9 Some errormessages 2010-11-18 00:36:36 +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
c671226a83 print_version() usable without quiting and replace all exit()-s in conky.cc 2010-11-15 17:07:38 +01:00
Nikolas Garofil
90eda7edbf own_window and own_window_transparent should default to yes without option 2010-11-15 14:00:31 +01:00
Pavel Labath
97ac409903 Use real types instead of enums to distinguish exceptions 2010-11-15 00:24:49 +01:00
Nikolas Garofil
c2c06d0956 Fix memleak 2010-11-14 22:13:56 +01:00
Nikolas Garofil
5dd486d345 conky_error class replacing runtime_error 2010-11-14 18:19:46 +01:00
Nikolas Garofil
fbec1252a1 Merge branch 'master' into lua-config 2010-11-14 15:25:17 +01:00
Pavel Labath
17d4658242 Fix "Conky usually segfaults on config file changes" (sf.net #3100221)
Someone needs to learn the difference between passing by value and passing by reference.

Bug reported by Kevin Lyles.
2010-11-14 14:34:39 +01:00
Nikolas Garofil
b5ff3eb411 Make lua required by cmake 2010-11-14 01:41:07 +01:00
Nikolas Garofil
4ac40e6054 Fix compiling without builtin config 2010-11-14 01:25:11 +01:00
Nikolas Garofil
e73da6b72e Fix compiling without X11 support 2010-11-13 23:59:31 +01:00
Pavel Labath
c9df66f487 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
	src/logging.h
2010-11-13 20:17:46 +01:00
Pavel Labath
f33c65aed2 This was overkill 2010-11-13 20:11:29 +01:00
Pavel Labath
0852aa4fcd Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/ccurl_thread.cc
	src/conky.cc
	src/llua.cc
	src/logging.h
	src/nvidia.cc
2010-11-13 20:05:59 +01:00
Nikolas Garofil
9d7a914515 Make I18N optional 2010-11-13 19:45:04 +01:00
Pavel Labath
375e21af07 Fix a small leak + some cleanup 2010-11-13 19:40:43 +01:00
Pavel Labath
a1f4984a4e Make conky not crash on exit when using weather objects 2010-11-13 16:36:43 +01:00
Pavel Labath
9a08141389 Fix the "ISO C does not permit named variadic macros" in maintainer mode
and a few other that have cropped up in the process
2010-11-12 19:48:06 +01:00
Nikolas Garofil
47965eedbc Fix memleak in is_disk() 2010-11-11 00:31:06 +01:00
Nikolas Garofil
b902b70e96 i18n-ize conky.cc 2010-10-31 20:01:20 +01:00
Pavel Labath
c9334eb071 Make conky (more-or-less) functional again 2010-10-31 18:17:22 +01:00
Nikolas Garofil
b98ebc90ee Internationalization support
This patch adds i18n-support with gettext, all translatable strings in the
code should be placed inside _() to make sure users see them in their own
language (I only did this for print_version() for now)
2010-10-31 00:02:02 +02:00
Nikolas Garofil
11e5db2132 Fix memleak when there is no config available
The 'buf' string in current_config() got allocated but not deleted when
CRIT_ERR stops the program.
2010-10-24 17:57:58 +02:00
Kevin Lyles
56ddea77a8 Fixed foreground colors being semi-transparent
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-10-15 11:23:14 -07:00
Markus
c9cf08d9e9 Fix short_units for below kilo values.
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-10-05 11:31:31 -07:00
Pavel Labath
1c785f2ab9 Remove obsolete config-file stuff, move slowly toward making conky functional again 2010-09-15 23:37:13 +02:00
Pavel Labath
bad23c7b77 Remove the --for-scripts hack. Maybe add it later? 2010-09-12 16:43:43 +02:00
Pavel Labath
0fd23a6f7e Set CLOEXEC flag on the inotify file descriptor 2010-09-12 16:36:21 +02:00
Pavel Labath
eeb1a6a0d7 Properly load config file and print the default one
ps: the new implementation no longer requires fopencookie() and co.
2010-09-12 16:23:06 +02:00