--[[
  conky_leds
  adpatation lua par Toulibre (merci@lui)
  source : https://arpinux.org/public/conky/leds.tgz
  mods : https://debian-facile.org/viewtopic.php?pid=346357#p346357
]]

conky.config = {
 alignment = 'top_right',
 border_inner_margin = 0,
 border_outer_margin = 0,
 border_width = 2,
 cpu_avg_samples = 2,
 default_color = '000000',
 double_buffer = true,
 draw_borders = true,
 font ='font Roboto Light:size=12',
 gap_x = 20,
 gap_y = 90,
 imlib_cache_size =0,
 maximum_width = 320,
 minimum_height = 125,
 minimum_width = 320,
 net_avg_samples = 2,
 no_buffers = true,
 override_utf8_locale = true,
 own_window_argb_visual = true,
 own_window_argb_value = 252,
 own_window_colour = '000000',
 own_window = true,
 own_window_type = 'desktop',
 own_window_transparent = true,
 own_window_hints = 'undecorated,below,sticky,skip_pager,skip_taskbar',
 text_buffer_size = 2048,
 total_run_times = 0,
 update_interval = 1.0,
 use_xft = true,
 xftalpha = 0.5,

 color1 = 'D7D7D7',      
 color2 = 'DB8100',        
 color3 = 'A3A3A3',      
 color4 = '26DB00',        
 color5 = 'DB0500',      
 color6 = '0068DB',      
 draw_shades = true,
 draw_outline = true,
 default_shade_color = '000000',

}


conky.text = [[
${voffset -6}
${if_match ${battery_percent BAT0} < 10}${color5}${else}${color3}${endif}${goto 30}${font fontawesome:pixelsize=16}${font}\
${goto 70}${if_match ${battery_percent BAT0} > 0}${color5}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 10}${color5}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 15}${color2}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 20}${color2}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 25}${color2}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 30}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 35}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 40}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 45}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 50}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 55}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 60}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 65}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 70}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 75}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 80}${color1}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 85}${color4}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 90}${color4}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} > 95}${color4}${else}${color}${endif}▪\
${if_match ${battery_percent BAT0} == 100}${color6}${else}${color}${endif}▪
${color3}${goto 30}${font fontawesome:pixelsize=16}${font}${goto 70}${if_match ${time %H%M} > 0}${color6}${else}${color}${endif}▪\
${if_match ${time %H%M} > 112}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 224}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 336}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 448}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 600}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 712}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 824}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 936}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1048}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1200}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1312}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1424}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1536}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1700}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1812}${color1}${else}${color}${endif}▪\
${if_match ${time %H%M} > 1924}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 2048}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 2200}${color4}${else}${color}${endif}▪\
${if_match ${time %H%M} > 2312}${color6}${else}${color}${endif}▪
${if_match ${fs_used_perc} > 95}${color5}${else}${color3}${endif}${goto 30}${font fontawesome:pixelsize=16}${font}${goto 70}${if_match ${fs_used_perc} > 0}${color6}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 10}${color4}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 15}${color4}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 20}${color4}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 25}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 30}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 35}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 40}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 45}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 50}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 55}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 60}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 65}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 70}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 75}${color1}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 80}${color2}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 85}${color2}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 90}${color2}${else}${color}${endif}▪\
${if_match ${fs_used_perc} > 95}${color5}${else}${color}${endif}▪\
${if_match ${fs_used_perc} == 100}${color5}${else}${color}${endif}▪
${color3}${goto 30}${font fontawesome:pixelsize=16}${font}${goto 70}${if_match ${memperc} > 0}${color6}${else}${color}${endif}▪\
${if_match ${memperc} > 10}${color4}${else}${color}${endif}▪\
${if_match ${memperc} > 15}${color4}${else}${color}${endif}▪\
${if_match ${memperc} > 20}${color4}${else}${color}${endif}▪\
${if_match ${memperc} > 25}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 30}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 35}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 40}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 45}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 50}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 55}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 60}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 65}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 70}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 75}${color1}${else}${color}${endif}▪\
${if_match ${memperc} > 80}${color2}${else}${color}${endif}▪\
${if_match ${memperc} > 85}${color2}${else}${color}${endif}▪\
${if_match ${memperc} > 90}${color2}${else}${color}${endif}▪\
${if_match ${memperc} > 95}${color5}${else}${color}${endif}▪\
${if_match ${memperc} == 100}${color5}${else}${color}${endif}▪
${color3}${goto 30}${font fontawesome:pixelsize=16}${font}${goto 70}${if_match ${cpu} > 0}${color6}${else}${color}${endif}▪\
${if_match ${cpu} > 10}${color4}${else}${color}${endif}▪\
${if_match ${cpu} > 15}${color4}${else}${color}${endif}▪\
${if_match ${cpu} > 20}${color4}${else}${color}${endif}▪\
${if_match ${cpu} > 25}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 30}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 35}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 40}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 45}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 50}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 55}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 60}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 65}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 70}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 75}${color1}${else}${color}${endif}▪\
${if_match ${cpu} > 80}${color2}${else}${color}${endif}▪\
${if_match ${cpu} > 85}${color2}${else}${color}${endif}▪\
${if_match ${cpu} > 90}${color2}${else}${color}${endif}▪\
${if_match ${cpu} > 95}${color5}${else}${color}${endif}▪\
${if_match ${cpu} == 100}${color5}${else}${color}${endif}▪

]]