Conky: grep -P "\[[]" command in "conky.text" pertubates the ${exec} and ${execi} syntax

Created on 20 Mar 2018  路  11Comments  路  Source: brndnmtthws/conky

Hi,

If I add this line in my conky.text section of my ~/.config/conky/conky.conf file :

${exec gpustat | grep '^\[[0-9]'}

I get this error :

conky: Syntax error (/home/mansfeld/.config/conky/conky.conf:99: nesting of [[...]] is deprecated near '[') while reading config file. 
conky: Assuming it's in old syntax and attempting conversion.
conky: [string "..."]:139: attempt to index local 'settings' (a nil value)

Can you help me ?

Most helpful comment

@sebma Thanks for the response. It's just matter of upgrading then. 1.10.7 segfaulted for me so I take it that Conky 2 had some rough kinks to work out. I added the missing build dependencies at your request. I'm going to close this now. Have a great day. :+1:

All 11 comments

Are you still having this issue? What is gpustat? EDIT: What's in your conky.conf?

@lasers gpustat is PYPI Python module : https://pypi.org/project/gpustat/

@sebma Thank you for that. So I tried gpustat and did not have this problem on conky 1.10.8 or conky 1.10.9_pre.

conky.config = {out_to_x=false,out_to_console=true}
conky.text = [[${exec ~/.local/bin/gpustat | grep '^\[[0-9]'}]]
[0] Quadro NVS 295   | 71'C,  ?? % |   197 /   255 MB | (Not Supported)
[0] Quadro NVS 295   | 71'C,  ?? % |   197 /   255 MB | (Not Supported)
[0] Quadro NVS 295   | 70'C,  ?? % |   197 /   255 MB | (Not Supported)

I take it you were on conky 1.10.7 or earlier. Do you have this issue now? Let me know. Thanks.

@lasers You are right, I was using the conky version packaged along with Ubuntu 17.10 (Artful) :

$ dpkg -l | grep conky
ii  conky-all                                 1.10.6-1.1                                                 amd64        highly configurable system monitor (all features enabled)

@lasers I have just build conky from your master branch. Can you please add libxml2-dev and libimlib2-dev to the list of Ubuntu/Debian requirements for conky v10+ ?

@sebma Thanks for the response. It's just matter of upgrading then. 1.10.7 segfaulted for me so I take it that Conky 2 had some rough kinks to work out. I added the missing build dependencies at your request. I'm going to close this now. Have a great day. :+1:

@lasers Thanks. Have a nice day also :-)

@lasers Where is the man page ?

http://manpages.ubuntu.com/manpages/bionic/en/man1/conky.1.html

Rather than a continuation, Conky 2 were revamped with new changes since 1.10 or so. 1.10.9_pre is a continuation of ironing out the kinks and bugs... and to catch up with new changes, new compiling stuffs, manual pages, and dealing with long overdue bugs.

With Conky 1.10 (or Conky 2), we have new syntax, more lua stuffs, etc. I don't know all the details/history with conky as I got involved literally few days ago to deal exclusively with the outstanding issues like this one. ;-)

Right now, the man page is outdated (#234) and we have compiling issues with MAINTAINER_MODE option due to gcc errors/warnings (#197). We'll get there soon or later. Use the link above for now. :-)

Alternatively, you can install conky from the repository and use its man page, but still uses newer conky.

@lasers Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Airblader picture Airblader  路  4Comments

mreinhardt picture mreinhardt  路  3Comments

oberon-manjaro picture oberon-manjaro  路  4Comments

bunder2015 picture bunder2015  路  4Comments

LeoIannacone picture LeoIannacone  路  3Comments