brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.27k stars 620 forks source link

[Feature Request] Tag for bar|graph|gauge for use in execp #904

Closed Microcrap closed 1 year ago

Microcrap commented 5 years ago

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

lasers commented 5 years ago

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

lasers commented 5 years ago

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.

Microcrap commented 5 years ago

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

lasers commented 5 years ago

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.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 30 days with no activity.