Hello all,
This is very much a noob question.
I am working on a toy text-only system monitor, for piping to
xsetroot, etc.; I wanted something like a minimal conky with all
of the parser stuff replaced by a straightforward config.h file.
Since all of the output is created by a single (at the moment)
printf call, is there an intelligent way to allow this command to be
customized within a config.h? Given a choice of monitor variables
(say, battery, load, fs_usage), the user should be able to choose
a format string without editing the main source file (the current,
dumb method).
Both the format string and the argument list would need to be
configured, that is:
Default example:
printf("%s | %s | %s | %s", load, fs_usage, batt, time);
Customized version:
printf("%s | %s | %s", fs_usage, load, batt);
Thanks for any input,
--
Wolfgang Corcoran-Mathe
Received on Sun Nov 09 2014 - 22:30:38 CET