I was going through @MeisterP's https://github.com/brndnmtthws/conky/issues/388 when I noticed something. I was not able to specify optional args and @MeisterP had no problem doing that with app-admin/conky-1.10.8-r1 on gentoo version.
4b92556fca9cbede3cbac4112f0a24b554390099 is the first bad commit
4b92556fca9cbede3cbac4112f0a24b554390099 is the first bad commit
commit 4b92556fca9cbede3cbac4112f0a24b554390099
Author: Brenden Matthews <[email protected]>
Date: Sat May 12 19:26:31 2018 -0400
Build improvements: clang-tidy, sonar, Dockerfile. (#488)
You can use this config.
conky.config = {
own_window = true,
own_window_type = 'desktop',
text_buffer_size = 1000000,
}
conky.text = [[
--------------------------exec
${exec journalctl -n 5}
--------------------------sys
${journal 10 system}
--------------------------user
${journal 10 user}
]]
NOTE: ${exec journalctl -n 5} is broken somewhere between commits. ${journal 10 user} is broken somewhere between commits too. Window will resize if the line is too long on commit 4b92556f which is something @MeisterP might like, but may prefer the line to be wrapped instead. Thanks.
Under Manjaro the following flags is not found, thus compilation is skipped:
When I remove the ifdef it doesn't give me any error that SD_JOURNAL_CURRENT_USER isn't found and proceeds ahead. When I use any combination of
${journal 10 system}
${journal 10 user}
I get blank line, although according to https://manpages.debian.org/testing/libsystemd-dev/SD_JOURNAL_CURRENT_USER.3.en.html SD_JOURNAL_CURRENT_USER and SD_JOURNAL_SYSTEM are correct flags, on Manjaro they return nothing. Maybe when the journal.cc module was written they worked out, but today they do nothing.
When I checkout 4b92556, I get user and sys so the old code currently still work though? For unknown reasons, exec journal -n 5 printed nothing. I commented out your ifdef to bypass (on master) and got nothing too. Can you checkout that commit too?

It consist of several changes:
---
+++
void free_journal(struct text_object *obj) {
struct journal *j = (struct journal *)obj->data.opaque;
- obj->data.opaque = NULL;
+ obj->data.opaque = nullptr;
delete j;
}
@@ -113,7 +113,7 @@ static int print_field(sd_journal *jh, const char *field, char spacer,
void print_journal(struct text_object *obj, char *p, int p_max_size) {
size_t read = 0, length;
struct journal *j = (struct journal *)obj->data.opaque;
- sd_journal *jh = NULL;
+ sd_journal *jh = nullptr;
and doesn't include the journal.cc overflow checks committed here - https://github.com/brndnmtthws/conky/commit/4155ac253b77ff736a1fd32ef61dde15f636b16a and here https://github.com/brndnmtthws/conky/commit/fd4ab7fc074bd498cf3708cfbee60277808c20be
@SU8 WYD WITH THIS ISSUE?
There is nothing to be done at this stage.
${journal 10 system}
${journal 10 user}
I get blank line, although according to https://manpages.debian.org/testing/libsystemd-dev/SD_JOURNAL_CURRENT_USER.3.en.html SD_JOURNAL_CURRENT_USER and SD_JOURNAL_SYSTEM are correct flags, on Manjaro they return nothing. Maybe when the journal.cc module was written they worked out, but today they do nothing.
I'm wondering what the status of this bug is...
I compiled the latest version of conky (version 1.11.5_pre)
with the respective option (-DBUILD_JOURNAL=ON) but
${journal 10 user}
only results in the error
conky: invalid arg for journal, type must be 'system' or 'user'
Is there anything that can be done about this?
Most helpful comment
@SU8 WYD WITH THIS ISSUE?