Conky 2 design

Conky Complete Redesign 2.0 (again)
Modular thinking. Consists of some basic component types:


 * core
 * drawing
 * data source

Stuff brainstormed:


 * C99 and stdint.h (hifi)
 * C++ (all others)
 * XML for configuration, libxml2
 * Lua for scripting
 * keep the core open for more than one scripting language like python, perl
 * client/server architecture for remote monitoring
 * combined graphs with multiple data sources
 * Drawing modules:
 * graphs
 * bars
 * images (why not?)
 * Using CMake instead of autotools?
 * Use OpenMP throughout for Xtreme performance

Core serves as a basic backend for drawing modules to really draw stuff on the screen (lines, graphics, text). Also can have stuff like network connections.

Drawing modules take in any compatible data source and draws on the screen. Like graphs, bars.

Data source modules only gather data. Wireless connectivity, network usage, battery status. Hopefully it will be easy to port most of these out of Conky legacy.

User can specify which drawing module he wants to use for which data source -&gt; flexibility.

Remote data sources? conky in server and client mode? (frequently requested feature)

So, in the config file you basically configure the drawing module to do stuff for you and just tell it what data source to use.

XML for configuration? libxml2 will parse for us nicely HTMLish alignment? &lt;conky&gt; &lt;config&gt; &lt;placement&gt;top_left&lt;/placement&gt; &lt;width&gt;500&lt;/width&gt; &lt;height&gt;500&lt;/height&gt; &lt;/config&gt; &lt;data&gt; &lt;!-- draw a vertical battery bar for device BAT0 --&gt; &lt;bar dir="v"&gt;&lt;battery dev="BAT0" /&gt;&lt;/bar&gt; &lt;!-- "draw" with the text drawer using the same data source --&gt; &lt;text&gt;Battery status:&lt;tab /&gt;&lt;battery dev="BAT0" type="percent" /&gt; %&lt;/text&gt; &lt;text&gt;Time left:&lt;tab /&gt;&lt;battery dev="BAT0" type="time" time_format="%H:%M:%S" /&gt;&lt;/text&gt; &lt;!-- same stuff but in more readable form &lt;text&gt; Battery status: &lt;full_tab /&gt; &lt;battery dev="BAT0" type="percent" /&gt; % &lt;/text&gt; &lt;text&gt; Time left: &lt;full_tab /&gt; &lt;battery dev="BAT0" type="time" time_format="%H:%M:%S" /&gt; &lt;/text&gt; --&gt; &lt;text w="50%"&gt;foo&lt;/text&gt; &lt;text w="50%"&gt;bar&lt;/text&gt; &lt;text w="50%" align="right"&gt;asdf&lt;/text&gt;&lt;br /&gt; &lt;text&gt;fdsa&lt;/text&gt; &lt;/data&gt; &lt;/conky&gt;

Would draw someting like this:

+---+ |===============================| +---+ Battery status:            100 % Time left:              02:59:04 foo             bar asdf fdsa

Part of brenden's conkyrc ported to conky2: &lt;conky&gt; &lt;data&gt; &lt;text&gt;&lt;nodename /&gt; - &lt;sysname /&gt; &lt;kernel /&gt; on &lt;machine /&gt;&lt;/text&gt; &lt;hr style="stippled" /&gt; &lt;text&gt;&lt;span color="lightgrey"&gt;Uptime:&lt;/span&gt; &lt;uptime /&gt; &lt;span color="lightgrey"&gt;- Load:&lt;/span&gt; &lt;loadavg /&gt;&lt;/text&gt; &lt;!-- force the cpu bar on the same "area" which is in this case the same line as there is no line break --&gt; &lt;area&gt; &lt;text&gt;&lt;span color="lightgrey"&gt;CPU Usage:&lt;/span&gt; &lt;span color="#5000a0"&gt; &lt;cpu type="percent" /&gt;&lt;/text&gt; &lt;bar dir="v"&gt;&lt;cpu /&gt;&lt;/bar&gt; &lt;/area&gt; &lt;graph color="000000" fade_to="5000a0"&gt;&lt;cpu /&gt;&lt;/graph&gt; &lt;area&gt; &lt;text&gt;&lt;span color="lightgrey"&gt;RAM Usage:&lt;/span&gt; &lt;mem /&gt;/&lt;/mem type="max" /&gt; - &lt;mem type="percent" /&gt; &lt;bar dir="v"&gt;&lt;mem /&gt;&lt;/bar&gt; &lt;/area&gt; &lt;/data&gt; &lt;/conky&gt;