1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-29 05:12:41 +00:00
Commit Graph

2989 Commits

Author SHA1 Message Date
Brenden Matthews
120d6e1f94 Merge pull request #33 from eskerda/eskerda-thinklight
add support for $ibm_thinklight
2013-12-17 12:27:52 -08:00
eskerda
68263d4556 add support for $ibm_thinklight
Some IBM/Lenovo models come with a light on the top edge of the
display to illuminate the keyboard. This either reports 'on', 'off'
or 'unknown'.
2013-12-06 16:44:37 +01:00
Brenden Matthews
b5e17a4c50 Merge pull request #30 from oliverseal/master
Added cairo blending modes to support libcairo-1.10.0
2013-11-10 20:02:11 -08:00
Oliver Wilkerson
935280e36c Added cairo blending modes to support libcairo-1.10.0 2013-10-31 18:12:57 -05:00
Brenden Matthews
e001eb6244 Fix whitespace. 2013-09-15 09:45:56 -07:00
Brenden Matthews
b5f8ea5069 Merge pull request #24 from ZDroid/patch-1
Github -> GitHub, conky -> Conky
2013-09-15 09:42:55 -07:00
Brenden Matthews
b37f0493be Merge pull request #22 from adeason/inotifyfd
Set uninitialized inotify_fd to -1, not 0
2013-09-15 09:42:32 -07:00
Zlatan Vasović
f3b58d7a89 Github -> GitHub, conky -> Conky 2013-09-13 22:49:55 +02: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
Pavel Labath
02dfacd694 Add support for lua 5.2
luamm is now able to be compiled with both lua 5.1 and 5.2 (assuming 5.2 has backward
compatibility features compiled in). It is my intention to always support at least two versions
of lua.
2013-07-13 23:55:28 +02:00
Pavel Labath
0f94f409a1 Fix an some strange code found by a clang warning 2013-07-13 19:42:20 +02:00
Pavel Labath
fc84f0f6a0 Fix compilation with clang 2013-07-13 19:42:04 +02:00
Pavel Labath
2b8d603a9f Remove the cmake test for gcc-4.4
It tests for gcc, and conky is perfectly capable of being compiled with e.g. clang.
2013-07-13 19:40:23 +02:00
Nikolas Garofil
9d36db7138 Fix warning about unused result in strerror_r() redefinition
On systems, the buildprocess will complain:
  [  7%] Building CXX object src/CMakeFiles/conky.dir/c++wrap.cc.o
  conky/src/c++wrap.cc: In function ‘std::string strerror_r(int)’:
  conky/src/c++wrap.cc:66:37: warning: ignoring return value of ‘char* strerror_r(int, char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]

According to "man 3 strerror_r" the buffer used as 2nd arg is not always used, this patch also fixes that problem.
2013-06-20 22:07:40 +02:00
Nikolas Garofil
36189de425 Fix warning about unused result of write() in priv::callback_base::stop()
On systems with a strict compiler, the buildprocess will complain:
  [ 70%] Building CXX object src/CMakeFiles/conky.dir/update-cb.cc.o
  conky/src/update-cb.cc: In member function ‘void conky::priv::callback_base::stop()’:
  conky/src/update-cb.cc:49:34: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result

This patch fixes this warning (and by doing this also checks if the write worked)
2013-06-20 19:43:46 +02:00
Brenden Matthews
c272852bcb Merge pull request #14 from jrk-/image_wrapper
Wrapper for drawing images with imlib2 and cairo
2013-06-08 09:52:51 -07:00
Jochen Keil
56b5a7eeca Wrapper for drawing images with imlib2 and cairo
One problem is, that tolua/lua does not handle plain data pointers
properly. Therefore something like

local surface = cairo_image_surface_create_for_data(
    imlib_image_get_data_for_reading_only(), ..

will fail using the lua bindings. Hence this wrapper, which adds
a function which be used to draw an imlib image to a cairo surface.

This also addresses another issue, drawing images with a transparent
background (e.g. gifs or pngs) to the cairo surface properly. Apparently
the image format of imlib is incompatible to cairos which uses
pre-multiplied data. This is also explained in the cairo documentation.
A fix for this issue is to blend the image with another alpha mask to
get the correct values. The code and explanation for this was taken from

  http://lists.cairographics.org/archives/cairo/2008-March/013492.html

Executive Summary: This wrapper function can load (transparent) images
(e.g. gif or png) from a file by using imlib and draw them on a cairo
surface.
2013-06-08 12:09:35 +02:00
Brenden Matthews
e9474c745b Merge pull request #13 from jrk-/rsvg
Lua bindings to librsvg
2013-05-23 17:20:32 -07:00
Brenden Matthews
7a1f20847f Merge pull request #11 from rephorm/patch-1
Fix unknown short battery status
2013-05-23 17:19:59 -07:00
Brenden Matthews
c5c0294785 Merge pull request #10 from troxor/fixmpdcrash
Quick fix for crashes when mpd stops
2013-05-23 17:19:30 -07:00
Jochen Keil
550d644e6c Add rsvg bindings to cmake build framework 2013-05-22 22:39:41 +02:00
Jochen Keil
bec61e922c Include header file for helper functions
Also add function declarations
2013-05-22 22:38:17 +02:00
Jochen Keil
dee71f4eb2 Functions for creating and accessing Dimension/Position structs 2013-05-22 22:37:05 +02:00
Jochen Keil
32c60685ba Wrapper functions for {creat,destroy}ing an rsvg handle
This wrapper functions should facilitate the handling of rsvg handles.
Especially unrefing with g_object_unref does not seem to work properly
using the lua bindings.
2013-05-22 22:35:39 +02:00
Jochen Keil
118332aa00 Inline typedefs 2013-05-22 22:31:57 +02:00
Jochen Keil
4920cb71be Remove unused GIO/GdkPixbuf interface
Conky Lua only uses cairo, so that's everything we need to keep.
Anything else is just a source for trouble.
2013-05-22 22:31:57 +02:00
Jochen Keil
04c7323cac Replace glib types with primitive types
This help tolua++ to recognize them as native types and not as
usertypes.
2013-05-22 22:31:57 +02:00
Jochen Keil
cf94f82c53 Initial groundwork for rsvg bindings
Add scratch files as a start: merge rsvg.h and rsvg-cairo.h.
Concatenate licenses of rsvg.h and rsvg-cairo.
Remove unnecessary defines, private structs, unused apis
(GIO/GdkPixbuf), etc.
Replace deprecated api functions with glib-object functions
Add headers for glib.h and librsvg/rsvg.h
2013-05-22 22:27:27 +02:00
Brian Mattern
b08410dab4 Fix unknown short battery status
Before, in the case of an unknown battery status (which often happens on my Sony VAIO laptop after waking from sleep), the buffer would be unterminated.

(Although, this memmove trick is a bit odd. It would probably be better to remove the memmove's and put a single buffer[1] = '\0'; at the end of the function).
2013-04-30 10:33:42 -07:00
troxor
38f05de4ca Quick fix for crashes when mpd stops 2013-04-27 23:29:20 -05:00
Brenden Matthews
f0d0a03b8e Merge pull request #7 from alcazoid/master
Fix short process names in top
2013-04-09 16:43:17 -07:00
alcazoid
749083a450 Fixed short process names in top
Conky takes process names from /proc/<pid>/stat and it's limited to 16
chars in kernel. That obviously makes top_name_width option to work only
for decreasing name length. To obtain longer names we parse
/proc/<pid>/cmdline.

Not every process has cmdline, so we take both process names and choose
one we want to use. Like this:

- Get process name from /proc/<pid>/stat

- Get process cmdline from /proc/<pid>/cmdline

- Transform cmdline to a bit simpler form(i.e. "/usr/bin/python
 /usr/bin/terminator" to "python /usr/bin/terminator"), keeping
the arguments(might be changed easily)

- Choose the one that is longer and use it
2013-04-09 16:58:15 +02:00
Brenden Matthews
e08669385c Merge pull request #6 from borgified/master
relative paths referring to portions of wiki dont work
2013-04-09 07:57:48 -07:00
Fwiffo
ad100c7bab changed to absolute url paths to fix broken links 2013-03-28 14:29:47 -07:00
Pavel Labath
459dd4109c Hopefully a lua build check which finally works on all distros 2013-02-23 09:51:49 +01:00
Brenden Matthews
318324fc63 Remove unused variable. 2013-01-29 10:59:23 -08:00
Daniel Pielmeier
96935e8221 Fix build checks for Lua >=5.1 and <5.2. 2013-01-29 10:57:40 -08:00
labath
2688875cbc Merge pull request #4 from jwm-art-net/master
fix for where simultaneous installs of lua 5.1 & 5.2 exist
2013-01-15 12:51:23 -08:00
James Morris
2a1afbbbba fix lua/cairo/imlib2 linkage issues 2013-01-15 00:02:25 +00:00
Pavel Labath
8c19f0f520 Minor fix in linux.cc 2013-01-13 13:33:32 +01:00
James Morris
710646c101 fix to force usage of lua 5.1 when both 5.1 and 5.2 installed 2013-01-12 20:26:39 +00:00
James Morris
d0318b94d6 .gitignore ignore cmake files + others 2013-01-12 18:20:59 +00:00
Brenden Matthews
ac644fe44e Merge pull request #2 from shuber2/fix-diskio-dmcrypt-bytecounting
diskio: Fix byte counting on dmcrypt block devices
2013-01-06 10:10:46 -08:00
Stefan Huber
0e1f4526b4 diskio: Fix byte counting on dmcrypt block devices
Byte counting failes if disk is a dmcrypt block device, i.e, if
major==DM_MAJOR. Fix this.
2013-01-05 19:58:25 +01:00
Brenden Matthews
68aab88a5d Remove deprecated autogen.sh. 2012-12-27 10:38:40 -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
Brenden Matthews
c08b8bbee7 Change README paths. 2012-12-26 12:49:31 -08:00
Brenden Matthews
a43822fde7 Update travis build file. 2012-12-26 12:45:43 -08:00
Brenden Matthews
080190eae3 Update travis build file. 2012-12-26 12:42:22 -08:00
Brenden Matthews
3f9036021d Update travis build file. 2012-12-26 12:39:28 -08:00