1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00
Commit Graph

3208 Commits

Author SHA1 Message Date
Brenden Matthews
fdb8523d26 Merge pull request #198 from marius/master
Use the canonical source for the number of CPUs.
2016-01-10 14:05:37 -08:00
Brenden Matthews
d2d72e2abd Merge pull request #192 from marcpayne/exec-cb-refactor
Refactor the exec callback system
2016-01-10 13:33:39 -08:00
Marius Nuennerich
98c4100b66 Use the canonical source for the number of CPUs.
Counting cpu\d lines from /proc/stat can give the wrong number if CPUs
are present but offline.
2016-01-10 16:13:50 +00: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
Marc Payne
adae1f6293 Refactor the exec callback system
The main purpose of this commit is to ensure that exec callbacks are
registered at startup (or config reload), so that they have a chance to
run on the first update interval. Much of the code in exec.cc got
consolidated, making it easier to follow. Several checks for NULL
pointers should eliminate some obscure segfaults I noticed, as well.

During the refactoring, I implemented height and width arguments for
execbar and execgauge. The functionality was already there, but wasn't
being used. All this is accompanied by updates to the man page and
plenty of code comments.
2016-01-09 10:19:48 -07:00
marguerite
7dff2e5577 do not override LIB_SUFFIX 2016-01-07 17:26:18 +08:00
marguerite
89f9a6bdf1 respect LIB_INSTALL_DIR 2016-01-07 14:42:14 +08:00
Marc Payne
0dbd27d2de Require Lua 5.1 when building the Lua bindings
The cairo/imlib2/rsvg bindings require tolua++ [1], which is currently only
compatible with Lua 5.1 or earlier. We need to force Conky to compile against
Lua 5.1 if the user chooses to build the bindings.

This commit adds a separate pkg_search_module command specifically for Lua 5.1,
along with a note in the documentation. The original pkg_search_module command
was updated to include (and prefer) Lua 5.3+. Also, I threw in two other minor
random fixes to the docs while I was at it.

[1] https://github.com/LuaDist/toluapp
2015-12-11 16:05:02 -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
Brenden Matthews
39e0c1db13 Merge pull request #181 from fonic/patch-1
Rewrite/enhancement of nvidia module
2015-12-11 12:55:17 -08:00
Brenden Matthews
c2b921170d Merge pull request #182 from mxmlnkn/issue-155
Issue #155: Fix for initial spike on program
2015-12-11 12:54:32 -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
fonic
22fe3b1ea4 Rewrite/enhancement of nvidia module
Rewritten nvidia module with new features (refer to Showcase comment). Still work in progress, but could already use some testing by others.
2015-12-09 18:38:20 +01:00
Brenden Matthews
3723edb4e9 Merge pull request #179 from marcpayne/vim-nano-syntax
Add top_name_verbose to nano and vim syntax files
2015-12-05 16:17:35 -08:00
Marc Payne
300560dbd4 Add top_name_verbose to nano and vim syntax files 2015-12-04 20:24:44 -07:00
Brenden Matthews
443ddf54a0 Merge pull request #178 from antonio-malcolm/master
Fix for compiling against toluapp
2015-12-04 10:30:24 -08:00
Brenden Matthews
c1dceef75a Merge pull request #173 from Francesco149/xinerama-support
Fix for Xinerama alignment bugs
2015-12-04 10:29:42 -08:00
Antonio Malcolm
2599288a97 Fix for compiling against toluapp 2015-12-03 20:50:33 -08:00
Brenden Matthews
1abd253470 Merge pull request #177 from cwebster2/master
Final fix for check_include_file
2015-12-01 15:53:39 -08:00
Casey Webster
ce08b9fe7b Final fix for check_include_file
Per disucssion with arclance in #166, the call to check_include_file has
been migrated back to check_include_files and the required define set in
CMAKE_REQUIRED_DEFINITIONS.  This properly removes the dependancy on
the check_include_file module.  Third time is a charm!
2015-12-01 16:53:38 -05:00
Franc[e]sco
162d9d13b7 added support for multiple xinerama heads (fixes issue #172) 2015-12-01 13:53:43 +01:00
Brenden Matthews
9f9a2f262f Merge pull request #176 from brndnmtthws/sudo-less-builds
Disable sudo on Travis builds.
2015-11-30 13:27:13 -08:00
Brenden Matthews
b82eaa2333 Disable sudo on Travis builds. 2015-11-30 13:24:59 -08:00
Brenden Matthews
6e48a22dde Prep for next release. 2015-11-18 07:51:15 -08:00
Brenden Matthews
15662beb39 Update README.md 2015-11-18 07:47:45 -08:00
Brenden Matthews
6f27ce475f Merge pull request #166 from cwebster2/master
Reverts a change from check_include_file to files
2015-11-18 07:21:08 -08:00
Brenden Matthews
ed584c47dc Merge pull request #161 from mlichvar/master
CMake fixes
2015-11-18 07:20:37 -08:00
Miroslav Lichvar
2231588b28 Use LIB_SUFFIX when installing libraries
This is needed on systems with /usr/lib64.
2015-11-18 09:08:06 +01:00
Casey Webster
2f362e44a5 Reverts a change from check_include_file to files
One of the check_include_file checks in ConkyPlatformChecks should
not have been changed to check_include_files because the latter
takes 2 arguments and this call gives 3 (and doens't work right
without the third).
2015-11-17 15:08:58 +00:00
Brenden Matthews
e4721997d7 Merge pull request #165 from cwebster2/master
Fixes typo in ConkyPlatformChecks
2015-11-16 10:21:27 -08:00
Brenden Matthews
ebaeaf3b89 Merge pull request #163 from bldewolf/mpd-threading
lock mpd result before modifying it
2015-11-16 10:12:41 -08:00
Casey Webster
3a574ba88b Fixes typo in ConkyPlatformChecks
Fixes #162 by changing CheckInlcudeFile to
CheckIncludeFiles so that CMake can correctly include
the module.  Change calls to check_include_file to
check_include_files.
2015-11-16 18:04:02 +00:00
Brian De Wolf
01301f31a3 lock mpd result before modifying it
Add a lock to the mpd work callback to prevent another thread from reading the
struct while we're writing to it.
2015-11-08 21:29:29 -08:00
Brenden Matthews
7ae6b00f30 Merge pull request #160 from bldewolf/cppcheck-fix
Expand several buffers identified by cppcheck
2015-11-07 09:32:07 -08:00
Brenden Matthews
279af501a5 Merge pull request #157 from travisred/master
fix typo in docs
2015-11-07 09:30:21 -08:00
Brenden Matthews
efa7a6f74d Merge pull request #154 from vvheritagevv/master
Changed apm_ descriptions. The FreeBSD specific ones work with OpenBS…
2015-11-07 09:30:09 -08:00
Brenden Matthews
966b744349 Merge pull request #141 from marcpayne/template-segfault
Avoid segfault if template arg number is zero
2015-11-07 09:28:52 -08:00
Brenden Matthews
dccbb13d9f Merge pull request #140 from marcpayne/basename
Support for basenames (executable names)
2015-11-07 09:28:23 -08:00
Brian De Wolf
1dd6a47c24 Expand several buffers identified by cppcheck
I ran cppcheck on a whim while trying to debug #103 and it found these possible
memory corruptions. They all seem to be buffers that were made one byte too
small (leaving out the byte for the C-string null terminator).
2015-11-01 19:37:24 -08:00
Travis Reddell
96e4313a47 fix typo in docs 2015-10-19 17:23:00 -07:00
Jeremy Gransden
2c035f3cb0 Changed apm_ descriptions. the FreeBSD specific ones work with OpenBSD as well 2015-10-15 10:04:45 -04:00
Marc Payne
c7108d8261 Avoid segfault if template arg number is zero
If the user enters \0 as a template argument, print a warning and exit
gracefully. Fixes an issue mentioned in #118.
2015-08-29 14:15:52 -06:00
Marc Payne
caefe535c7 Update documentation for if_running 2015-08-28 18:42:12 -06:00
Marc Payne
8f88961c74 Do not try to remove kdeinit: from process name
When we parse /proc/<pid>/* in order to populate the process struct, it isn't
necessary to try to remove any instance of "kdeinit: " anymore (IMO). Here is
why:

* If the user chooses to display full command lines (top_name_verbose = true),
  then we should show full command lines without stripping useful info.

* The new basename entry already has a stripped down command. For example, if
  the command line is "kdeinit4: kded4 [kdeinit]", then basename is "kded4".

* The code does not account for "kdeinit{4,5}: ", resulting in undesired
  behavior, e.g. "kdeinit4: kded4 [kdeinit]" becomes "kdeinit4:".

* The code does not account for NUL separated arguments.

* The code opens /proc/<pid>/cmdline a second time, so this commit is a minor
  optimization.

I think it is best to remove this code altogether. If anyone disagrees, please
comment or send me some hate mail with reasons why we should keep it. The commit
is easy enough to revert. :)
2015-08-26 18:25:39 -06:00
Marc Payne
03a5cc5047 Add basename support to top
The new top_name_verbose option works in most cases, but it will fail if the
executable name contains spaces. Trying to parse command lines from
/proc/<pid>/* turned out to be quite complex due to the many edge cases. My
solution, once again, is to fall back to 1.9.x behavior. If top_name_verbose is
true, use the full command line. Otherwise, use basename.

Fixes #131.
2015-08-26 11:59:26 -06:00
Marc Payne
99ffe6a0d6 Add basename support to if_running
Currently, in order to match a running process with ${if_running}, a user needs
to specify the full command line plus arguments in conky.conf. This commit keeps
that behavior and adds a fallback that is equivalent to the 1.9.x bevahior,
namely matching against the executable name contained in /proc/<pid>/stat.

This completes the fix for #121.
2015-08-26 11:57:38 -06:00
Marc Payne
d8ff24a6f0 Add support for basenames (short executable names)
Since we now store a full command line for each process, a few problems are
apparent. For example, the names displayed by ${top ...} are verbose. This has
been partially addressed by the top_name_verbose option, but it is broken
whenever an executable name contains spaces. Another example is ${if_running},
which only matches the input if it exactly matches the entire command line.

This commit adds a basename (i.e. executable filename) entry to the process
struct. The intention is to store the executable filename from /proc/<pid>/stat,
which was the old 1.9.x behavior. This way, we have the best of both worlds.
Those who like the full command line can have it, and those who prefer the old
way can be satisfied too.
2015-08-26 11:16:20 -06:00
Marc Payne
2a778374a5 Do not add trailing whitespace to proc cmdline
According to proc(5), /proc/<pid>/cmdline is supposed to have a NUL between each
argument, plus an additional NUL at the end. Instead of replacing each NUL with
a space, just replace the ones between arguments and ignore the rest.

Partial fix for #121.
2015-08-26 00:50:08 -06:00