1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-30 05:59:07 +00:00
Commit Graph

51 Commits

Author SHA1 Message Date
Michal Rus
8696c504c6 Use text_buffer_size in print_evaluate for the buffer size (#260) 2016-05-20 08:43:17 -07:00
Santtu Lakkala
d8cbdffe95 Make evaluate useful (#226)
Make evaluate actually double-evaluate itself, allowing for constructs
such as: `${eval $${addr ${gw_iface}}}' to work.
2016-05-06 07:24:30 -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
Brenden Matthews
4cb9ab8ab7 Merge pull request #227 from alessandro-g89/master
Improve to_bytes to work with input values with a decimal point
2016-03-28 07:35:35 -07:00
Alessandro Grassi
67e814f182 Improve to_bytes to work with input values with a decimal point 2016-03-23 08:42:16 +01: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
Natanael Copa
98b063866f Remove use of sysctl.h
The sysctl.h is not specified in POSIX. This fixes building with musl
libc.
2015-07-23 16:06:42 +02: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
Nikolas Garofil
19b9441704 fix if_existing bugs
- it was returning reverse results when searching strings in file
- if didn't detect that files didn't exist when searching for strings
2012-07-20 13:44:53 +02:00
Magliano Andrea
78b1daf848 Update docs + minor changes
* document DragonFly specific $version variable
* add sample conky config file
* some dragonfly.cc code cleanup
2012-06-28 19:05:28 +02:00
Magliano Andrea
9268165d71 Usable state reached (use top.cc + minor changes)
* process* management left to top.cc
* compile with -Wall -Werror (lots of wasted time for stupid errors)
* unify find_process() and new_process(), as used always together

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
2012-06-28 19:04:31 +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
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Nikolas Garofil
7702c525a7 remove removed network devices (sf.net #3468653) 2012-01-08 15:45:08 +01: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
17cf8517c3 Merge remote branch 'origin/master' into lua-config 2011-03-26 21:09:00 +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
87591f502e add a $memdirty variable
patch contributed by Piotr Karbowski (sf.net #3138195)
2011-01-04 14:48:33 +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
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
Pavel Labath
ef2b39a97f Make text_buffer_size a lua setting 2010-08-29 23:50:32 +02:00
Pavel Labath
a9893684ac Make max_user_text a lua setting 2010-08-29 20:01:05 +02:00
Pavel Labath
976e0eddf5 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
2010-08-26 22:38:55 +02:00
Pavel Labath
df6db63972 c++-ify variable_substitute() 2010-08-26 20:04:46 +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
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
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
52ec22c30a Bugfix: segfault in 2010-04-22 13:52:55 +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
0ab2efc2b2 Add support for $no_update 2010-04-17 15:19:44 +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
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
48346c8325 make times_in_seconds a lua setting 2010-03-05 14:20:04 +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
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
Nikolas Garofil
c51972b5e2 Use free_and_zero in ccurl_common.cc where appropriate 2010-02-23 15:48:18 +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
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
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
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
Brenden Matthews
9b46a61ae6 Don't include non-existent files. 2010-01-06 11:33:42 -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