* 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.
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>
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.
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>
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.
* 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.
* 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`
* 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
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).
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.
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
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