Fandom

Conky Wiki

Conky 2 design

13pages on
this wiki
Add New Page
Talk0 Share

Conky Complete Redesign 2.0 (again) Edit



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 -> 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?

<conky>  
  	<config>  
  		<placement>top_left</placement>  
  		<width>500</width>  
  		<height>500</height>  
  	</config>  
  	<data>  
  		<!-- draw a vertical battery bar for device BAT0 -->  
  		<bar dir="v"><battery dev="BAT0" /></bar>  
  		<!-- "draw" with the text drawer using the same data source -->  
  		<text>Battery status:<tab /><battery dev="BAT0" type="percent" /> %</text>  
  		<text>Time left:<tab /><battery dev="BAT0" type="time" time_format="%H:%M:%S" /></text>  
  		<!-- same stuff but in more readable form  
  		<text>  
  			Battery status:  
  			<full_tab />  
  			<battery dev="BAT0" type="percent" /> %  
  		</text>  
  		<text>  
  			Time left:  
  			<full_tab />  
  			<battery dev="BAT0" type="time" time_format="%H:%M:%S" />  
 		</text>  
  		-->  
  		<text w="50%">foo</text>  
 		<text w="50%">bar</text>  
 		<text w="50%" align="right">asdf</text><br />  
 		<text>fdsa</text>   
 	</data>  
</conky>



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:

<conky>  
	<data>  
		<text><nodename /> - <sysname /> <kernel /> on <machine /></text>  
		<hr style="stippled" />  
		<text><span color="lightgrey">Uptime:</span> <uptime /> <span color="lightgrey">- Load:</span> <loadavg /></text>  
		<!-- force the cpu bar on the same "area" which is in this case the same line as there is no line break -->  
		<area>  
			<text><span color="lightgrey">CPU Usage:</span> <span color="#5000a0"> <cpu type="percent" /></text>  
				<bar dir="v"><cpu /></bar>  
			</area>  
			<graph color="000000" fade_to="5000a0"><cpu /></graph>  
			<area>  
				<text><span color="lightgrey">RAM Usage:</span> <mem />/</mem type="max" /> - <mem type="percent" />  
			<bar dir="v"><mem /></bar>  
		</area>  
	</data>  
</conky>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.