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

3249 Commits

Author SHA1 Message Date
Brenden Matthews
eef323eafd Merge pull request #48 from paulegan/graph-in-shell
Support for graph output on console/shell
2014-06-17 17:23:17 -07:00
Brenden Matthews
4ea42d3190 Update README.md 2014-06-17 17:22:30 -07:00
Brenden Matthews
ce605fc0b3 Update README.md 2014-06-17 17:21:56 -07:00
Nikolas Garofil
70f27ccfab Fix invalid read 2014-05-30 12:24:55 +02:00
Paul Egan
9809f7cd91 Support for graph output on console/shell 2014-05-05 21:07:55 +01:00
Brenden Matthews
3696f0ea51 Merge pull request #44 from ldx/allbattperct
Compute mean percentage for multiple batteries.
2014-03-09 13:58:10 -07:00
Vilmos Nebehaj
cda5afda69 Address PR comments.
In particular:
- Don't call get_battery_perct() recursively.
- Use define for length of string holding battery name.
- We can use strcpy() since bat is zero-terminated.
2014-03-09 21:32:15 +01:00
Vilmos Nebehaj
f39de709e3 Update docs for battery_bar and battery_percent. 2014-03-09 18:54:41 +01:00
Vilmos Nebehaj
3fb201bbc8 Use strncmp() when checking battery name. 2014-03-09 18:53:26 +01:00
Vilmos Nebehaj
ad92c60d6b Compute mean percentage for multiple batteries.
If a laptop has multiple batteries, compute the mean percentage if the
user asks for 'all' instead of a specific battery.
2014-03-09 14:03:36 +01:00
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