Conky: [Feature Request] Tag for bar|graph|gauge for use in execp

Created on 5 Nov 2019  ·  4Comments  ·  Source: brndnmtthws/conky

If I'm wrong, correct me, but :
For a remote server whose amount of RAM memory used is to be displayed in text AND with a bar: you must run a curl command for the text in execp AND a curl command in execbar.
It would be much more ecological and economical to be able to add something similar to echo "\${bar value=$usedRam max=$maxRam}"; directly in the exec command. With this method one curl is suffisant and don't need write anything in a tmp_file.

PS : thanks dev for conky, it's really better than android widget

enhancement

Most helpful comment

I explained that you should do this in Python or any other language instead of bunch of shell commands... to avoid several calls like... echo, tr, grep, sed, awk, head, cut, etc... and to replace your curl with https://curl.trillworks.com/.

I don't know what data you're working with. If that's json, then it would be more easier too.

I imagine you'd have to practice learning + converting. Python is a cool language to learn tho.

Otherwise, keep with it as-is. This is just my suggestion and is no way a correct answer.

All 4 comments

I'm almost certain we can achieve this with execp + custom script. Also, "much more ecological and economical".

See https://github.com/brndnmtthws/conky/issues/903.

I used {image there. You should be able to print execbar, execgraph, execgauge instead with correct values. Writing scripts is much easier than chaining shell commands.

You can print many lines as you want... all in one script too.

Sorry, i don't really understand ^^
I my case i download all remote infos with one curl and apply some grep for displaying (or not if null) the infos.
If you want see : https://gitlab.com/voxdemonix/conky/blob/master/conky_server_infos/remote_monitoring.bash

I explained that you should do this in Python or any other language instead of bunch of shell commands... to avoid several calls like... echo, tr, grep, sed, awk, head, cut, etc... and to replace your curl with https://curl.trillworks.com/.

I don't know what data you're working with. If that's json, then it would be more easier too.

I imagine you'd have to practice learning + converting. Python is a cool language to learn tho.

Otherwise, keep with it as-is. This is just my suggestion and is no way a correct answer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bunder2015 picture bunder2015  ·  4Comments

zero77 picture zero77  ·  3Comments

Dimerbone picture Dimerbone  ·  4Comments

nwwt picture nwwt  ·  5Comments

zero77 picture zero77  ·  3Comments