Conky thread, show your work!

how-to
conky

#157

You are not launching it correctly.
I assume that you put the config in /usr/share/conky/conky_time
The correct command to use it would be

conky -c /usr/share/conky/conky_time

If in doubt try the command from the terminal and see what error gets returned!


#158

Thanks, I got it working.
I’m loving this forum already, there’s always someone who’s willing and able to help.
Great work, keep it up!


#159

https://pastebin.com/n2hVZXvc


In order for the temperature of the hard disk to be indicated, the hddtemp package must be installed. Activate the activation with the following commands:

sudo systemctl start hddtemp

and

sudo systemctl enable hddtemp

#160

Neat, how’d you do the keyboard? It appears to be a bit big for my taste, but I love the idea since I use a Mac keyboard layout and it’s easy to forget the many obscure symbols (and madly enough, I want to add more using the numeric keypad).

Speaking of Conkys, are there any good horizontal ones out there? I like Harmattan, but I’d prefer a pretty info strip along the top of my screen, rather than a box sitting in a corner.


#161

I dowloaded the keyboard layout image and then added it to my wallpaper using GIMP. I edited it to blend with wallpaper.


#162

My new conky in the shape of a HUD (created for a 1600x900 screen):

The graphs and text boxes are created with 2 lua scripts and 1 lua to load them both and the conky is 1 file:

conky:

# -- Conky settings -- #

update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
if_up_strictness link

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable


# -- Text settings -- #

use_xft yes
xftfont Elianto:size=8
override_utf8_locale yes
text_buffer_size 2048
short_units yes

# -- Window specifications -- #

own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_argb_visual yes
own_window_argb_value 200
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_left
gap_x 25
gap_y 0
minimum_size 1550 850
maximum_width 1600

default_bar_size 60 8

# -- Graphics settings -- #

draw_shades no

default_color 31363b #Gray

# -- Color settings KDE Plasma Breeze-dark -- #

color0 2980b9 #Blue
color1 eff0f1 #White
color2 aaaaaa 
color3 white


# -- Lua Load -- #

lua_load ~/.conky/hud/scripts/loadall.lua
lua_draw_hook_pre main


TEXT
#--date/time
${color0}${voffset 25}${font Elianto:size=12}${alignc}${time %A, %d %B %Y}${font}
${voffset 10}${font Elianto:size=16}${alignc}${time %H:%M}${font}${color}
#--wifi down/up--#
${voffset 90}${if_up wlp5s0}
#--downspeed wifi textbox
${goto 205}DOWNSPEED: ${color0}${downspeed wlp5s0}/s${color}
${goto 205}TOTAL: ${color0}${totaldown wlp5s0}${color}
#--upspeed wifi textbox
${voffset -22}${goto 1218}UPSPEED: ${color0}${upspeed wlp5s0}/s${color}
${goto 1218}TOTAL: ${color0}${totalup wlp5s0}${color}
#--ethernet down/up--#
${else}${if_up enp4s0}
#--downspeed ethernet textbox
${goto 205}DOWNSPEED: ${color0}${downspeed enp4s0}/s${color}
${goto 205}TOTAL: ${color0}${totaldown enp4s0}${color}
#--upspeed wifi textbox
${voffset -22}${goto 1218}UPSPEED: ${color0}${upspeed enp4s0}/s${color}
${goto 1218}TOTAL: ${color0}${totalup enp4s0}${color}
${else}
${goto 205}NETWORK UNAVAILABLE${goto 1218}NETWORK UNAVAILABLE${voffset 22}${endif}${endif}
#--cpu/ram textbox--#
#--system
${voffset 177}${goto 12}KERNEL: ${goto 60}${color0}${kernel}${color}
${goto 12}OS: ${goto 60}${color0}ARCH LINUX X86_64${color}
${goto 12}UPTIME: ${goto 60}${color0}${uptime}${color}
#--cpu
${voffset 5}${goto 12}CPU1: ${color0}${goto 45}${freq_g 1}${goto 68}GHz  ${cpu cpu1}%${color}
${goto 12}CPU2: ${color0}${goto 45}${freq_g 2}${goto 68}GHz  ${cpu cpu2}%${color}
${goto 12}CPU3: ${color0}${goto 45}${freq_g 3}${goto 68}GHz  ${cpu cpu3}%${color}
${goto 12}CPU4: ${color0}${goto 45}${freq_g 4}${goto 68}GHz  ${cpu cpu4}%${color}
#--temp
${goto 12}TEMP CORE1: ${goto 100}${color0}${execi 10 sensors | grep 'Core 0' |cut -c 17-18}${goto 116}°C${color}
${goto 12}TEMP CORE2: ${goto 100}${color0}${execi 10 sensors | grep 'Core 1' |cut -c 17-18}${goto 116}°C${color}
${goto 12}TEMP IGPU: ${goto 100}${color0}${execi 10 sensors|grep temp1|cut -c 16-17}${goto 116}°C${color}
#--ram
${voffset 5}${goto 12}RAM: ${color0}${memperc}%${color}${goto 75}USED: ${goto 120}${color0}${mem}${color}
${goto 75}FREE: ${goto 120}${color0}${memeasyfree}${color}
#--Processes
${voffset 5}${goto 12}PROCESSES: ${goto 135}CPU:${goto 170}RAM:
${goto 12}${top name 1}${color0}${goto 125}${top cpu 1}${goto 160}${top mem 1}${color}
${goto 12}${top name 2}${color0}${goto 125}${top cpu 2}${goto 160}${top mem 2}${color}
${goto 12}${top name 3}${color0}${goto 125}${top cpu 3}${goto 160}${top mem 3}${color}
${goto 12}${top name 4}${color0}${goto 125}${top cpu 4}${goto 160}${top mem 4}${color}
${goto 12}${top name 5}${color0}${goto 125}${top cpu 5}${goto 160}${top mem 5}${color}
#--system/hdd/battery/network textbox--#
#--hdd--#
${voffset -213}${goto 1445}${font Elianto:size=10}HDD${font}
#--read/write
${voffset 2}${goto 1355}DISKIO: ${color0}SDA${color}${goto 1428}READ: ${goto 1473}${color0}${diskio_read /dev/sda}${color}
${goto 1428}WRITE: ${goto 1473}${color0}${diskio_write /dev/sda}${color}
#--root
${voffset 2}${goto 1355}ROOT: ${color0}${fs_used_perc /}%${color}${goto 1428}USED: ${goto 1473}${color0}${fs_used /}${color}
${goto 1428}FREE: ${goto 1473}${color0}${fs_free /}${color}
#--home
${voffset 2}${goto 1355}HOME: ${color0}${fs_used_perc /home}%${color}${goto 1428}USED: ${goto 1473}${color0}${fs_used /home}${color}
${goto 1428}FREE: ${goto 1473}${color0}${fs_free /home}${color}
#--battery--#
${voffset 5}${goto 1422}${font Elianto:size=10}BATTERY${font}
#--charge
${voffset 5}${goto 1355}${if_existing /sys/class/power_supply/BAT1}BATTERY: ${color0}${alignr 7}${battery BAT1}${color}${else}BATTERY: UNKNOWN STATUS${endif}
#--ac/dc
${goto 1355}${if_existing /sys/class/power_supply/ACAD}AC: ${color0}${alignr 7}${acpiacadapter ACAD}${color}${else}AC: UNKNOWN STATUS${endif}
#--Time left 
${goto 1355}${if_existing /sys/class/power_supply/BAT1}TIME LEFT: ${color0}${alignr 7}${battery_time BAT1}${color}${else}Time left: UNKNOWN STATUS${endif}
#--network--#
${voffset 5}${goto 1422}${font Elianto:size=10}NETWORK${font}
#--wlp5s0
${voffset 2}${if_up wlp5s0}${goto 1445}WIFI
${goto 1355}SIGNAL: ${color0}${wireless_link_qual_perc wlp5s0}%${color}
${goto 1355}LOCAL IP: ${alignr 7}${color0}${addr wlp5s0}${color}
${goto 1355}ESSID: ${alignr 7}${color0}${wireless_essid wlp5s0}${color}
${goto 1355}BITRATE: ${color0}${wireless_bitrate wlp5s0}${color}
#--enp4s0
${else}${if_up enp4s0}${goto 1427}ETHERNET
${goto 1355}LOCAL IP: ${alignr 7}${color0}${addr enp4s0}${color}
#--Network>Unavailable
${else}${goto 1355}NETWORK UNAVAILABLE${endif}${endif}

lua load file (loadall.lua):

package.path = "/home/lucien/.conky/hud/scripts/?.lua"
require 'graph'
require 'rings'

function conky_main()
     conky_main_graph()
     conky_main_rings()
end

lua rings file (rings.lua):

--[[ RINGS with SECTORS widget
	v1.1 by wlourf (07 Jan. 2011)
	this widget draws a ring with differents effects 
	http://u-scripts.blogspot.com/2010/08/rings-sectors-widgets.html
	
To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/rings.lua
	lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display,
			  for example for {$cpu cpu0}, just write name="cpu"
arg			- the argument of the above variable,
			  for example for {$cpu cpu0}, just write arg="cpu0"
		  	  arg can be a numerical value if name=""
max			- the maximum value the above variable can reach,
			  for example for {$cpu cpu0}, just write max=100
	
Optional parameters:
xc,yc		- coordinates of the center of the ring,
			  default = middle of the conky window
radius		- external radius of the ring, in pixels,
			  default = quarter of the width of the conky window
thickness	- thickness of the ring, in pixels, default = 10 pixels
start_angle	- starting angle of the ring, in degrees, value can be negative,
			  default = 0 degree
end_angle	- ending angle of the ring, in degrees,
			  value must be greater than start_angle, default = 360 degrees
sectors		- number of sectors in the ring, default = 10
gap_sectors - gap between two sectors, in pixels, default = 1 pixel
cap			- the way to close a sector, available values are
				"p" for parallel , default value 
				"r" for radial (follow the radius)
inverse_arc	- if set to true, arc will be anticlockwise, default=false
border_size	- size of the border, in pixels, default = 0 pixel i.e. no border
fill_sector	- if set to true, each sector will be completely filled,
			  default=false, this parameter is inoperate if sectors=1
background	- if set to false, background will not be drawn, default=true
foreground	- if set to false, foreground will not be drawn, default=true

Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table : 
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table : 
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table : 
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour1	- colour table for background,
			  default = {{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
fg_colour1	- colour table for foreground,
			  default = {{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
bd_colour1	- colour table for border,
			  default = {{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}			  

Seconds tables for radials gradients :
bg_colour2	- second colour table for background, default = no second colour
fg_colour2	- second colour table for foreground, default = no second colour
bd_colour2	- second colour table for border, default = no second colour

draw_me     - if set to false, text is not drawn (default = true or 1)
              it can be used with a conky string, if the string returns 1, the text is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",

v1.0 (08 Aug. 2010) original release
v1.1 (07 Jan. 2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
                    text is parsed inside the function, not in the array of settings

--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation version 3 (GPLv3)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		

]]


require 'cairo'

function conky_main_rings()
-- START PARAMETERS HERE
local rings_settings={
    --NETWORK
    {
    name="",--background ring signalstrenght
    arg="",
    max=100,
    xc=1289.5,
    yc=732.5,
    radius=42,
    thickness=14,
    sectors=1,
    border_size=1,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="wireless_link_qual_perc",--ring signalstrenght
    arg="wlp5s0",
    max=100,
    xc=1289.5,
    yc=732.5,
    radius=40,
    thickness=10,
    sectors=100,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    
    --RAM
    {
    name="",--background ring ram
    arg="",
    max=100,
    xc=160,
    yc=721.5,
    radius=42,
    thickness=14,
    sectors=1,
    border_size=1,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="memperc",--ring ram
    arg="memperc",
    max=100,
    xc=160,
    yc=721.5,
    radius=40,
    thickness=10,
    sectors=100,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    --CPU
    {
    name="",--textbox ring
    arg="",
    max=100,
    xc=91,
    yc=604,
    radius=93,
    thickness=50,
    sectors=1,
    border_size=1,
    start_angle=150,
    end_angle=90,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="",--background ring
    arg="",
    max=100,
    xc=160,
    yc=721.5,
    radius=93,
    thickness=50,
    sectors=1,
    border_size=1,
    start_angle=90,
    end_angle=330,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
	{
    name="cpu",--cpu1 ring
    arg="cpu1",
    max=100,
    xc=160,
    yc=721.5,
    radius=55,
    thickness=10,
    sectors=100,
    start_angle=90,
    end_angle=330,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="cpu",--cpu2 ring
    arg="cpu2",
    max=100,
    xc=160,
    yc=721.5,
    radius=67,
    thickness=10,
    sectors=100,
    start_angle=90,
    end_angle=330,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="cpu",--cpu3 ring
    arg="cpu3",
    max=100,
    xc=160,
    yc=721.5,
    radius=79,
    thickness=10,
    sectors=100,
    start_angle=90,
    end_angle=330,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="cpu",--cpu4 ring
    arg="cpu4",
    max=100,
    xc=160,
    yc=721.5,
    radius=91,
    thickness=10,
    sectors=100,
    start_angle=90,
    end_angle=330,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    
    --Temp
    {
    name="",--background ring igpu
    arg="",
    max=100,
    xc=315,
    yc=673,
    radius=107,
    thickness=14,
    sectors=1,
    border_size=1,
    start_angle=90,
    end_angle=-90,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="execi 10",--IGPU ring
    arg="sensors|grep temp1|cut -c 16-17",
    max=100,
    xc=315,--160
    yc=673,--721.5
    radius=105,
    thickness=10,
    sectors=100,
    start_angle=90,
    end_angle=-90,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x00FF00,1}},
	fg_colour2={{0,0xFF0000,1}},
    },
    {
    name="",--background ring cores
    arg="",
    max=100,
    xc=315,
    yc=673,
    radius=93,
    thickness=50,
    sectors=1,
    border_size=1,
    start_angle=90,
    end_angle=-90,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="execi 10",--CORE1 ring
    arg="sensors | grep 'Core 0' |cut -c 17-18",
    max=100,
    xc=315,--160
    yc=673,--721.5
    radius=67,
    thickness=22,
    sectors=100,
    start_angle=90,
    end_angle=-90,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x00FF00,1}},
	fg_colour2={{0,0xFF0000,1}},
    },
    {
    name="execi 10",--CORE2 ring
    arg="sensors | grep 'Core 1' |cut -c 17-18",
    max=100,
    xc=315,--160
    yc=673,--721.5
    radius=91,
    thickness=22,
    sectors=100,
    start_angle=90,
    end_angle=-90,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x00FF00,1}},
	fg_colour2={{0,0xFF0000,1}},
    },
    
    --NETWORK/STORAGE
    {
    name="",--textbox ring
    arg="",
    max=100,
    xc=1335,
    yc=604,
    radius=68,
    thickness=25,
    sectors=1,
    border_size=1,
    start_angle=200,
    end_angle=90,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="battery_percent",--BATTERY ring
    arg="BAT1",
    max=100,
    xc=1335,
    yc=604,
    radius=93,
    thickness=23,
    sectors=1,
    start_angle=200,
    end_angle=90,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="",--hdd background ring
    arg="",
    max=100,
    xc=1289.5,
    yc=732.5,
    radius=93,
    thickness=50,
    sectors=1,
    border_size=1,
    start_angle=-130,
    end_angle=20,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="fs_used_perc",--hdd root ring
    arg="/",
    max=100,
    xc=1289.5,
    yc=732.5,
    radius=79,
    thickness=10,
    sectors=100,
    start_angle=-130,
    end_angle=20,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="fs_used_perc",--hdd home ring
    arg="/home",
    max=100,
    xc=1289.5,
    yc=732.5,
    radius=91,
    thickness=10,
    sectors=100,
    start_angle=-130,
    end_angle=20,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    
    --klok
    {
    name="",--klok background ring
    arg="",
    max=100,
    xc=777,
    yc=450,
    radius=42,
    thickness=18,
    sectors=1,
    border_size=1,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0xeff0f1,0.2}},
    bd_colour1={{0,0x31363b,1}},
    },
    {
    name="time",--seconds
    arg="%S",
    max=60,
    xc=777,
    yc=450,
    radius=40,
    thickness=4,
    sectors=60,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="time",--minutes
    arg="%M",
    max=60,
    xc=777,
    yc=450,
    radius=35,
    thickness=4,
    sectors=60,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    {
    name="time",--hours (analog)
    arg="%I",
    max=12,
    xc=777,
    yc=450,
    radius=30,
    thickness=4,
    sectors=12,
    start_angle=0,
    end_angle=360,
    bg_colour1={{0,0x31363b,1}},
    fg_colour1={{0,0x2980b9,1}},
    },
    
}
--END OF PARAMETERS HERE

--main function

	if conky_window==nil then return end

	local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
	local cr=cairo_create(cs)
    
	if tonumber(conky_parse('${updates}'))>3 then
		for i in pairs(rings_settings) do
			draw_ring(cr,rings_settings[i])
		end
	end

	cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
end




function draw_ring(cr, t)

	local function rgba_to_r_g_b_a(tcolour)
		local colour,alpha=tcolour[2],tcolour[3]
		return ((colour / 0x10000) % 0x100) / 255., 
			((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
	end
			
			
	local function calc_delta(tcol1,tcol2)
		--calculate deltas P R G B A to table_colour 1

		for x = 1, #tcol1 do
			tcol1[x].dA	= 0
			tcol1[x].dP = 0
	 		tcol1[x].dR = 0
			tcol1[x].dG = 0
			tcol1[x].dB = 0
			if tcol2~=nil and #tcol1 == #tcol2 then
				local r1,g1,b1,a1 = rgba_to_r_g_b_a(tcol1[x])
				local r2,g2,b2,a2 = rgba_to_r_g_b_a(tcol2[x])
				tcol1[x].dP = (tcol2[x][1]-tcol1[x][1])/t.sectors
		 		tcol1[x].dR = (r2-r1)/t.sectors
				tcol1[x].dG = (g2-g1)/t.sectors
				tcol1[x].dB = (b2-b1)/t.sectors
				tcol1[x].dA = (a2-a1)/t.sectors		
				
			end
		end
		
		return tcol1
	end

	--check values
	local function setup(t)
		if t.name==nil and t.arg==nil then 
			print ("No input values ... use parameters 'name'" +
				" with 'arg' or only parameter 'arg' ") 
			return
		end

		if t.max==nil then
			print ("No maximum value defined, use 'max'")
			print ("for name=" .. t.name)
			print ("with arg=" .. t.arg)
			return
		end
		if t.name==nil then t.name="" end
		if t.arg==nil then t.arg="" end

		if t.xc==nil then t.xc=conky_window.width/2 end
		if t.yc==nil then t.yc=conky_window.height/2 end
		if t.thickness ==nil then t.thickness = 10 end
		if t.radius ==nil then t.radius =conky_window.width/4 end
		if t.start_angle==nil then t.start_angle =0 end
		if t.end_angle==nil then t.end_angle=360 end
		if t.bg_colour1==nil then 
			t.bg_colour1={{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
		end
		if t.fg_colour1==nil then
			t.fg_colour1={{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}}
		end
		if t.bd_colour1==nil then
			t.bd_colour1={{0,0xFFFF00,0.5},{0.5,0xFFFF00,1},{1,0xFFFF00,0.5}}
		end
		if t.sectors==nil then t.sectors=10 end
		if t.gap_sectors==nil then t.gap_sectors=1 end 
		if t.fill_sector==nil then t.fill_sector=false end
		if t.sectors==1 then t.fill_sector=false end
		if t.border_size==nil then t.border_size=0 end
		if t.cap==nil then t.cap="p" end
		--some checks
		if t.thickness>t.radius then t.thickness=t.radius*0.1 end
		t.int_radius = t.radius-t.thickness

		--check colors tables 
		for i=1, #t.bg_colour1 do 
			if #t.bg_colour1[i]~=3 then t.bg_colour1[i]={1,0xFFFFFF,0.5} end
		end
		for i=1, #t.fg_colour1 do 
			if #t.fg_colour1[i]~=3 then t.fg_colour1[i]={1,0xFF0000,1} end
		end
		for i=1, #t.bd_colour1 do 
			if #t.bd_colour1[i]~=3 then t.bd_colour1[i]={1,0xFFFF00,1} end
		end
	
		if t.bg_colour2~=nil then
			for i=1, #t.bg_colour2 do 
				if #t.bg_colour2[i]~=3 then t.bg_colour2[i]={1,0xFFFFFF,0.5} end
			end
		end
		if t.fg_colour2~=nil then
			for i=1, #t.fg_colour2 do 
				if #t.fg_colour2[i]~=3 then t.fg_colour2[i]={1,0xFF0000,1} end
			end
		end
		if t.bd_colour2~=nil then
			for i=1, #t.bd_colour2 do 
				if #t.bd_colour2[i]~=3 then t.bd_colour2[i]={1,0xFFFF00,1} end
			end
		end 	
		
		if t.start_angle>=t.end_angle then
		 local tmp_angle=t.end_angle
		 t.end_angle= t.start_angle
		 t.start_angle = tmp_angle
		 -- print ("inversed angles")
			if t.end_angle-t.start_angle>360 and t.start_angle>0 then
				t.end_angle=360+t.start_angle
				print ("reduce angles")
			end
		
			if t.end_angle+t.start_angle>360 and t.start_angle<=0 then
				t.end_angle=360+t.start_angle
				print ("reduce angles")
			end
		
			if t.int_radius<0 then t.int_radius =0 end
			if t.int_radius>t.radius then
				local tmp_radius=t.radius
				t.radius=t.int_radius
				t.int_radius=tmp_radius
				print ("inversed radius")
			end
			if t.int_radius==t.radius then
				t.int_radius=0
				print ("int radius set to 0")
			end 
		end
		
		t.fg_colour1 = calc_delta(t.fg_colour1,t.fg_colour2)
		t.bg_colour1 = calc_delta(t.bg_colour1,t.bg_colour2)
		t.bd_colour1 = calc_delta(t.bd_colour1,t.bd_colour2)
	end
	
	if t.draw_me == true then t.draw_me = nil end
	if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end	
	--initialize table
	setup(t)
	
	--initialize cairo context
	cairo_save(cr)
	cairo_translate(cr,t.xc,t.yc)
	cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND)
	cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND)

	--get value
	local value = 0
	if t.name ~="" then
		value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
	else
		value = tonumber(t.arg)
	end
	if value==nil then value =0 end

	--initialize sectors
	--angle of a sector :
	local angleA = ((t.end_angle-t.start_angle)/t.sectors)*math.pi/180
	--value of a sector : 
	local valueA = t.max/t.sectors
	--first angle of a sector : 
	local lastAngle = t.start_angle*math.pi/180


	local function draw_sector(type_arc,angle0,angle,valpc, idx)
	 
		--this function draws a portion of arc
	 	--type of arc, angle0 = strating angle, angle= angle of sector,
	 	--valpc = percentage inside the sector, idx = sctor number #
	 	local tcolor
		 if type_arc=="bg" then 		--background
			 if valpc==1 then return end
		 	tcolor=t.bg_colour1
		 elseif type_arc=="fg" then	--foreground
		 	if valpc==0 then return end
		 	tcolor=t.fg_colour1
		 elseif type_arc=="bd" then	--border
		 	tcolor=t.bd_colour1
		 end 

		--angles equivalents to gap_sector
		local ext_delta=math.atan(t.gap_sectors/(2*t.radius))
		local int_delta=math.atan(t.gap_sectors/(2*t.int_radius))

		--angles of arcs
		local ext_angle=(angle-ext_delta*2)*valpc
		local int_angle=(angle-int_delta*2)*valpc

		--define colours to use for this sector
		if #tcolor==1 then 
			--plain color
			local vR,vG,vB,vA = rgba_to_r_g_b_a(tcolor[1])
			cairo_set_source_rgba(cr,vR+tcolor[1].dR*idx,
									vG+tcolor[1].dG*idx,
									vB+tcolor[1].dB*idx,
									vA+tcolor[1].dA*idx	)
		else
			--radient color
			local pat=cairo_pattern_create_radial(0,0,t.int_radius,0,0,t.radius)
			for i=1, #tcolor do
				local vP,vR,vG,vB,vA = tcolor[i][1], rgba_to_r_g_b_a(tcolor[i])
				cairo_pattern_add_color_stop_rgba (pat, 
									vP+tcolor[i].dP*idx,
									vR+tcolor[i].dR*idx,
									vG+tcolor[i].dG*idx,
									vB+tcolor[i].dB*idx,
									vA+tcolor[i].dA*idx	)
			end
			cairo_set_source (cr, pat)
			cairo_pattern_destroy(pat)
		end

		--start drawing
		 cairo_save(cr)
		--x axis is parrallel to start of sector
		cairo_rotate(cr,angle0-math.pi/2)

		local ri,re = t.int_radius ,t.radius

		--point A 
		local angle_a
	
		if t.cap == "p" then 
			angle_a = int_delta
			if t.inverse_arc and type_arc ~="bg" then
				angle_a = angle-int_angle-int_delta
			end
			if not(t.inverse_arc) and type_arc =="bg" then
				angle_a = int_delta+int_angle
			end
		else --t.cap=="r"
			angle_a = ext_delta
			if t.inverse_arc and type_arc~="bg" then
				angle_a = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_a = ext_delta+ext_angle
			end
		end
		local ax,ay = ri*math.cos(angle_a),ri*math.sin(angle_a)


		--point B
		local angle_b = ext_delta
		if t.cap == "p" then 
			if t.inverse_arc and type_arc ~="bg" then
				angle_b = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_b = ext_delta+ext_angle
			end
		else
			if t.inverse_arc and type_arc ~="bg" then
				angle_b = angle-ext_angle-ext_delta
			end
			if not(t.inverse_arc) and type_arc=="bg" then
				angle_b = ext_delta+ext_angle
			end
		end
		local bx,by = re*math.cos(angle_b),re*math.sin(angle_b)

		-- EXTERNAL ARC B --> C
		local b0,b1
		if t.inverse_arc then
			if type_arc=="bg" then
				b0,b1= ext_delta, angle-ext_delta-ext_angle
			else
				b0,b1= angle-ext_angle-ext_delta, angle-ext_delta
			end
		else
			if type_arc=="bg" then
				b0,b1= ext_delta+ext_angle, angle-ext_delta
			else
				b0,b1= ext_delta, ext_angle+ext_delta
			end
		end
		
		---POINT D
		local angle_c, angle_d
		if t.cap == "p" then 
			angle_d = angle-int_delta
			if t.inverse_arc and type_arc=="bg" then
				angle_d = angle-int_delta-int_angle	
			end
			if not(t.inverse_arc) and type_arc~="bg" then
				angle_d=int_delta+int_angle
			end
		else
			angle_d = angle-ext_delta
			if t.inverse_arc and type_arc=="bg" then
				angle_d =angle-ext_delta-ext_angle
			end
			if not(t.inverse_arc) and type_arc~="bg" then
				angle_d = ext_angle+ext_delta
			end
		end
		local dx,dy = ri*math.cos(angle_d),ri*math.sin(angle_d)
		
		-- INTERNAL ARC D --> A
		local d0,d1
		if t.cap=="p" then	
			if t.inverse_arc then	
				if type_arc=="bg" then
					d0,d1= angle-int_delta-int_angle,int_delta
				else
					d0,d1= angle-int_delta, angle- int_angle-int_delta
				end
			else
				if type_arc=="bg" then
					d0,d1= angle-int_delta, int_delta+int_angle
				else
					d0,d1= int_delta+int_angle, int_delta
				end
			end
		else
			if t.inverse_arc then	
				if type_arc=="bg" then	
					d0,d1= angle-ext_delta-ext_angle,ext_delta
				else
					d0,d1= angle-ext_delta, angle- ext_angle-ext_delta
				end
			else
				if type_arc=="bg" then	
					d0,d1= angle-ext_delta,ext_delta+ext_angle
				else	
					d0,d1= ext_angle+ext_delta, ext_delta
				end
			end			
		end
			
		--draw sector
		cairo_move_to(cr,ax,ay)
		cairo_line_to(cr,bx,by)
		cairo_arc(cr,0,0,re,b0,b1)
		cairo_line_to(cr,dx,dy) 
		cairo_arc_negative(cr,0,0,ri,d0,d1)
		 cairo_close_path (cr);

		--stroke or fill sector
		 if type_arc=="bd" then
		 	cairo_set_line_width(cr,t.border_size)
		 	cairo_stroke(cr)
		 else
			 cairo_fill(cr)
		 end

		 cairo_restore(cr)

	 end
	--draw sectors
	local n0,n1,n2 = 1,t.sectors,1
	if t.inverse_arc then n0,n1,n2 = t.sectors,1,-1 end
	local index = 0
	for i = n0,n1,n2 do 
		index = index +1
		local valueZ=1
		local cstA, cstB = (i-1),i
		if t.inverse_arc then cstA,cstB = (t.sectors-i), (t.sectors-i+1) end
		
		if value>valueA *cstA and value<valueA*cstB then
			if not t.fill_sector then
				valueZ = (value-valueA*cstA)/valueA
			end
		else
			if value<valueA*cstB then valueZ=0 end
		end
		
		local start_angle= lastAngle+(i-1)*angleA
		if t.foreground ~= false then 
			draw_sector("fg",start_angle,angleA,valueZ, index)
		end
		if t.background ~= false then 
			draw_sector("bg",start_angle,angleA,valueZ, i)
		end
		if t.border_size>0 then draw_sector("bd",start_angle,angleA,1, i) end
	end

	cairo_restore(cr)
end

cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
--[[END OF RING-SECTORS WIDGET]]

lua graphs file (graphs.lua):

--[[ GRAPH widget v1.1 by wlourf (07.01.2011)
	this widget draws some graphs with some effects 
	http://u-scripts.blogspot.com/2010/10/graph-widget.html
	
To call the script in a conky, use, before TEXT
	lua_load /path/to/the/script/graph.lua
	lua_draw_hook_pre main_graph
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name		- the name of the conky variable to display,
			  for example for {$cpu cpu0}, just write name="cpu"
arg			- the argument of the above variable,
			  for example for {$cpu cpu1}, just write arg="cpu1"
		  	  arg can be a numerical value if name=""
max			- the maximum value the above variable can reach,
			  for example for {$cpu cpu1}, just write max=100 or less or more
	
Optional parameters:
x,y 		- coordinates of the bottom-left corner of the graph,
              relative to the top-left corner of the conky window 
			  default =  bottom-left corner of the conky window
width       - width of the graph, default = 100 pixels
height      - height of the graph, default = 20 pixels
nb_values   - number of values to display in the graph, default=width 
              i.e. 1 pixel for 1 value
autoscale   - if set to true, calculate the max valeu of the y axis and
              doesn't use the max parameter above, default=false
skew_x      - skew graph around x axis, défaut = 0
skew_y      - skew graph around y axis, défaut = 0
angle	    - angle of rotation of the graph in degress, default = 0
              i.e. a horizontal graph)
inverse     - if set to true, graph are draw from right to left, default=false
background  - if set to false, background is not drawn, default=true
foreground  - if set to false, foreground is not drawn, default=true
              foreground = plain graph
bg_bd_size  - size of the border of the background, default=0=no border
fg_bd_size  - size of the border of the foreground, default=0=no border


Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table : 
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table : 
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table : 
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour	- colour table for background,
			  default = {{0,0x000000,.5},{1,0xFFFFFF,.5}}
fg_colour	- colour table for foreground,
			  default = {{0,0x00FFFF,1},{1,0x0000FF,1}}
bg_bd_colour- colour table for background border,
			  default = {{1,0xFFFFFF,1}}			  
fg_bd_colour- colour table for foreground border,
			  default = {{1,0xFFFF00,1}}			  

bg_orientation, bg_bd_orientation, fg_orientation, fg_bd_orientation,
        	- "orientation" defines the starting point of the gradient,
        	  default="nn"
			  there are 8 available starting points : 
			  "nw","nn","ne","ee","se","ss","sw","ww"
			  (n for north, w for west ...)
			  theses 8 points are the 4 corners + the 4 middles of graph
			  so a gradient "nn" will go from "nn" to "ss"
			  a gradient "nw" will go from "nw" to "se"

draw_me     - if set to false, graph is not drawn (default = true)
              it can be used with a conky string, if the string returns 1, the graph is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
              
v1.0 (31/10/2010) original release
v1.1 (07/01/2011) Add draw_me parameter and correct memory leaks, thanks to "Creamy Goodness"
                  text is parsed inside the function, not in the array of settings

--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation version 3 (GPLv3)
--     
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--     
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
--      MA 02110-1301, USA.		

]]

require 'cairo'

function set_settings()
-- START PARAMETERS HERE
	graph_settings={
	    --first column
	    
        --NETWORK
        {
        name="downspeedf",--downspeed graph (max 14.6MB/s)
	    arg="wlp5s0",
	    max=15000,
        autoscale=false,
        x=35, y=285,
        width=225,
        height=75,
        angle=13,
        nb_values=100,
        bg_bd_size=1,
        bg_colour = {{0,0xeff0f1,0.2}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true
        },
        {
        name="upspeedf",--upspeed graph (max 14.6MB/s)
	    arg="wlp5s0",
	    max=15000,
        autoscale=false,
        x=1309, y=335,
        width=225,
        height=75,
        angle=-13,
        inverse=true,
        nb_values=100,
        bg_bd_size=1,
        bg_colour = {{0,0xeff0f1,0.2}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true
        },
        
        --CPU
        {
        name="cpu",--cpu0 graph
	    arg="cpu0",
	    max=100,
        autoscale=false,
        x=203, y=722,
        width=225,
        height=49,
        angle=0,
        inverse=true,
        nb_values=100,
        bg_bd_size=1,
        bg_colour = {{0,0xeff0f1,0.2}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true
        },
        
        --TEXTBOXES
        {
        name="",--CPU/RAM textbox
	    arg="0",
	    max=0,
        x=10, y=604,
        width=200,
        height=225,
        angle=0,
        bg_bd_size=1,
        foreground=false,
        bg_colour = {{0,0xeff0f1,0.7}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true,
        },
        {
        name="",--SYSTEM/STORAGE/BATTERY/NETWORK textbox
	    arg="0",
	    max=0,
        x=1352, y=604,
        width=200,
        height=225,
        angle=0,
        bg_bd_size=1,
        foreground=false,
        bg_colour = {{0,0xeff0f1,0.7}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true,
        },
        {
        name="",--DOWNSPEED textbox
	    arg="0",
	    max=0,
        x=200, y=201,
        width=150,
        height=32,
        angle=0,
        bg_bd_size=1,
        foreground=false,
        bg_colour = {{0,0xeff0f1,0.7}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true,
        },
        {
        name="",--UPSPEED textbox
	    arg="0",
	    max=0,
        x=1213, y=201,
        width=150,
        height=32,
        angle=0,
        bg_bd_size=1,
        foreground=false,
        bg_colour = {{0,0xeff0f1,0.7}},
        fg_colour = {{0,0x2980b9,1}},
        bg_bd_colour={{0,0x31363b,1}},
        draw_me=true,
        },
        
       }
--END OF PARAMETERS HERE
end


function check_settings(t)
    --tables are check only when conky start
	if t.name==nil and t.arg==nil then 
		print ("No input values ... use parameters 'name'" .. 
			" with 'arg' or only parameter 'arg' ") 
		return 1
	end

	if t.max==nil then
		print ("No maximum value defined, use 'max'")
		print ("for name=" .. t.name .. " with arg=" .. t.arg)
		return 1
	end
	if t.name==nil then t.name="" end
	if t.arg==nil then t.arg="" end
	return 0
end

function conky_main_graph()

    if conky_window == nil then return end
	    
    local w=conky_window.width
    local h=conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, 
            conky_window.drawable, conky_window.visual, w, h)
    cr=cairo_create(cs)

    updates=tonumber(conky_parse('${updates}'))
    --start drawing after "updates_gap" updates
    --prevent segmentation error for cpu
    updates_gap=5
    flagOK=0
    if updates==1 then    
        set_settings()
	    
	    
		for i in pairs(graph_settings) do
			if graph_settings[i].width==nil then graph_settings[i].width=100 end
        	if graph_settings[i].nb_values==nil then  
        	    graph_settings[i].nb_values= graph_settings[i].width
        	end
			--create an empty table to store values
			graph_settings[i]["values"]={}
			--beginning point
			graph_settings[i].beg = graph_settings[i].nb_values
			--graph_settings[i].beg = 0
			for j =1, graph_settings[i].nb_values do
			    graph_settings[i].values[j]=0
			end
		    graph_settings[i].flag_init=true
		    flagOK=flagOK + check_settings(graph_settings[i])
		end
    end

    if flagOK>0 then
        --abort script if error in one of the tables
        print ("ERROR : Check the graph_setting table")
        return
    end

    --drawing process
    if updates > updates_gap then
		for i in pairs(graph_settings) do
		    if graph_settings[i].draw_me==true then graph_settings[i].draw_me = nil end
			if (graph_settings[i].draw_me==nil or conky_parse(tostring(graph_settings[i].draw_me)) == "1") then 
			    local nb_values=graph_settings[i].nb_values
			    graph_settings[i].automax=0
			    for j =1, nb_values do
				    if graph_settings[i].values[j+1]==nil then 
				        graph_settings[i].values[j+1]=0 
				    end
				
				    graph_settings[i].values[j]=graph_settings[i].values[j+1]
				    if j==nb_values then
					    --store value
					    if graph_settings[i].name=="" then
					        value=graph_settings[i].arg
					    else
        					value=tonumber(conky_parse('${' .. 
        					    graph_settings[i].name .. " " ..
        					    graph_settings[i].arg ..'}'))
        			    end
					    graph_settings[i].values[nb_values]=value
				    end
				    graph_settings[i].automax=math.max(graph_settings[i].automax,
				                                       graph_settings[i].values[j])
			        --should stop weird glitches at beginning when no values reported yet for upspeed or diskio
                    if graph_settings[i].automax == 0 then graph_settings[i].automax = 1 end 
                end
   			    draw_graph(graph_settings[i])
		    end
		end
    end

    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
	updates=nil
	updates_gap=nil
end


function draw_graph(t)
    --drawing function

    local function rgb_to_r_g_b(colour)
        return ((colour[2] / 0x10000) % 0x100) / 255., ((colour[2] / 0x100) % 0x100) / 255., (colour[2] % 0x100) / 255., colour[3]
    end
 
	local function linear_orientation(o,w,h)
	    --set gradient for bg and bg border
	    local p
		if o=="nn" then
			p={w/2,h,w/2,0}
		elseif o=="ne" then
			p={w,h,0,0}
		elseif o=="ww" then
			p={0,h/2,w,h/2}
		elseif o=="se" then
			p={w,0,0,h}
		elseif o=="ss" then
			p={w/2,0,w/2,h}
		elseif o=="ee" then
			p={w,h/2,0,h/2}		
		elseif o=="sw" then
			p={0,0,w,h}
		elseif o=="nw" then
			p={0,h,w,0}
		end
		return p
	end

	local function linear_orientation_inv(o,w,h)
	    --set gradient for fg and fg border
	    local p
		if o=="ss" then
			p={w/2,h,w/2,0}
		elseif o=="sw" then
			p={w,h,0,0}
		elseif o=="ee" then
			p={0,h/2,w,h/2}
		elseif o=="nw" then
			p={w,0,0,h}
		elseif o=="nn" then
			p={w/2,0,w/2,h}
		elseif o=="ww" then
			p={w,h/2,0,h/2}		
		elseif o=="ne" then
			p={0,0,w,h}
		elseif o=="se" then
			p={0,h,w,0}
		end
		return p
	end


	--set default values
	
    --cancel drawing if not needed
	if t.draw_me~=nil and conky_parse(tostring(t.draw_me)) ~= "1" then 
		return
	end
	

	
	if t.height==nil	then t.height=20 end
	--checked in previous part : width and nb_values
		
	if t.background==nil    then t.background=true end
	if t.bg_bd_size==nil	then t.bg_bd_size=0 end
	if t.x==nil 		    then t.x=t.bg_bd_size end
	if t.y==nil 		    then t.y=conky_window.height -t.bg_bd_size end
	if t.bg_colour==nil 	then t.bg_colour={{0,0x000000,.5},{1,0xFFFFFF,.5}} end
	if t.bg_bd_colour==nil 	then t.bg_bd_colour={{1,0xFFFFFF,1}} end
	
	if t.foreground==nil    then t.foreground=true end
	if t.fg_colour==nil 	then t.fg_colour={{0,0x00FFFF,1},{1,0x0000FF,1}} end
	
	if t.fg_bd_size==nil	then t.fg_bd_size=0 end	
	if t.fg_bd_colour==nil  then t.fg_bd_colour={{1,0xFFFF00,1}} end
	
	if t.autoscale==nil     then t.autoscale=false end
	if t.inverse==nil       then t.inverse=false end
	if t.angle==nil         then t.angle=0 end
	
	if t.bg_bd_orientation==nil then t.bg_bd_orientation="nn" end
	if t.bg_orientation==nil then t.bg_orientation="nn" end
	if t.fg_bd_orientation==nil then t.fg_bd_orientation="nn" end
	if t.fg_orientation==nil then t.fg_orientation="nn" end

    --check colours tables
	for i=1, #t.fg_colour do    
        if #t.fg_colour[i]~=3 then 
        	print ("error in fg_colour table")
        	t.fg_colour[i]={1,0x0000FF,1} 
        end
    end
	
	for i=1, #t.fg_bd_colour do    
        if #t.fg_bd_colour[i]~=3 then 
        	print ("error in fg_bd_colour table")
        	t.fg_bd_colour[i]={1,0x00FF00,1} 
        end
    end
    
	for i=1, #t.bg_colour do    
        if #t.bg_colour[i]~=3 then 
        	print ("error in background color table")
        	t.bg_colour[i]={1,0xFFFFFF,0.5} 
        end
    end    

	for i=1, #t.bg_bd_colour do    
        if #t.bg_bd_colour[i]~=3 then 
        	print ("error in background border color table")
        	t.bg_bd_colour[i]={1,0xFFFFFF,1} 
        end
    end    

    --calculate skew parameters if needed
    if t.flag_init then
	    if t.skew_x == nil then 
		    t.skew_x=0 
	    else
		    t.skew_x = math.pi*t.skew_x/180	
	    end
	    if t.skew_y == nil then 
		    t.skew_y=0
	    else
		    t.skew_y = math.pi*t.skew_y/180	
	    end
	    t.flag_init=false
	end

    cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
    cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND)

    local matrix0 = cairo_matrix_t:create()
    tolua.takeownership(matrix0)
    cairo_save(cr)
    cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
    cairo_transform(cr,matrix0)
    
   	local ratio=t.width/t.nb_values

	cairo_translate(cr,t.x,t.y)
	cairo_rotate(cr,t.angle*math.pi/180)
	cairo_scale(cr,1,-1)

	--background
	if t.background then
	    local pts=linear_orientation(t.bg_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_colour[i][1], rgb_to_r_g_b(t.bg_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_fill(cr)	
		cairo_pattern_destroy(pat)
	end
	
    --autoscale
    cairo_save(cr)
	if t.autoscale then
		t.max= t.automax*1.1
	end
	
    local scale_x = t.width/(t.nb_values-1)
	local scale_y = t.height/t.max
	
    --define first point of the graph
	if updates-updates_gap <t.nb_values then 
		t.beg = t.beg - 1
    	--next line prevent segmentation error when conky window is redraw 
		--quicly when another window "fly" over it
		if t.beg<0 then t.beg=0 end
	else
		t.beg=0
	end
    if t.inverse then cairo_scale(cr,-1,1)
    cairo_translate(cr,-t.width,0) end

	--graph foreground
	if t.foreground then
	    local pts_fg=linear_orientation_inv(t.fg_orientation,t.width,t.height)
	    local pat = cairo_pattern_create_linear (pts_fg[1],pts_fg[2],pts_fg[3],pts_fg[4])
		for i=1,#t.fg_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_colour[i][1], rgb_to_r_g_b(t.fg_colour[i]))
		end
		cairo_set_source (cr, pat)

		cairo_move_to(cr,t.beg*scale_x,0)
		cairo_line_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_line_to(cr,(t.nb_values-1)*scale_x,0)
		cairo_close_path(cr)
		cairo_fill(cr)
		cairo_pattern_destroy(pat)
	end

	--graph_border
	if t.fg_bd_size>0 then
    	local pts=linear_orientation_inv(t.fg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1,#t.fg_bd_colour,1 do
			cairo_pattern_add_color_stop_rgba (pat, 1-t.fg_bd_colour[i][1], rgb_to_r_g_b(t.fg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_move_to(cr,t.beg*scale_x,t.values[t.beg+1]*scale_y)
		for i=t.beg, t.nb_values-1 do
			cairo_line_to(cr,i*scale_x,t.values[i+1]*scale_y)		
		end
		cairo_set_line_width(cr,t.fg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)
	end
	cairo_restore(cr)

	--background border
	if t.bg_bd_size>0 then
    	local pts=linear_orientation(t.bg_bd_orientation,t.width,t.height)
		local pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
		for i=1, #t.bg_bd_colour do
			--print ("i",i,t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
		    cairo_pattern_add_color_stop_rgba (pat, t.bg_bd_colour[i][1], rgb_to_r_g_b(t.bg_bd_colour[i]))
		end
		cairo_set_source (cr, pat)
		cairo_rectangle(cr,0,0,t.width,t.height)	
		cairo_set_line_width(cr,t.bg_bd_size)
		cairo_stroke(cr)
		cairo_pattern_destroy(pat)	
	end	

	cairo_restore(cr)

end

cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil

HUD file (1920x1080)


#163

There are some pretty good conky shared here :+1: . but how do I show weather in my house? I don’t go out side :rofl: (just a dumb joke) lol. Anyone one have any high tech looking conky? Edit- I looked at whole thread, conky is cool!


#164

I updated my conky a bit and that’s the result

conkyrc
alignment bottom_right
background yes
update_interval 1
 
cpu_avg_samples 2
net_avg_samples 2
 
override_utf8_locale yes
 
double_buffer yes
no_buffers yes
 
#text_buffer_size 10240
imlib_cache_size 0

###########
# Windows #
###########
own_window_class Conky
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 0
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
 
 
border_inner_margin 0
border_outer_margin 0
 
minimum_size 500 500
maximum_width 300

############
# Graphics #
############
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
 
########
# Text #
########
use_xft yes
xftalpha 0.8
 
uppercase no
 
default_color F00CA0

########
# Code #
########
own_window_colour 000000
gap_x 10
gap_y 0
TEXT
${voffset }${offset 20}${font Bauhaus:size=68} ${time %H}${color 0CACF0}
${voffset }${offset 70}${font Bauhaus:size=68}${time %M}${color F00CA0}
${voffset -156}${offset 90}${font Bauhaus:size=16} ${time %A} ${color 0CACF0}${voffset 20}${offset -10}${time %d %b }
${voffset 35}
${color 0CACF0}${voffset -20}$hr$
${font Webdings:size=16}i ${color F00CA0}${font Bauhaus:size=13}Processor: ${color }${alignr 6}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 14-19 | uniq}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 24-51 | uniq}
${alignc}${machine}${color 0CACF0} @ $freq(MHz)${color F00CA0}
${color 0CACF0}${offset 36}${voffset 5}${font Webdings:size=14}+ ${color F00CA0}${font Bauhaus:size=13}Nvidia ${execi 130000 nvidia-settings -q gpus | grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'} 
${offset 25}Nvidia Driver ${color 0CACF0}${execi 130000 nvidia-settings -q NvidiaDriverVersion -t | grep -m 1 ""}${color 0CACF0} @ ${nvidia gpufreq}(MHz)  
${color 0CACF0}${offset 40}${voffset 5}${font Webdings:size=14}d ${font Bauhaus:size=13}${color F00CA0}Updates ${color 0CACF0}${execi 130000 cat /etc/pacman-mirrors.conf | grep -i "Branch =" | sed -E "s/(# )*Branch = //g"} ${color F00CA0}Branch:${offset 10}${color 0CACF0}${execi 130000 checkupdates | wc -l}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
${voffset -15}${color FFFFFF}${font DejaVu Sans Mono:size=2}${execi 130000 screenfetch -L -N  | sed 's/^/\t/' | sed 's/ *$//'}${color F00CA0}
${color F00CA0}${font Bauhaus:size=25}${voffset -50}${offset 90}${exec lsb_release -d | cut -f 2| tr "[:upper:]" "[:lower:]"}${color F00CA0}
${font Bauhaus:size=10}${voffset -10}${offset 80}Edition: ${color 0CACF0}${font Bauhaus:size=10}${execi 130000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}${color F00CA0}${font Bauhaus:size=13}
${voffset 10}Kernel: ${color 0CACF0}${kernel}${color F00CA0}
Uptime: ${color 0CACF0}$uptime_short${color F00CA0}
# Power: ${color 0CACF0}${battery_percent BAT0}%${color F00CA0}
LOCAL IP: ${color 0CACF0}${addr eno1}${color F00CA0}
#Public IP: ${color 0CACF0}${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color F00CA0}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
${voffset}CPU temp: ${color 0CACF0}${hwmon 1 temp 1}${font DejaVu Sans:size=13}${voffset -4}°C${color F00CA0}${font Bauhaus:size=13}${alignr}Fan: ${color 0CACF0}${hwmon 2 fan 2}${hwmon 3 fan 2} RPM${color F00CA0}
GPU temp: ${color 0CACF0}${execi 10 nvidia-smi -q -d TEMPERATURE | awk '/GPU Current Temp/ {print $5}'}${font DejaVu Sans:size=13}${voffset -4}°C ${color F00CA0}${offset 5}${font Bauhaus:size=13}${alignr}Fan: ${color 0CACF0}${execi 10 nvidia-settings -tq [fan:0]/GPUCurrentFanSpeed}%${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
VRAM: ${color 0CACF0}${exec nvidia-smi --query-gpu=memory.used --format=csv,noheader} / ${exec nvidia-smi --query-gpu=memory.total --format=csv,noheader}${color F00CA0}
RAM: ${color 0CACF0}$mem / $memmax$alignr${color CF2765}${membar 10,60 }${color F00CA0}
Swap: ${color 0CACF0}${swap}/ ${swapfree}${color F00CA0}$alignr${color CF2765}${swapbar 10,60 }${color F00CA0}
CPU: ${color 0CACF0}${cpu cpu0}%${color F00CA0}${alignr}${color CF2765}${cpugraph 18,200 CF2765 CF2765}${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
# Signal: ${color 0CACF0}${wireless_link_qual eno1}%${color F00CA0} 
${font PizzaDude Bullets:size=13}O ${font Bauhaus:size=13} Upload: ${color 0CACF0}${upspeed eno1}${color F00CA0}
${offset 40}Total Sent: ${color 0CACF0}${totalup eno1}${color F00CA0}
${upspeedgraph eno1 18,210 CF2765 CF2765}${color F00CA0}
${voffset 10}${font PizzaDude Bullets:size=13}U ${font Bauhaus:size=13} Download: ${color 0CACF0}${downspeed eno1}${color F00CA0}
${offset 40}Total Received: ${color 0CACF0}${totaldown eno1}${color F00CA0}
${downspeedgraph eno1 18,200 CF2765 CF2765}
${color 0CACF0}$hr${color F00CA0}
Home: ${color 0CACF0}${fs_used /}/${fs_size /}${alignr}${color CF2765}${fs_bar 10,60 /}
${offset 55}${color 0CACF0}${fs_free /} free${color F00CA0}
${voffset 5}SSD:${offset 20}${color 0CACF0}${fs_used /mnt/sda5}/${fs_size /mnt/sda5}${alignr}${color CF2765}${fs_bar 10,60 /mnt/sda5}
${offset 55}${color 0CACF0}${fs_free /mnt/sda5} free${color F00CA0}
${voffset 5}${color 0CACF0}Read: $color${diskio_read}$alignr${color 0CACF0}Write: $color${diskio_write}
${diskiograph 18,200 CF2765 CF2765}
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}CPU%
${color 0CACF0}${top name 1}${alignr}${top cpu 1}
${color 0CACF0}${top name 2}${alignr}${top cpu 2}
${color 0CACF0}${top name 3}${alignr}${top cpu 3}
${color 0CACF0}${top name 4}${alignr}${top cpu 4}
#${color 0CACF0}${top name 5}${alignr}${top cpu 5}
#${color 0CACF0}${top name 6}${alignr}${top cpu 6} 
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}RAM
${color 0CACF0}${top_mem name 1}${alignr}${top_mem mem_res 1}
${color 0CACF0}${top_mem name 2}${alignr}${top_mem mem_res 2}
${color 0CACF0}${top_mem name 3}${alignr}${top_mem mem_res 3}
${color 0CACF0}${top_mem name 4}${alignr}${top_mem mem_res 4}
#${color 0CACF0}${top_mem name 5}${alignr}${top_mem mem_res 5}

This is optimized for 1920*1080, so it needs some editing for smaller screens.

EDIT: I just changed it again :see_no_evil:

conkyrc
alignment bottom_right
background yes
update_interval 1
 
cpu_avg_samples 2
net_avg_samples 2
 
override_utf8_locale yes
 
double_buffer yes
no_buffers yes
 
#text_buffer_size 10240
imlib_cache_size 0

###########
# Windows #
###########
own_window_class Conky
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 0
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
 
 
border_inner_margin 0
border_outer_margin 0
 
minimum_size 500 500
maximum_width 300

############
# Graphics #
############
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
 
########
# Text #
########
use_xft yes
xftalpha 0.8
 
uppercase no
 
default_color F00CA0

########
# Code #
########
own_window_colour 000000
gap_x 10
gap_y 0
TEXT
${voffset }${offset 20}${font Bauhaus:size=68} ${time %H}${color 0CACF0}
${voffset }${offset 70}${font Bauhaus:size=68}${time %M}${color F00CA0}
${voffset -156}${offset 90}${font Bauhaus:size=16} ${time %A} ${color 0CACF0}${voffset 20}${offset -10}${time %d %b }
${voffset 35}
${color 0CACF0}${voffset -20}$hr$
${voffset -20}${color FFFFFF}${font DejaVu Sans Mono:size=2}${execi 130000 screenfetch -L -N  | sed 's/^/\t/' | sed 's/ *$//'}${color F00CA0}
${color F00CA0}${font Bauhaus:size=25}${voffset -50}${offset 90}${exec lsb_release -d | cut -f 2| tr "[:upper:]" "[:lower:]"}${color F00CA0}
${font Bauhaus:size=10}${voffset -10}${offset 80}Edition: ${color 0CACF0}${font Bauhaus:size=10}${execi 130000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${color 0CACF0}${voffset -5}$hr$
${font Webdings:size=16}i ${color F00CA0}${font Bauhaus:size=13}Processor: ${color }${alignr 6}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 14-19 | uniq}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 24-51 | uniq}
${alignc}${machine}${color 0CACF0} @ $freq(MHz)${color F00CA0}
${color 0CACF0}${offset 36}${voffset 5}${font Webdings:size=14}+ ${color F00CA0}${font Bauhaus:size=13}Nvidia ${execi 130000 nvidia-settings -q gpus | grep '0] (' | cut -d '(' -f 2,2 | sed -e 's/.\{1\}$//'} 
${offset 25}Nvidia Driver ${color 0CACF0}${execi 130000 nvidia-settings -q NvidiaDriverVersion -t | grep -m 1 ""}${color 0CACF0} @ ${nvidia gpufreq}(MHz)  
${color 0CACF0}${offset 40}${voffset 5}${font Webdings:size=14}d ${font Bauhaus:size=13}${color F00CA0}Updates ${color 0CACF0}${execi 130000 cat /etc/pacman-mirrors.conf | grep -i "Branch =" | sed -E "s/(# )*Branch = //g"} ${color F00CA0}Branch:${offset 10}${color 0CACF0}${execi 130000 checkupdates | wc -l}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
${voffset }Kernel: ${color 0CACF0}${kernel}${color F00CA0}
Uptime: ${color 0CACF0}$uptime_short${color F00CA0}
# Power: ${color 0CACF0}${battery_percent BAT0}%${color F00CA0}
LOCAL IP: ${color 0CACF0}${addr eno1}${color F00CA0}
#Public IP: ${color 0CACF0}${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color F00CA0}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
${voffset}CPU temp: ${color 0CACF0}${hwmon 1 temp 1}${font DejaVu Sans:size=13}${voffset -4}°C${color F00CA0}${font Bauhaus:size=13}${alignr}Fan: ${color 0CACF0}${hwmon 2 fan 2}RPM${color F00CA0}
GPU temp: ${color 0CACF0}${execi 10 nvidia-smi -q -d TEMPERATURE | awk '/GPU Current Temp/ {print $5}'}${font DejaVu Sans:size=13}${voffset -4}°C ${color F00CA0}${offset 5}${font Bauhaus:size=13}${alignr}Fan: ${color 0CACF0}${execi 10 nvidia-settings -tq [fan:0]/GPUCurrentFanSpeed}%${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
VRAM: ${color 0CACF0}${exec nvidia-smi --query-gpu=memory.used --format=csv,noheader} / ${exec nvidia-smi --query-gpu=memory.total --format=csv,noheader}${color F00CA0}
RAM: ${color 0CACF0}$mem / $memmax$alignr${color CF2765}${membar 10,60 }${color F00CA0}
Swap: ${color 0CACF0}${swap}/ ${swapfree}${color F00CA0}$alignr${color CF2765}${swapbar 10,60 }${color F00CA0}
CPU: ${color 0CACF0}${cpu cpu0}%${color F00CA0}${alignr}${color CF2765}${cpugraph 18,200 CF2765 CF2765}${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
# Signal: ${color 0CACF0}${wireless_link_qual eno1}%${color F00CA0} 
${font PizzaDude Bullets:size=13}O ${font Bauhaus:size=13} Upload: ${color 0CACF0}${upspeed eno1}${color F00CA0}
${offset 40}Total Sent: ${color 0CACF0}${totalup eno1}${color F00CA0}
${upspeedgraph eno1 18,210 CF2765 CF2765}${color F00CA0}
${voffset 10}${font PizzaDude Bullets:size=13}U ${font Bauhaus:size=13} Download: ${color 0CACF0}${downspeed eno1}${color F00CA0}
${offset 40}Total Received: ${color 0CACF0}${totaldown eno1}${color F00CA0}
${downspeedgraph eno1 18,200 CF2765 CF2765}
${color 0CACF0}$hr${color F00CA0}
Home: ${color 0CACF0}${fs_used /}/${fs_size /}${alignr}${color CF2765}${fs_bar 10,60 /}
${offset 55}${color 0CACF0}${fs_free /} free${color F00CA0}
${voffset 5}SSD:${offset 20}${color 0CACF0}${fs_used /mnt/sda5}/${fs_size /mnt/sda5}${alignr}${color CF2765}${fs_bar 10,60 /mnt/sda5}
${offset 55}${color 0CACF0}${fs_free /mnt/sda5} free${color F00CA0}
${voffset 5}${color 0CACF0}Read: $color${diskio_read}$alignr${color 0CACF0}Write: $color${diskio_write}
${diskiograph 18,200 CF2765 CF2765}
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}CPU%
${color 0CACF0}${top name 1}${alignr}${top cpu 1}
${color 0CACF0}${top name 2}${alignr}${top cpu 2}
${color 0CACF0}${top name 3}${alignr}${top cpu 3}
${color 0CACF0}${top name 4}${alignr}${top cpu 4}
#${color 0CACF0}${top name 5}${alignr}${top cpu 5}
#${color 0CACF0}${top name 6}${alignr}${top cpu 6} 
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}RAM
${color 0CACF0}${top_mem name 1}${alignr}${top_mem mem_res 1}
${color 0CACF0}${top_mem name 2}${alignr}${top_mem mem_res 2}
${color 0CACF0}${top_mem name 3}${alignr}${top_mem mem_res 3}
${color 0CACF0}${top_mem name 4}${alignr}${top_mem mem_res 4}
#${color 0CACF0}${top_mem name 5}${alignr}${top_mem mem_res 5}

Magically Maddeningly Magnificent March (2018) Screenshots
#165

Awesome.
For some reason conky “window” is too long despite the fact that my display has the same resolution as yours. So I’ve altered your conkyrc a little. Also corrected CPU version output and a few more mistakes (updates, branch, etc), changed network interface to wlan.

conkyrc
alignment bottom_right
background yes
update_interval 1
 
cpu_avg_samples 2
net_avg_samples 2
 
override_utf8_locale yes
 
double_buffer yes
no_buffers yes
 
#text_buffer_size 10240
imlib_cache_size 0

###########
# Windows #
###########
own_window_class Conky
own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 0
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
 
 
border_inner_margin 0
border_outer_margin 0
 
minimum_size 500 500
maximum_width 300

############
# Graphics #
############
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
 
########
# Text #
########
use_xft yes
xftalpha 0.8
 
uppercase no
 
default_color F00CA0

########
# Code #
########
own_window_colour 000000
gap_x 10
gap_y 0
TEXT
${voffset 5}${offset 20}${font URW Bookman:size=60} ${time %H}${color 0CACF0}
${voffset -10}${offset 70}${font URW Bookman:size=60}${time %M}${color F00CA0}
${voffset -180}${offset 150}${font URW Bookman:size=16} ${time %A} ${color 0CACF0}
${voffset 22}${offset 190}${time %d %b }
${voffset 35}
${color 0CACF0}${voffset -20}$hr$
${voffset -20}${color FFFFFF}${font DejaVu Sans Mono:size=2}${execi 130000 screenfetch -L -N  | sed 's/^/\t/' | sed 's/ *$//'}${color F00CA0}
${color F00CA0}${font Roboto:size=25}${voffset -75}${offset 90}${exec lsb_release -d | cut -f 2| tr "[:upper:]" "[:lower:]"}${color F00CA0}
${font Roboto Condensed:size=12}${voffset -10}${offset 80}Edition: ${color 0CACF0}${font Roboto Condensed:size=11}${execi 130000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${color 0CACF0}${voffset -5}$hr$
${color F00CA0}${font Roboto Condensed:size=13}Processor: ${color }${alignr 6}${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 14-18 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 23-26 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 32-39 | uniq} ${execi 130000 cat /proc/cpuinfo | grep 'model name' | cut -c 45-51 | uniq}
${alignc}${machine}${color 0CACF0} @ $freq(MHz)${color F00CA0}
${font Roboto Condensed:size=13}${color F00CA0}Updates: ${offset 10}${color 0CACF0}${execi 130000 checkupdates | wc -l} ${alignr 6}${color F00CA0}Branch: ${color 0CACF0}${execi 130000 cat /etc/pacman-mirrors.conf | grep -i "Branch =" | sed -E "s/(# )*Branch = //g"}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
${voffset }Kernel: ${color 0CACF0}${kernel}${color F00CA0}
Uptime: ${color 0CACF0}$uptime_short${color F00CA0}
#Power: ${color 0CACF0}${battery_percent BAT0}%${color F00CA0}
#Local IP: ${color 0CACF0}${addr wlp2s0}${color F00CA0}
Public IP: ${color 0CACF0}${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}${color F00CA0}
${voffset -5}${color 0CACF0}$hr${color F00CA0}
RAM: ${color 0CACF0}$mem / $memmax$alignr${color CF2765}${membar 10,60 }${color F00CA0}
Swap: ${color 0CACF0}${swap}/ ${swapfree}${color F00CA0}$alignr${color CF2765}${swapbar 10,60 }${color F00CA0}
CPU: ${color 0CACF0}${cpu cpu0}%${color F00CA0}${alignr}${color CF2765}${cpugraph 18,200 CF2765 CF2765}${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
# Signal: ${color 0CACF0}${wireless_link_qual wlp2s0}%${color F00CA0} 
${font Roboto Condensed:size=13} Upload: ${color 0CACF0}${upspeed wlp2s0}${color F00CA0}${alignr}${upspeedgraph wlp2s0 18,150 CF2765 CF2765}${color F00CA0}
${offset 40}Total Sent: ${color 0CACF0}${totalup wlp2s0}${color F00CA0}
${font Roboto Condensed:size=13} Download: ${color 0CACF0}${downspeed wlp2s0}${color F00CA0}${alignr}${downspeedgraph wlp2s0 18,150 CF2765 CF2765}
${offset 40}Total Received: ${color 0CACF0}${totaldown wlp2s0}${color F00CA0}
${color 0CACF0}$hr${color F00CA0}
Home: ${color 0CACF0}${fs_used /}/${fs_size /}${alignr}${color CF2765}${fs_bar 10,60 /}
${offset 55}${color 0CACF0}${fs_free /} free${color F00CA0}
${voffset 5}NFS:${offset 20}${color 0CACF0}${fs_used /mnt/asmt-nfs}/${fs_size /mnt/asmt-nfs}${alignr}${color CF2765}${fs_bar 10,60 /mnt/asmt-nfs}
${offset 55}${color 0CACF0}${fs_free /mnt/asmt-nfs} free${color F00CA0}
${voffset 5}${color 0CACF0}Read: $color${diskio_read}$alignr${color 0CACF0}Write: $color${diskio_write}
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}CPU%
${color 0CACF0}${top name 1}${alignr}${top cpu 1}
${color 0CACF0}${top name 2}${alignr}${top cpu 2}
${color 0CACF0}${top name 3}${alignr}${top cpu 3}
${color 0CACF0}${top name 4}${alignr}${top cpu 4}
#${color 0CACF0}${top name 5}${alignr}${top cpu 5}
#${color 0CACF0}${top name 6}${alignr}${top cpu 6} 
${color 0CACF0}$hr${color F00CA0}
${color F00CA0}Process ${color F00CA0}${alignr}RAM
${color 0CACF0}${top_mem name 1}${alignr}${top_mem mem_res 1}
${color 0CACF0}${top_mem name 2}${alignr}${top_mem mem_res 2}
${color 0CACF0}${top_mem name 3}${alignr}${top_mem mem_res 3}
${color 0CACF0}${top_mem name 4}${alignr}${top_mem mem_res 4}
#${color 0CACF0}${top_mem name 5}${alignr}${top_mem mem_res 5}

#166

Glad you like it :slight_smile:
I will do some code cleanups and add a bit more overview with descriptions to the conky when I find some time.
My idea with the Updates part was as follows. I was trying to get this in one line, but idk if this would be correct in english like I did it. Updates (detect branch and print) Branch and after that the available Updates as number.
So it would always look like Updates (stable/testing/unstable) Branch : 150 for example, depending on your used branch.


#167

For Updates:
${color red}Updates ${alignr} ${color yellow}${execi 1800 pacman -Qu | wc -l} Updates

Linu74


#168

https://pastebin.com/xExMTDYU


#169

conky.config = {
  own_window = true,
  own_window_type = 'desktop',
  own_window_transparent = true,
  own_window_colour = '222222',
  alignment = 'top_right',
  gap_x = 10,
  gap_y = 0,
  minimum_width = 225,
  use_xft = true,
  font = 'Cantarell:size=10',
  override_utf8_locale = true,
  draw_shades = false,
  default_shade_color = '000000',
  draw_outline = false,
  default_outline_color = '000000',
  color2 = 'ededed',
  color3 = '109567',
  cpu_avg_samples = 2,
  default_color = 'bbbbbb',
  draw_borders = false,
  stippled_borders = 5,
  border_inner_margin = 15,
  border_outer_margin = 0,
  border_width = 1,
  background = true,
  no_buffers = true,
  imlib_cache_size = 0,
  temperature_unit = 'fahrenheit',
  double_buffer = true,
  update_interval = 1,
}

conky.text = [[
${voffset 8}$color${font Cantarell:size=16}${time %A}$font${voffset -8}$alignr$color3${font Cantarell:size=38}${time %e}$font
$color${voffset -30}$color${font Cantarell:size=18}${time %B}$font${voffset -3} $color${font Cantarell:size=20}${time %Y}$font

$color3${font Cantarell:size=10:bold}SYSTEM$color$font
${voffset -8}${hr 2}
${color}Kernel$alignr$color2$kernel
${color}Uptime$alignr$color2$uptime
${color}CPU Frequency$alignr$color2${freq_g} GHz
${color}CPU Temperature$alignr$color2${hwmon temp 1} Degrees
${color}Running Processes$color2$alignr$running_processes of $processes
${color}Average Load$alignr$color2$loadavg
$color${voffset -5}${hr 2}
${color}Core 1  ${color2}${cpu cpu1}%  ${cpubar cpu1 4}
${color}Core 2  ${color2}${cpu cpu2}%  ${cpubar cpu2 4}
${color}Core 3  ${color2}${cpu cpu3}%  ${cpubar cpu3 4}
${color}Core 4  ${color2}${cpu cpu4}%  ${cpubar cpu4 4}

$color3${font Cantarell:size=10:bold}CPU$alignr$color$font$cpu%
$color2${cpubar 4}
$color2${top name 1}$alignr$color${top cpu 1}%
$color2${top name 2}$alignr$color${top cpu 2}%
$color2${top name 3}$alignr$color${top cpu 3}%
$color2${top name 4}$alignr$color${top cpu 4}%
$color2${top name 5}$alignr$color${top cpu 5}%
$color2${top name 6}$alignr$color${top cpu 6}%
$color2${top name 7}$alignr$color${top cpu 7}%
$color2${top name 8}$alignr$color${top cpu 8}%
#$color2${top name 9}$alignr$color${top cpu 9}%
#$color2${top name 10}$alignr$color${top cpu 10}%

$color3${font Cantarell:size=10:bold}RAM$alignr$color2$font$mem of $memmax $color- $memperc%
$color2${membar 4}
$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
$color2${top_mem name 5}$alignr$color${top_mem mem_res 5}
$color2${top_mem name 6}$alignr$color${top_mem mem_res 6}
$color2${top_mem name 7}$alignr$color${top_mem mem_res 7}
$color2${top_mem name 8}$alignr$color${top_mem mem_res 8}
# $color2${top_mem name 9}$alignr$color${top_mem mem_res 9}
# $color2${top_mem name 10}$alignr$color${top_mem mem_res 10}

$color3${font Cantarell:size=10:bold}DISK USAGE$color$font
${voffset -8}${hr 2}
Root $alignr$color2${fs_used /} ${color}of${color2} ${fs_size /} $color- ${fs_used_perc /}%
${fs_bar 4 /}
Home $alignr$color2${fs_used /home} ${color}of${color2} ${fs_size /home} $color- ${fs_used_perc /home}%
${fs_bar 4 /home}
TV $alignr$color2${fs_used /mnt/Television} ${color}of${color2} ${fs_size /mnt/Television} $color- ${fs_used_perc /mnt/Television}%
${fs_bar 4 /mnt/Television}
Windows $alignr$color2${fs_used /mnt/Windows} ${color}of${color2} ${fs_size /mnt/Windows} $color- ${fs_used_perc /mnt/Windows}%
${fs_bar 4 /mnt/Windows}
New Volume $alignr$color2${fs_used /mnt/New-Volume} ${color}of${color2} ${fs_size /mnt/New-Volume} $color- ${fs_used_perc /mnt/New-Volume}%
${fs_bar 4 /mnt/New-Volume}
Storage $alignr$color2${fs_used /mnt/Storage} ${color}of${color2} ${fs_size /mnt/Storage} $color- ${fs_used_perc /mnt/Storage}%
${fs_bar 4 /mnt/Storage}
Swap $alignr$color2$swap ${color}of${color2} $swapmax $color- $swapperc%
${swapbar 4}
]]

#170

I have used conky but haven’t yet researched how to edit them but once I do would it be possible to show the last line from terminal? That would give me info as I jump to other workspaces.


#171

Simple


#172

Just another config in general based on those posted here before.

use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0

double_buffer yes
minimum_size 1500 150
maximum_width 1870
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color red
default_outline_color green
alignment bottom_left
gap_x 30
gap_y 70
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes

TEXT
${voffset 5}${color 697986}${font Cantarell Light:pixelsize=120}${time %H}
${voffset -170}${offset 130}${font Cantarell Thin:size=64}${time %M}${font}${voffset -50}${offset 60}${font Cantarell:pixelsize=42}${time %d} ${voffset -15}${color 697986}${font Ubuntu:pixelsize=22}${time  %B} ${time %Y}${font}${voffset 15}${font Ubuntu:pixelsize=58}${offset -245}${time %A}${font}

${voffset 15}${offset 0}${font Ubuntu:pixelsize=12}${color 27AE60}HOME ${offset 7}$color${fs_used /} / ${fs_size /} ${offset 7}${color 19BD9B}${fs_bar 10,60 /}${offset 30}${color 27AE60}RAM ${offset 7}$color$mem / $memmax ${offset 7}${color 0CACF0}${membar 10,60 }${offset 30}${color 27AE60}Kernel ${offset 7}$color$kernel${offset 30}${color 27AE60}Uptime ${offset 7}$color$uptime_short${offset 30}${color 27AE60}Updates ${offset 7}$color${exec pacman -Qu | wc -l}${offset 30}${color 27AE60}Total Sent ${offset 7}$color${totalup wlp2s0}${offset 30}${color 27AE60}Total Received ${offset 7}$color${totaldown wlp2s0}${offset 30}${color 27AE60}Public IP ${offset 7}$color${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]|.]//g'}${offset 30}${color 27AE60}NFS ${offset 7}$color${fs_used /mnt/asmt-nfs} / ${fs_size /mnt/asmt-nfs} ${offset 7}${color f8f800}${fs_bar 10,60 /mnt/asmt-nfs}${offset 30}${color 27AE60}CPU ${offset 7}$color${cpu cpu0}% / ${execi 30 sensors | grep 'Core 0:' | cut -c16-18}°C ${offset 7}${color CF2765}${cpubar 10,60}


After a few little tweaks here and there.

use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_colour 000000
own_window_argb_visual yes
own_window_argb_value 0

double_buffer yes
minimum_size 1500 150
maximum_width 1860
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color red
default_outline_color green
alignment bottom_left
gap_x 30
gap_y 70
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer yes

TEXT
${voffset 5}${color 697986}${font Cantarell Light:pixelsize=120}${time %H}${voffset -50}${offset 10}${font Cantarell Light:size=64}${time %M}${font}${voffset -50}${offset 60}${font Cantarell:pixelsize=46}${time %d} ${voffset -15}${color 697986}${font Ubuntu:pixelsize=22}${time  %B} ${time %Y}${font}${voffset 15}${font Ubuntu:pixelsize=58}${offset -245}${time %A}${font}

${voffset 15}${offset 10}${font Ubuntu:pixelsize=12}${color 27AE60}HOME ${offset 7}$color${fs_used /} / ${fs_size /} ${offset 7}${color 19BD9B}${fs_bar 10,60 /}${offset 30}${color 27AE60}RAM ${offset 7}$color$mem / $memmax ${offset 7}${color 0CACF0}${membar 10,60 }${offset 30}${color 27AE60}Kernel ${offset 7}$color$kernel${offset 30}${color 27AE60}Uptime ${offset 7}$color$uptime_short${offset 30}${color 27AE60}Updates ${offset 7}$color${exec pacman -Qu | wc -l}${offset 30}${color 27AE60}Total Sent ${offset 7}$color${totalup wlp2s0}${offset 30}${color 27AE60}Total Received ${offset 7}$color${totaldown wlp2s0}${offset 30}${color 27AE60}Public IP ${offset 7}$color${execi 3600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]|.]//g'}${offset 30}${color 27AE60}NFS ${offset 7}$color${fs_used /mnt/asmt-nfs} / ${fs_size /mnt/asmt-nfs} ${offset 7}${color f8f800}${fs_bar 10,60 /mnt/asmt-nfs}${offset 30}${color 27AE60}CPU ${offset 7}$color${cpu cpu0}% / ${execi 30 sensors | grep 'Core 0:' | cut -c16-18}°C ${offset 7}${color CF2765}${cpubar 10,60}

Awesome April First (2018) Screenshots
#173

You write HOME but show the size of / (root). Did you mean to do that or is it a mistake?


#174

Oh I have just 1 encrypted partition for Manjaro - it’s home and root at the same time (except EFI @ /boot/efi). Even swap is located in / as a swapfile. Given that for me it’s rather Home than Root :wink:


#175

Question for the conky experts here: does anyone have a music-details script (e.g. showing artist, album, track, time elapsed, album art) that works with Lollypop?

I’ve got scripts that work with clementine, moc, guayadeque respectively, and the clementine one actually states that it works with any mpris-compatible player (just change the command to the name of corresponding media player), but I can’t get it to work with lollypop.

Any help would be appreciated, either by pointing me to a script that works, or advice on how to make the conky-card script work with lollypop.


#176

Slight update to the one posted above.

conky.config = {
  own_window = true,
  own_window_type = 'desktop',
  own_window_transparent = true,
  own_window_colour = '222222',
  alignment = 'top_right',
  gap_x = 10,
  gap_y = 0,
  minimum_width = 225,
  maximum_width = 225,
  use_xft = true,
--  font = 'Cantarell:size=10',
  font = 'VeraMoBd:size=10',
  override_utf8_locale = true,
  draw_shades = false,
  default_shade_color = '000000',
  draw_outline = false,
  default_outline_color = '000000',
  color2 = 'ededed',
  color3 = '109567',
  cpu_avg_samples = 2,
  default_color = 'bbbbbb',
  draw_borders = false,
  stippled_borders = 5,
  border_inner_margin = 15,
  border_outer_margin = 0,
  border_width = 1,
  background = true,
  no_buffers = true,
  imlib_cache_size = 0,
  temperature_unit = 'fahrenheit',
  double_buffer = true,
  update_interval = 1,
}

conky.text = [[
${voffset 8}$color${font Cantarell:size=16}${time %A}$font${voffset -8}$alignr$color3${font Cantarell:size=38}${time %e}$font
$color${voffset -30}$color${font Cantarell:size=18}${time %B}$font${voffset -3} $color${font Cantarell:size=20}${time %Y}$font

$color3${font Cantarell:size=10:bold}SYSTEM$color$font
${voffset -8}${hr 2}
${color}Kernel$alignr$color2$kernel
${color}Uptime$alignr$color2$uptime
# ${color}CPU Frequency$alignr$color2${freq_g} GHz
# ${color}CPU Temperature$alignr$color2${hwmon temp 1} Degrees
${color}Running Processes$color2$alignr$running_processes of $processes
${color}Average Load$alignr$color2$loadavg
$color${voffset -5}${hr 2}
${color}${freq_g 1} GHz ${cpubar cpu1 4,120}$alignr${color2}${cpu cpu1}%
${color}${freq_g 2} GHz ${cpubar cpu2 4,120}$alignr${color2}${cpu cpu2}%
${color}${freq_g 3} GHz ${cpubar cpu3 4,120}$alignr${color2}${cpu cpu3}%
${color}${freq_g 4} GHz ${cpubar cpu4 4,120}$alignr${color2}${cpu cpu4}%
$color${voffset -5}${hr 2}

# $color3${font Cantarell:size=10:bold}CPU$alignr$color$font$cpu%
$color3${font Cantarell:size=10:bold}CPU$font      $color2${freq_g}$color GHz      $color2${hwmon temp 1}$color° F $alignr$color$font$cpu%
$color2${cpubar 4}
$color2${top name 1}$alignr$color${top cpu 1}%
$color2${top name 2}$alignr$color${top cpu 2}%
$color2${top name 3}$alignr$color${top cpu 3}%
$color2${top name 4}$alignr$color${top cpu 4}%
$color2${top name 5}$alignr$color${top cpu 5}%
$color2${top name 6}$alignr$color${top cpu 6}%
$color2${top name 7}$alignr$color${top cpu 7}%
$color2${top name 8}$alignr$color${top cpu 8}%
# $color2${top name 9}$alignr$color${top cpu 9}%
# $color2${top name 10}$alignr$color${top cpu 10}%

$color3${font Cantarell:size=10:bold}RAM$font$alignr$color2$mem$color of $color2$memmax $color- $memperc%
$color2${membar 4}
$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
$color2${top_mem name 5}$alignr$color${top_mem mem_res 5}
$color2${top_mem name 6}$alignr$color${top_mem mem_res 6}
$color2${top_mem name 7}$alignr$color${top_mem mem_res 7}
$color2${top_mem name 8}$alignr$color${top_mem mem_res 8}
# $color2${top_mem name 9}$alignr$color${top_mem mem_res 9}
# $color2${top_mem name 10}$alignr$color${top_mem mem_res 10}

$color3${font Cantarell:size=10:bold}DISK USAGE$color$font
${voffset -8}${hr 2}
Manjaro $alignr$color2${fs_used /} ${color}of${color2} ${fs_size /} $color- ${fs_used_perc /}%
${fs_bar 4 /}
TV $alignr$color2${fs_used /mnt/Television} ${color}of${color2} ${fs_size /mnt/Television} $color- ${fs_used_perc /mnt/Television}%
${fs_bar 4 /mnt/Television}
Movies $alignr$color2${fs_used /mnt/Movies} ${color}of${color2} ${fs_size /mnt/Movies} $color- ${fs_used_perc /mnt/Movies}%
${fs_bar 4 /mnt/Movies}
Storage $alignr$color2${fs_used /mnt/Storage} ${color}of${color2} ${fs_size /mnt/Storage} $color- ${fs_used_perc /mnt/Storage}%
${fs_bar 4 /mnt/Storage}
DVDs $alignr$color2${fs_used /mnt/DVDs} ${color}of${color2} ${fs_size /mnt/DVDs} $color- ${fs_used_perc /mnt/DVDs}%
${fs_bar 4 /mnt/DVDs}
4TB $alignr$color2${fs_used /mnt/4TB} ${color}of${color2} ${fs_size /mnt/4TB} $color- ${fs_used_perc /mnt/4TB}%
${fs_bar 4 /mnt/4TB}
Old-TV $alignr$color2${fs_used /mnt/Old-TV} ${color}of${color2} ${fs_size /mnt/Old-TV} $color- ${fs_used_perc /mnt/Old-TV}%
${fs_bar 4 /mnt/Old-TV}
Swap $alignr$color2$swap ${color}of${color2} $swapmax $color- $swapperc%
${swapbar 4}
]]