1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00
Commit Graph

3147 Commits

Author SHA1 Message Date
dbriba
17a29def4b Update x11.cc (#304) 2016-09-08 08:24:54 -07:00
shizeeg
178015a949 Fix build without X11 (#317) 2016-09-08 08:24:29 -07:00
roy-mustang
3b4b9abd97 Implemented goto action for ncurses mode (#299) 2016-07-20 09:53:48 -07:00
Ben Kibbey
b14f459740 scroll: add 'wait' and 'interval' parameters. (#297) 2016-07-18 08:11:35 -07:00
Ovnuniarchos
e2bd14e7b7 Use coordinate offsets to draw shades/outlines. Corrects behavior when GOTO-ing. (#287) 2016-07-14 09:45:06 -07:00
Brenden Matthews
d621199883 Update README.md 2016-07-13 07:29:51 -07:00
Vincent Cheng
48ea5914e9 Fix build failures on Debian kfreebsd (#291) 2016-07-13 07:24:29 -07:00
Brenden Matthews
4055b347f9 Version bump to 1.10.4. 2016-06-25 09:40:05 -07:00
Brenden Matthews
6e06110065 Version bump to 1.10.3. 2016-06-25 09:36:51 -07:00
Matt Sturgeon
3753e2a95b Nvidia updates, docs and fixes (#278)
* nvidia: Update the docs and add more arguments

**Updated the docs in variables.xml to reflect the current nvidia object.**

Basically just copied the inline comments into the XML document

**Added the last of the compatible arguments**

The following arguments were added to `get_nvidia_barval`:

* memfree
* ambienttemp
* gpufreq
* memfreq
* mtrfreq
* imagequality

This should leave only incompatible arguments unsupported (e.g. min/max
values).

Decided to base percentages off of zero rather than the specified minimum
values.

Signed-off-by: Matt Sturgeon <matt@sturgeon.me.uk>

* nvidia: Better error/debug printing

* Merged `scan_nvidia_args` and `set_nvidia_type` into new
  `set_nvidia_query`
* Added a translation array for `nvidia`, `nvidiabar`, `nvidiagauge` and
  `nvidiagraph` commands (helps with error printing)
* Added some NORM_ERR prints to `get_nvidia_barval`, `get_nvidia_value` and
  `get_nvidia_string`
* Removed exess newlines in nvidia's core.cc error definitions

Signed-off-by: Matt Sturgeon <matt@sturgeon.me.uk>

* nvidia: Better sanity checks when running queries

Introduced a pair of functions that checks whether the target we are
querying exists and how many of the target there are.

If the target doesn't exist there probably isn't a nvidia card
installed, if the target count query fails then the propietary drivers
probably aren't installed.

Fixes #269

Signed-off-by: Matt Sturgeon <matt@sturgeon.me.uk>
2016-06-24 11:05:17 -07:00
Faylixe
0d496ad008 Update README.md (#267) 2016-06-24 07:20:39 -07:00
Charley Peng
ba0e5eae0a update link for configuration (#279) 2016-06-24 07:17:56 -07:00
Stephane Fontaine
c4f2e72baa Avoid port number double conversion to network byte order. (#281)
It is taken take of by `getaddrinfo`.
2016-06-24 07:17:43 -07:00
Stephane Fontaine
587631a15b Add native support for pulseaudio. (#283)
* Add native support for pulseaudio.

This adds ability to get Pulseaudio current volume without calling an
external program. Also it provides a few other parameters like card's
current profile similarly to pavucontrol. Currently it only queries the
default sink (and associated card).

* Switch to pulse async API.

This us by far the most efficient as conky subscribe to a few pulseaudio
notifications. Whenever pulseaudio server changes (volume or default
sink or default card), conky's callback updates the results.
2016-06-24 07:17:20 -07:00
Matt Sturgeon
4d205ab9a3
gedit: Make better use of gtksourceview syntax
Rewrite the gtksourceview highlighting file to make better use
of available syntax options. This allows us to separate various
contexts, and means we don't have to keep track of all conky
keywords.

Overview of changes:

* Use separate contexts for config block and "lit string".
  * (lit string is the lua lit string [[ .. ]], we assume that
    this is used to contain text sections or template blocks)
* Use "sub-string" highlighting to highlight parts of identifiers
  separately.
* Added conky.text comments (from '#' to EOL).
* Remove lists of keywords and instead rely on syntax implications.
  * Uses separate contexts for config 'key=val' and text '${var}'s.
* Match escape sequences more precisely.
  * Lua and conky escape sequences matched separately; lua in normal
    strings and conky in literal strings. See escapes note.
* Transition from camelCase to hyphen-separated names
* Reword README to reflect changes

Escapes note:

We also match conky template escape sequences when in lua literal
strings as it would be too messy to separate `conky.text` and
`templateN = ` literal strings.

We currently don't match time format escape sequences as this would
require knowing which text variable we are in. This is only possible
if we duplicate the `bracket-var` context (less painful than
duplicating the `lua-literal-string` context).

Signed-off-by: Matt Sturgeon <matt@sturgeon.me.uk>
2016-06-23 16:28:19 +01:00
Nooby4Ever
dbf85da063 gedit: Add highlighting for gedit
Added a gtksourceview syntax highlighting file for conky configs.
Everything is explained in the README.md
2016-06-23 15:27:04 +01:00
Nelis Oostens
7d6004f590 Corrected Rss documentation (#261)
The interval is not in minutes but seconds, it is also mendatory now.
2016-05-20 08:43:32 -07:00
Michal Rus
8696c504c6 Use text_buffer_size in print_evaluate for the buffer size (#260) 2016-05-20 08:43:17 -07:00
icanhasserver
e056dca8f1 Increase info.cpu_count for single-core systems (#257)
On single-core systems, sscanf() does't match, as the sysfs file contains the value 0 instead of i.e. 0-7 for multi-core systems.
2016-05-14 10:41:35 -07:00
Laurent Georget
dbf26f0a42 Fix the symbol stdscr not found compilation error (#254)
The compilation fails when the symbols of terminfo are not present in
the libncurses.so. This can happen when the terminfo library libtinfo.so
is compiled separately. Using pkg_config is the correct approach to
handle all cases.
2016-05-14 10:38:55 -07:00
Vincent Cheng
46318cf907 fix build failure when compiled with -DBUILD_NVIDIA=ON (#248) 2016-05-06 07:25:53 -04:00
Toke Høiland-Jørgensen
0db823e56c Add systemd journal support. (#214)
This adds support for reading log entries from the Systemd journal. A
new command, called simply 'journal', is added which takes a number of
lines as a parameter and optionally which journal (user or system) to
read from.

Obviously, libsystemd is required to build journal support. Tested on
Arch Linux (Systemd v229).

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2016-05-06 07:25:30 -04:00
Nelis Oostens
ebbf28c79b Update command options documentation (#247)
- Removed deprecated option (-s)
 - Added info (build flag)
 - Sorted alphabetically

This fixes issue #203
2016-05-06 07:25:06 -04:00
Maximilian K
5d50e9be67 don't get stat on path after it was removed from config file (#250) 2016-05-06 07:24:52 -04:00
Nelis Oostens
2a9e21e23b Added BUILD_XINERAMA to print_version (#252)
Added BUILD_XINERAMA to the print_version output.
2016-05-06 07:24:41 -04: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
marcpayne
8dda4c3995 Parse quoted execgraph cmd before parsing options (#232)
When parsing the argument string for graph objects, check if there is a
double-quoted command in the beginning of the string and extract it
before parsing any options. This prevents items in a command from being
improperly recognized as graph options. It should also eliminate the
need to place commands with spaces into a separate script.

Also, fall back on default_graph_{height,width} instead of using
hard-coded values so that the default values set in a user's config will
work.
2016-05-03 08:04:57 -04:00
Jérôme Poulin
48122dcf82 Make conky resolve symlinks before using them. (#238)
* Make dev_name resolve symlinks before resolving the name.

- When symlinks are not resolved first, you will get an error on startup when
  using path in /dev/disk/by-id, for example, in diskiograph_*.

* Improve diskio device name resolution by always resolving symlinks.

- Any device path will be resolved of any symlinks before getting the usual
  checks for labels et device name.

* Check if diskio device is really a block device, not only if it exists.

- Current check would succeed in case the device is a path, like when using
  label: with an empty argument.
2016-05-03 08:04:14 -04:00
Matt Sturgeon
d8c659e7de nvidiabar, etc (#215)
* First experiment with $nvidiabar

Added nvidiabar, nvidiagraph and nvidiagauge. Using a dummy value of 50% for now until it is integrated with the nvidia value query functions.

* Implement get_nvidia_barval()

`get_nvidia_barval()` no longer returns a dummy "50%" but instead an actual value for supported arguments:

`gpuutil`, `memutil`, `membwutil`, `videoutil`,`pcieutil`, `fanlevel` and `gputemp`
2016-05-03 08:03:45 -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
Guillaume Maudoux
7d7e9b6fd8 Fix race conditions in signal handling (#233)
SIGHUP, SIGUSR1, SIGKINT and SIGTERM are no longer lost to race
    conditions. In particular, a SIGHUP can no more cancel a SIGTERM.
2016-04-13 10:33:04 -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
Brenden Matthews
f95366b649 Merge pull request #209 from aandergr/master
keep next_update_time modulo update_interval zero
2016-03-21 10:55:32 -07:00
Brenden Matthews
448d13ff4d Merge pull request #219 from mxmlnkn/doubletotaltraffic
solve double counting at start issue
2016-03-21 09:14:14 -07:00
Brenden Matthews
49babf1181 Merge pull request #184 from marcpayne/lua-bindings
Require Lua 5.1 when building the Lua bindings
2016-03-21 09:12:35 -07:00
mxmlnkn
8ccadeb7bb solve double counting at start issue 2016-02-21 10:34:46 +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
Brenden Matthews
b38ab1117e Merge pull request #196 from marguerite/master
respect LIB_INSTALL_DIR
2016-01-10 14:06:20 -08:00
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