conky.config = {
--#####################
-- - Conky settings - #
--#####################
	update_interval = 1,
	total_run_times = 0,
	net_avg_samples = 1,
	cpu_avg_samples = 1,

	imlib_cache_size = 0,
	double_buffer = true,
	no_buffers = true,

--####################
-- - Text settings - #
--####################
	use_xft = true,
--  font = 'Dinreg:size=100',
    font = 'Roboto-Light:size=100',
	override_utf8_locale = true,
	text_buffer_size = 2048,
	xftalpha = 0.9,

--############################
-- - Window specifications - #
--############################
	own_window_class = 'Conky',
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = true,

	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
--own_window_argb_visual yes
--own_window_argb_value 100

	alignment = 'top_right',
	gap_x = 40,
	gap_y = 40,
	minimum_width = 220, minimum_height = 220,
	
--########################
-- - Templates - 		#
--########################

template1 = '${color4}${font RobotoMono-Light:bold:pixelsize=12}${offset 8}',
template2 = '${offset 4} ${color3}bat${offset 6}',

--########################
-- - Graphics settings - #
--########################
	draw_shades = false,

	default_color = '#d81d63',
	default_shade_color = '1d1d1d',
	color0 = '90ac11',
	color1 = '0f0c03',
	color2 = '0f225d',
	color3 = '1c1911',
	color4 = '782f9f',

--lua_load ~/.conky/conkybg.lua
--lua_draw_hook_pre conky_draw_bg

	own_window_argb_value = 0,
	own_window_argb_visual = true,
	own_window_colour = '000000',
	lua_load = 'lua/conky.lua',

};

-- fluxbox adjustment
-- if os.getenv("XDG_SESSION_DESKTOP") == 'fluxbox' then
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 = [[
${if_match "${lua time A}" == "${time %A}"}${lua set_time A}\
${else}${lua set_time a}${endif}\
${if_match "${lua time B}" == "${time %B}"}${lua set_time B}\
${else}${lua set_time b}${endif}\
${voffset -176}
${lua hours}
${color2}${offset 40}${voffset -100}${time %M}
${voffset -140}${offset 10}\
${if_match "${lua cjk}" == "false"}\
${font Roboto-Light:bold:size=12}\
${else}\
${font wqy-microhei:bold:size=12}\
${endif}\
${color2}${lua date}
${offset 150}${voffset -175}\
${if_match "${lua cjk}" == "false"}\
${font Roboto-Light:size=12}\
${else}\
${font wqy-microhei:size=12}\
${endif}\
${color2}${lua AM_PM}
#system
${offset 0}${voffset 160}\
${font Roboto-Light:bold:pixelsize=14}${offset 12}${color3}hdd \
${offset 2}${color4}\
${font RobotoMono-Light:bold:pixelsize=12}${fs_used_perc /}%\
${font Roboto-Light:bold:pixelsize=14}\
${offset 4}${color3} mem \
${offset 2}${color4}\
${font RobotoMono-Light:bold:pixelsize=12}${lua memperc}%\
${font Roboto-Light:bold:pixelsize=14}\
${offset 4} ${color3}cpu\
${offset 2}${color4}${font RobotoMono-Light:bold:pixelsize=12}\
${lua cpu}%
#battery
${offset 0}${voffset -8}\
${if_existing /sys/class/power_supply/BAT0/present/ 1}${template1}
${template2}${battery_bar 8,80 BAT0} ${battery_percent BAT0}% ${endif}\
${if_existing /sys/class/power_supply/BAT0}${template1}
${template2}${battery_bar 8,80 BAT0} ${battery_percent BAT0}% ${endif}\
${if_existing /sys/class/power_supply/BAT1}${template1}
${template2}${battery_bar 8,80 BAT1} ${battery_percent BAT1}% ${endif}
${voffset -190}
]];
