conky.config = {
--#############################################
-- Settings
--#############################################
-- Use Xft?
	use_xft = true,
	font = 'Droid Sans:size=7',
	xftalpha = 0.8,
	text_buffer_size = 2048,

-- Update interval in seconds
	update_interval = 5,

-- This is the number of times Conky will update before quitting.
-- Set to zero to run forever.
	total_run_times = 0,

-- Create own window instead of using desktop (required in nautilus)
-- own_window = yes fixes cairo-compmgr issue...
	own_window = true,
	own_window_transparent = false,
--own_window_type normal
--own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,

-- Minimum size of text area
--minimum_size 230 0
--maximum_width 200
	maximum_width = 270,

-- Draw shades?
	draw_shades = false,
--default_shade_color black

-- Draw outlines?
	draw_outline = false,
--default_outline_color grey

-- Draw borders around text
	draw_borders = false,

-- Stippled borders?
	stippled_borders = 0,

-- border width
	border_width = 1,

	own_window_colour = '000000',

--###########Colors#########
	default_color = 'white',--use ${color} to revert to default
--time, date, mx version
	color1 = 'fdfdfd',
--sections and horizonal lines, item descriptions
	color2 = 'F19E12',
--readings
	color3 = '26C7D1',
--##########################


-- Text alignment, other possible values are commented
--alignment top_left
	alignment = 'top_right',
--alignment top_middle
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text
-- same thing as passing -x at command line
	gap_x = 35,
	gap_y = 35,

-- Subtract file system buffers from used memory?
	no_buffers = true,

-- set to yes if you want all text to be in uppercase
	uppercase = false,

-- number of cpu samples to average
-- set to 1 to disable averaging
	cpu_avg_samples = 2,

-- number of net samples to average
-- set to 1 to disable averaging
	net_avg_samples = 2,

-- Force UTF8? note that UTF8 support required XFT
	override_utf8_locale = true,

-- Add spaces to keep things from moving about? This only affects
--certain objects.
	use_spacer = 'none',

	own_window_type = 'normal',

--#############################################
--  Output
--#############################################
	own_window_argb_value = 0,
	own_window_argb_visual = true,
	minimum_width = 0, minimum_height = 0,

-- time template
    
    template0 = [[${if_match "pmfix${time %p}" == "pmfix"}${time \1}${else}${time %I:%M}${endif}]],

-- interface templates - to disable conky-manager2 changes  
   if_up_strictness = 'address',
   template4 = 'eth0',
   template5 = 'eth1',
   template6 = 'wlan0',
   template7 = 'wlan1',


};

-- fluxbox adjustment

return_code = os.execute('pidof -q fluxbox')
if _VERSION == 'Lua 5.1' and math.floor(return_code/256) == 0 or
   _VERSION ~= 'Lua 5.1' and return_code then
   conky.config.own_window_transparent = true
   conky.config.own_window_argb_visual = false
end

conky.text = [[
   ${alignc}${font Arial Black:size=28}${color1}${template0 %H:%M}${font}

   ${alignc}${time %A %d %B %Y}

${color2}SYSTEM ${hr 2}${color}

   ${image MXLogoStart.png -p 97,90 -s 50x50}
   
  

 ${alignc}${color1}${execi 3600 cat /etc/mx-version}

${voffset 2}${color3}   Kernel: ${alignr}${color}${kernel}

   ${color3}CPU: ${color}${cpu cpu0}% ${alignr}${color}${cpubar cpu0 8,60}

   ${color3}RAM: ${color}$memperc% ${alignr}${color}${membar 8,60}

   ${color3}SWAP: ${color}$swap/ $swapmax ${alignr}${color}${swapbar 8,60}

   ${color3}Uptime: ${alignr}${color}${uptime}

${color2}MEDIA ${hr 2}${color}

${if_existing conky-harddisks.sh}${execpi 10 sh conky-harddisks.sh}${endif}\
${if_up ${template4}}

${color2}ETHERNET (${addr ${template4}}) ${hr 2}${color}
   Down: ${downspeedf ${template4}}kB/s ${alignr}Up: ${upspeedf ${template4}}kB/s
   ${downspeedgraph ${template4} 30,120 000000 ffffff} ${alignr}${upspeedgraph ${template4} 30,120 000000 ffffff}${else}\
${if_up ${template5}}${color2}
ETHERNET (${addr ${template5}}) ${hr 2}${color}
   Down: ${downspeedf ${template5}}kB/s ${alignr}Up: ${upspeedf ${template5}}kB/s
   ${downspeedgraph ${template5} 30,120 000000 ffffff} ${alignr}${upspeedgraph ${template5} 30,120 000000 ffffff}${endif}${endif}\
${if_up ${template6}}${color2}
WIRELESS (${addr ${template6}}) [${wireless_link_qual_perc ${template6}}%] ${hr 2}${color}
   Down: ${downspeedf ${template6}}kB/s ${alignr}Up: ${upspeedf ${template6}}kB/s
   ${downspeedgraph ${template6} 30,120 000000 ffffff} $alignr${upspeedgraph ${template6} 30,120 000000 ffffff}${else}
${if_up ${template7}}${color2}
WIRELESS (${addr ${template7}}) [${wireless_link_qual_perc ${template7}}%] ${hr 2}${color}
   Down: ${downspeedf ${template7}}kB/s ${alignr}Up: ${upspeedf ${template7}}kB/s
   ${downspeedgraph ${template7} 30,120 000000 ffffff} $alignr${upspeedgraph ${template7} 30,120 000000 ffffff}${endif}${endif}

${color2}MONITOR ${hr 2}${color}

   NAME $alignr PID CPU
   ${color3}${top name 1} $alignr${color} ${top pid 1} ${top cpu 1}
   ${color3}${top name 2} $alignr${color} ${top pid 2} ${top cpu 2}
   ${color3}${top name 3} $alignr${color} ${top pid 3} ${top cpu 3}

]];
