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

3134 Commits

Author SHA1 Message Date
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
Marc Payne
a061bcff3e Minor code formatting and whitespace cleanup 2015-08-26 00:03:43 -06:00
Brenden Matthews
3414955ad6 Merge pull request #138 from paulegan/graph-in-shell
Be explicit about documentation encoding. Fixes #91.
2015-08-24 08:09:23 -07:00
Brenden Matthews
b3c95959bc Merge pull request #137 from marcpayne/lua53-compile-fix
Fix compile error with Lua 5.3
2015-08-24 08:09:00 -07:00
Brenden Matthews
edb164ddeb Merge pull request #135 from Nooby4Ever/VIM-typo
Fixed typo in the VIM syntax highlight
2015-08-24 08:08:24 -07:00
Brenden Matthews
6d3c227356 Merge pull request #134 from Nooby4Ever/curl-fix
Fixed Curl segmentation fault
2015-08-24 08:07:54 -07:00
Paul Egan
b502ab5f5b Be explicit about documentation encoding. Fixes #91. 2015-08-23 22:12:24 +01:00
Marc Payne
acd1c05d74 Fix compile error with Lua 5.3
lua_gettable returns an int instead of void in Lua 5.3, so provide a
backwards-compatible overload of safe_misc_trampoline to account for this.
Tested with Lua 5.2 and 5.3.

This change does not address other compilation issues related to Lua bindings
for cairo, imlib2, and rsvg.

Fixes #90 and part of #100.
2015-08-21 01:56:37 -06:00
Nelis Oostens
0ab7d5fa33 Fixed Curl header issue
Note: This may not be the correct solution, it depends on the author's intention. Maybe he wanted to keep the headers from the previous call (in other words if there are no new headers use the old ones) and didn't realize they weren't copied in the handle, in which case he'll have to save the headers instead of above.
2015-08-19 22:04:42 +02:00
Nelis Oostens
292c9919be Fixed typo in the VIM syntax highlight
As stated in: http://sourceforge.net/p/conky/bugs/440/
2015-08-14 15:19:12 +02:00
Brenden Matthews
71c8072192 Update README.md 2015-08-01 09:05:16 -07:00
Brenden Matthews
3dbec780bc Merge pull request #126 from Nooby4Ever/fix-issue-12
Added sanity check to avoid making 0x0 window (resulting in Segementation Fault)
2015-08-01 09:03:57 -07:00
Nelis Oostens
fc6888eee3 Added sanity check to avoid making 0x0 window 2015-07-31 08:22:20 +02:00
Brenden Matthews
89c7da5654 Merge pull request #122 from Nooby4Ever/master
Added missing build flags to the print_version function
2015-07-30 16:01:35 -07:00
Brenden Matthews
7044c5296d Merge pull request #120 from ncopa/master
Compatibility improvements
2015-07-30 16:00:51 -07:00
Brenden Matthews
98d3491ddb Merge pull request #119 from marcpayne/getglobal-fix
Ensure getglobal pushes only one value onto stack
2015-07-30 16:00:01 -07:00
Brenden Matthews
9f6d727831 Merge pull request #115 from marcpayne/top-name-verbose
Add top_name_verbose option
2015-07-30 15:59:16 -07:00
Brenden Matthews
bf4f560f5d Merge pull request #111 from rtoijala/patch-1
Call get_cpu_count() when needed
2015-07-30 15:58:12 -07:00
Brenden Matthews
2867799e39 Merge pull request #125 from Nooby4Ever/templateN-doc
Updated templateN documentation
2015-07-27 07:56:10 -07:00
Nelis Oostens
b5e4056b9d Updated templateN to new syntax
- Explicitly mentioned the use of [[ and ]]
2015-07-27 08:08:50 +00:00
Nelis Oostens
d07c9368cb Clarified templateN documentation
- Added arg start counter
2015-07-27 08:06:39 +00: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
Natanael Copa
0956b689ec Fix thread local on pre C++11 compilers 2015-07-23 16:36:00 +02:00
Natanael Copa
18877f3992 Change ipv6 check to warning instead of fatal error
The compile server might not have ipv6 but that does not prevent us from
building conky and run it on a machine which has ipv6.
2015-07-23 16:15:30 +02:00
Natanael Copa
476f84cf59 Use portable version of strerror_r
There are 2 variants of strerror_r, GNU extension and a POSIX variant.
Use the more portable POSIX variant.

Also fix a potensial stack-use-after-return bug, instead of relying on
undefined behavoir in GNU libc implementation. The strerror_r manpage
says:

> This may be either a pointer to a string that the function stores in
> buf, or a pointer to some (immutable) static string (in which case buf
> is unused).

So it does not guarantee that it returns a pointer to some (immutable)
static string. It might return a pointer to "buf", in which case we get
a stack-use-after-return bug.

We fix this by declaring a thread local static buffer which we always
return.
2015-07-23 16:07:34 +02:00