SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-15 03:47:01

So I took a break from one project to start a new one, I made a game call table golf... I know the name sucks. It is a mix of pong / table tennis and golf, I decided I should try something simple and one player. So far I have spent the last 3 days or so working on it and I have the table, paddle, ball and a test level made. I thought I would share this with you all so that everyone can try it if they want and give any feed back or level ideas they had.

I doubt that the makers of conky had ever thought that it would be a good idea to try and turn conky into a game or even made it so that conky can properly handle a game inside it, but I thought I would try.

2013_04_14_1365995513_613x512_scrot.jpg
and if you want to see it in action before attempting it I have a video, only thing that sucks about it is, the video is .ogv and seems to lag and I can't seem to get around that when using recordmydesktop. (if anyone knows a better program I would love to hear about it)
Download Link

one last thing, this lua need my button functions so you will need my aon_button.lua or aon_tables_and_buttons.lua
aon_table_golf.lua

--this lua script for use in conky
require 'cairo'

function conky_main()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates==4 then
--#################################################################
--#################################################################
--#################################################################
info_table={}
paddle_positions={}
for i = 1,10 do paddle_positions[i]=40*(i-1) end
if info_table["x"] == nil then info_table["x"]=0 end
if info_table["y"] == nil then info_table["y"]=0 end
if info_table["move_x"] == nil then info_table["move_x"]=0 end
if info_table["move_y"] == nil then info_table["move_y"]=0 end
if info_table["player"] == nil then info_table["player"]=3 end
if info_table["level"] == nil then info_table["level"]=1 end
--#################################################################
--#################################################################
--#################################################################
end
if updates>=5 then
--#################################################################
--#################################################################
--#################################################################
button_count("paddle_position",0,0,0,0,1,10)
if info_table["start"] == nil then
info_table["paddle_x"]=100
info_table["paddle_y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
info_table["start"]=0
end
if button_status("Gutter") == nil then Gutter=1 else Gutter=button_status("Gutter") end
--#################################################################
-- board ##########################################################
--#################################################################
cairo_set_line_width(cr,1)
cairo_rectangle(cr,60,60,500,400)
cairo_set_source_rgba(cr,0,.7,.2,1)
cairo_fill(cr)
if Gutter == 1 then
cairo_rectangle(cr,60,60,40,400)
cairo_set_source_rgba(cr,.5,.5,.5,.5)
cairo_fill(cr)
end
cairo_set_line_width(cr,6)
cairo_rectangle(cr,60,60,500,400)
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_stroke(cr)
--#################################################################
-- scoreboard #####################################################
--#################################################################
if info_table["player"] <= 0 then
info_table["x"]=140
info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
info_table["move_x"]=0
info_table["move_y"]=0
info_table["player"]=3
info_table["start"]=0
button_override("start",0)
end
--#################################################################
cairo_move_to(cr,60,35)
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,20)
cairo_show_text(cr,"Player lives: "..info_table["player"].."")
cairo_stroke(cr)
-- paddle positions / controls ####################################
--#################################################################
-- paddle positions
--for i = 1,10 do cairo_set_line_width(cr,2) ; cairo_rectangle(cr,info_table["paddle_x"],(60+paddle_positions[i]),10,40) ; cairo_set_source_rgba(cr,1,1,1,1) ; cairo_stroke(cr) end
button_make("up_arrow",250,475,20,20)
button_draw(250,475,20,20,{1,1,1,1},0,{.5,.5,.5,1})
if button_status("up_arrow") == 1 then
if button_count_status("paddle_position") > 1 then
button_count_override("paddle_position",(button_count_status("paddle_position")-1))
info_table["paddle_y"]=(60+paddle_positions[(button_count_status("paddle_position"))])
button_override("up_arrow",0)
end end
button_make("down_arrow",350,475,20,20)
button_draw(350,475,20,20,{1,1,1,1},0,{.5,.5,.5,1})
if button_status("down_arrow") == 1 then
if button_count_status("paddle_position") < 10 then
button_count_override("paddle_position",(button_count_status("paddle_position")+1))
info_table["paddle_y"]=(60+paddle_positions[(button_count_status("paddle_position"))])
button_override("down_arrow",0)
end end
button_make("up_step",275,475,20,20)
button_draw(275,475,20,20,{1,1,1,1},0,{.5,.5,.5,1})
if button_status("up_step") == 1 then
if button_count_status("paddle_position") > 1 then
info_table["paddle_y"]=info_table["paddle_y"]-10
button_override("up_step",0)
end end
button_make("down_step",325,475,20,20)
button_draw(325,475,20,20,{1,1,1,1},0,{.5,.5,.5,1})
if button_status("down_step") == 1 then
if button_count_status("paddle_position") < 10 then
info_table["paddle_y"]=info_table["paddle_y"]+10
button_override("down_step",0)
end end
paddle((info_table["paddle_x"]),(info_table["paddle_y"]))
button_make("start",290,475,20,20)
if button_status("start") == 0 then
button_draw(300,475,20,20,{.25,.25,.25,1},1,{1,0,0,1})
else
info_table["start"]=1
end
down1_x=360
down1_y=475
down2_x=335
down2_y=475
up1_x=260
up1_y=475
up2_x=285
up2_y=475
ie=10
for i=1,ie do
--down1 arrow
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down1_x-ie)+i),(down1_y+i))
cairo_line_to(cr,down1_x,(down1_y+ie))
cairo_line_to(cr,((down1_x+ie)-i),(down1_y+i))
cairo_line_to(cr,down1_x,((down1_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.5,.5,.5,((1/ie)*i))
cairo_stroke(cr)
--down2 arrow
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down2_x-ie)+i),(down2_y+i))
cairo_line_to(cr,down2_x,(down2_y+ie))
cairo_line_to(cr,((down2_x+ie)-i),(down2_y+i))
cairo_line_to(cr,down2_x,((down2_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,1,1,1,((1/ie)*i))
cairo_stroke(cr)
--up1 arrow
cairo_move_to(cr,up1_x,(up1_y+i))
cairo_line_to(cr,((up1_x-ie)+i),((up1_y+(ie*2))-i))
cairo_line_to(cr,up1_x,(up1_y+ie))
cairo_line_to(cr,((up1_x+ie)-i),((up1_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.5,.5,.5,((1/ie)*i))
cairo_stroke(cr)
--up2 arrow
cairo_move_to(cr,up2_x,(up2_y+i))
cairo_line_to(cr,((up2_x-ie)+i),((up2_y+(ie*2))-i))
cairo_line_to(cr,up2_x,(up2_y+ie))
cairo_line_to(cr,((up2_x+ie)-i),((up2_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,1,1,1,((1/ie)*i))
cairo_stroke(cr)
end
--#################################################################
-- ball ###########################################################
--#################################################################
if info_table["start"] == 0 then
info_table["x"]=(info_table["paddle_x"]+40)
info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
end
if info_table["start"] == 1 then
if info_table["move_x"] == 0 then info_table["move_x"]=20 end
--if ball is in border
if info_table["x"] > 60 and info_table["y"] > 60 and info_table["x"] < 560 and info_table["y"] < 460 then
	info_table["x"]=info_table["x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]-info_table["move_y"]
	else
	info_table["x"]=140
	info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
	info_table["move_x"]=0
	info_table["move_y"]=0
end
--if ball hits paddle
if info_table["x"] >= info_table["paddle_x"] 	and info_table["x"] <= (info_table["paddle_x"]+20) 	and info_table["y"] >= info_table["paddle_y"] 		and info_table["y"] <= (info_table["paddle_y"]+9) then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
		if info_table["move_y"] == 0 then info_table["move_y"]=20 end
	info_table["y"]=info_table["y"]-info_table["move_y"]--info_table["move_y"]
end
if info_table["x"] >= info_table["paddle_x"] 	and info_table["x"] <= (info_table["paddle_x"]+20) 	and info_table["y"] >= (info_table["paddle_y"]+10) 	and info_table["y"] <= (info_table["paddle_y"]+29) then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]
end
if info_table["x"] >= info_table["paddle_x"] 	and info_table["x"] <= (info_table["paddle_x"]+20) 	and info_table["y"] >= (info_table["paddle_y"]+30) 	and info_table["y"] <= (info_table["paddle_y"]+40) then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
		if info_table["move_y"] == 0 then info_table["move_y"]=20 end
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
end
--if ball goes past paddle
if Gutter == 1 then
if info_table["x"] < info_table["paddle_x"] and info_table["y"] < info_table["paddle_y"] then
	info_table["player"]=info_table["player"]-1
	info_table["x"]=140
	info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
	info_table["move_x"]=0
	info_table["move_y"]=0
	button_override("start",0)
	info_table["start"]=0
end
if info_table["x"] < info_table["paddle_x"] and info_table["y"] > (info_table["paddle_y"]+30) then
	info_table["player"]=info_table["player"]-1
	info_table["x"]=140
	info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
	info_table["move_x"]=0
	info_table["move_y"]=0
	button_override("start",0)
	info_table["start"]=0
end
end--gutter
--if ball hits sides
if info_table["x"] <= 60 or info_table["x"] >= 560 then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]
end
if info_table["y"] <= 60 or info_table["y"] >= 460 then
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
end
end--if start = 1
if info_table["level"] == 1 then level_one() end
ball(info_table["x"],info_table["y"])
--#################################################################
-- menu ###########################################################
--#################################################################
button_make("menu",10,475,40,20)
button_draw(10,475,40,20,{.5,.5,.5,1},1,{.25,.25,.25,1})
cairo_move_to(cr,12,491)
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"Menu")
cairo_stroke(cr)
if button_status("menu") == 1 then
cairo_set_line_width(cr,2)
cairo_rectangle(cr,10,405,100,70)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
text={"Restart","Reset","Help","Gutter","Level 0"
}
for i = 1,#text do
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,13)
cairo_move_to(cr,12,(470-((i-1)*13)))
cairo_show_text(cr,text[i])
cairo_stroke(cr)
button_make(text[i],95,(462-((i-1)*13)),10,10)
if button_status(text[i]) == 0 then
button_draw(95,(462-((i-1)*13)),10,10,{.8,.8,.8,1},1,{0,0,0,1})
else
button_draw(95,(462-((i-1)*13)),10,10,{.8,.8,.8,1},1,{1,0,0,1})
end--if
end--for
if button_status("Restart") == 1 then
info_table["x"]=140
info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
info_table["move_x"]=0
info_table["move_y"]=0
info_table["start"]=0
button_override("start",0)
button_override("Restart",0)
end--restart
if button_status("Reset") == 1 then info_table["player"]=0 ; button_override("Reset",0) end
if button_status("Help") == 1 then
cairo_set_line_width(cr,2)
cairo_rectangle(cr,215,100,200,175)
cairo_set_source_rgba(cr,.9,.9,.9,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
cairo_set_line_width(cr,2)
cairo_rectangle(cr,220,105,30,165)
cairo_set_source_rgba(cr,0,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
up1_x=235
up1_y=110
up2_x=235
up2_y=130
down2_x=235
down2_y=155
down1_x=235
down1_y=175
ie=10
for i=1,ie do
--down1 arrow
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down1_x-ie)+i),(down1_y+i))
cairo_line_to(cr,down1_x,(down1_y+ie))
cairo_line_to(cr,((down1_x+ie)-i),(down1_y+i))
cairo_line_to(cr,down1_x,((down1_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.5,.5,.5,((1/ie)*i))
cairo_stroke(cr)
--down2 arrow
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down2_x-ie)+i),(down2_y+i))
cairo_line_to(cr,down2_x,(down2_y+ie))
cairo_line_to(cr,((down2_x+ie)-i),(down2_y+i))
cairo_line_to(cr,down2_x,((down2_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,1,1,1,((1/ie)*i))
cairo_stroke(cr)
--up1 arrow
cairo_move_to(cr,up1_x,(up1_y+i))
cairo_line_to(cr,((up1_x-ie)+i),((up1_y+(ie*2))-i))
cairo_line_to(cr,up1_x,(up1_y+ie))
cairo_line_to(cr,((up1_x+ie)-i),((up1_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.5,.5,.5,((1/ie)*i))
cairo_stroke(cr)
--up2 arrow
cairo_move_to(cr,up2_x,(up2_y+i))
cairo_line_to(cr,((up2_x-ie)+i),((up2_y+(ie*2))-i))
cairo_line_to(cr,up2_x,(up2_y+ie))
cairo_line_to(cr,((up2_x+ie)-i),((up2_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,1,1,1,((1/ie)*i))
cairo_stroke(cr)
end
cairo_set_line_width(cr,2)
cairo_rectangle(cr,225,197,20,20)
cairo_set_source_rgba(cr,1,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
cairo_rectangle(cr,225,220,20,20)
cairo_set_source_rgba(cr,0,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_stroke(cr)
cairo_rectangle(cr,225,243,20,20)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_stroke(cr)
t={"Up one jump","Use high side","Use low side","Down one jump","Start Button","Hole","Bumper"
}
for i = 1,#t do
cairo_set_source_rgba(cr,0,0,0,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_move_to(cr,260,(124+((i-1)*22.5)))
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end--for
end
if button_status("Level 0") == 1 then info_table["level"]=0 else info_table["level"]=1 end
end--if
--#################################################################
--#################################################################
--#################################################################
print("paddle:","X:"..info_table["paddle_x"].."","Y:"..info_table["paddle_y"].."")
print("ball:","X:"..info_table["x"].."","Y:"..info_table["y"].."")
--#################################################################
--#################################################################
--#################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return""
end-- end main function
--#################################################################
--#################################################################
--#################################################################
function paddle(x,y)
cairo_set_line_width(cr,2)
cairo_rectangle(cr,x,y,10,10)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
cairo_rectangle(cr,x,(y+10),10,20)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_fill(cr)
cairo_rectangle(cr,x,(y+30),10,10)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
cairo_rectangle(cr,x,y,10,40)
cairo_set_source_rgba(cr,.2,.2,.2,1)
cairo_stroke(cr)
end
function ball(x,y)
cairo_set_line_width(cr,2)
cairo_rectangle(cr,x,y,10,10)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_fill(cr)
end
function level_one()
--bumper1
cairo_set_line_width(cr,2)
cairo_rectangle(cr,240,220,80,80)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_stroke(cr)
--left
if info_table["x"] >= 240 and info_table["x"] <= 260 and info_table["y"] >= 240 and info_table["y"] <= 280 then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,240,240,20,40)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--bottom
if info_table["x"] >= 260 and info_table["x"] <= 300 and info_table["y"] >= 280 and info_table["y"] <= 300 then
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,260,280,40,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--right
if info_table["x"] >= 300 and info_table["x"] <= 320 and info_table["y"] >= 240 and info_table["y"] <= 280 then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,300,240,20,40)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--top
if info_table["x"] >= 260 and info_table["x"] <= 300 and info_table["y"] >= 220 and info_table["y"] <= 240 then
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,260,220,40,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--bumper2
cairo_set_line_width(cr,2)
cairo_rectangle(cr,400,100,40,60)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_stroke(cr)
--left
if info_table["x"] >= 400 and info_table["x"] <= 420 and info_table["y"] >= 120 and info_table["y"] <= 140 then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,400,120,20,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--bottom
if info_table["x"] >= 400 and info_table["x"] <= 420 and info_table["y"] >= 140 and info_table["y"] <= 160 then
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,400,140,20,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--right
if info_table["x"] >= 420 and info_table["x"] <= 440 and info_table["y"] >= 120 and info_table["y"] <= 140 then
	info_table["move_x"]=info_table["move_x"]*(-1)
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,420,120,20,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--top
if info_table["x"] >= 400 and info_table["x"] <= 440 and info_table["y"] >= 100 and info_table["y"] <= 120 then
	info_table["x"]=info_table["x"]-info_table["move_x"]-info_table["move_x"]
	info_table["move_y"]=info_table["move_y"]*(-1)
	info_table["y"]=info_table["y"]-info_table["move_y"]
cairo_set_line_width(cr,2)
cairo_rectangle(cr,400,100,20,20)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end
--hole
cairo_set_line_width(cr,2)
cairo_rectangle(cr,450,100,50,50)
cairo_set_source_rgba(cr,0,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,1,1,1,1)
cairo_stroke(cr)
if info_table["x"] >= 450 and info_table["x"] <= 500 and info_table["y"] >= 100 and info_table["y"] <= 150 then
info_table["x"]=140
info_table["y"]=(60+(paddle_positions[(button_count_status("paddle_position"))]))
info_table["move_x"]=0
info_table["move_y"]=0
info_table["player"]=info_table["player"]+1
--info_table["level"]=info_table["level"]+1
button_override("start",0)
info_table["start"]=0
end
end--function

aon_buttons.lua

--[[
function button_make
function button_draw
function clickfunction
are all from mrpeacy's clicky.lua, I have only modified the code
]]
require 'cairo'

function conky_buttons ()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates == 3 then
--######################################################################
--######################################################################
--######################################################################
buttons={}
click_start=1
end-- updates == 4
--######################################################################
--######################################################################
--######################################################################
if updates > 5 then
--buttons={}
localx,localy,localnowx,localnowy=clickfunction()--dont edit
--######################################################################
--######################################################################
--######################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
--######################################################################
--######################################################################
--######################################################################
function button_make(name,tlx,tly,width,height)
if buttons[""..(name).."_button"]==nil then buttons[""..(name).."_button"]=0 end
--calculate if click was inside box
if localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"]~=1 then
buttons[""..(name).."_button"]=1
elseif localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"]==1 then
buttons[""..(name).."_button"]=0
end
end--function
--######################################################################
--######################################################################
--######################################################################
function button_count(name,tlx,tly,width,height,max_value)
if buttons[""..(name).."_count"]==nil then buttons[""..(name).."_count"]=1 end
if (max_value) == nil then max_value=1 end
--calculate if click was inside box
if localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_count"] ~= max_value then
buttons[""..(name).."_count"]=(buttons[""..(name).."_count"])+1
elseif localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_count"] == max_value then
buttons[""..(name).."_count"]=1 end
end--function
--######################################################################
--######################################################################
--######################################################################
function button_draw(tlx,tly,width,height,color,fill,fill_color)
cairo_set_line_width (cr,2)
cairo_rectangle (cr,tlx,tly,width,height)
if fill == 1 then
cairo_set_source_rgba (cr,fill_color[1],fill_color[2],fill_color[3],fill_color[4])
cairo_fill_preserve(cr)
end
cairo_set_source_rgba (cr,color[1],color[2],color[3],color[4])
cairo_stroke (cr)
end--function
--######################################################################
--######################################################################
--######################################################################
function button_status(name)
return buttons[""..(name).."_button"]
end--function
--######################################################################
--######################################################################
--######################################################################
function button_count_status(name)
return buttons[""..(name).."_count"]
end--function
--######################################################################
--######################################################################
--######################################################################
function button_override(name,value)
buttons[""..(name).."_button"]=(value)
end--function
--######################################################################
--######################################################################
--######################################################################
function button_count_override(name,value)
buttons[""..(name).."_count"]=(value)
end--function
--######################################################################
--######################################################################
--######################################################################
function kill_button(name,tlx,tly,process,pid,reset,reset_inpute)
button_make(""..name.."1",tlx,tly,40,20)
if (button_status(""..name.."1")) == 1 then
buttons[""..name.."_process"]=process
buttons[""..name.."_pid"]=pid
button_override(""..name.."1",2)
end
if (button_status(""..name.."1")) == 0 then
button_draw(tlx,tly,40,20,{.5,.5,.5,1},1,{.25,.25,.25,.5})
cairo_move_to(cr,(tlx+1),(tly+15))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"kill")
cairo_stroke(cr)
elseif (button_status(""..name.."1")) == 2 then
cairo_set_line_width(cr,2)
cairo_rectangle(cr,tlx,tly,265,50)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_stroke(cr)
x={1,57}
t={"Are you sure you want to kill",""..buttons[""..name.."_process"]..""..buttons[""..name.."_pid"]..""}
for i = 1,2 do
cairo_move_to(cr,(tlx+x[i]),(tly+(i*15)))
cairo_set_source_rgba(cr,0,0,0,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
button_make(""..name.."2",(tlx+20),(tly+30),40,20)
cairo_move_to(cr,(tlx+21),(tly+45))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"kill")
cairo_stroke(cr)
button_make(""..name.."3",(tlx+200),(tly+30),50,20)
cairo_move_to(cr,(tlx+202),(tly+45))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"Close")
cairo_stroke(cr)
if (button_status(""..name.."3")) == 1 then
button_override(""..name.."3",0)
button_override(""..name.."2",0)
button_override(""..name.."1",0)
end
if (button_status(""..name.."2")) == 1 then
os.execute("kill "..buttons[""..name.."_pid"].."")
button_override(""..name.."1",0)
button_override(""..name.."2",0)
end--if (button_status(""..name.."2")) == 1 then
end--if (button_status(""..name.."1")) == 0 then
end--function
--######################################################################
--######################################################################
--######################################################################
function clickfunction(conky_name)
--start click logging and calculations ##########################################
if click_start==1 then
xdot=conky_parse("${if_running xdotool}1${else}0${endif}")
if tonumber(xdot)==1 then
os.execute("killall xdotool && echo 'xdo killed' &")
end
os.execute("xdotool search --name '"..conky_name.."' behave %@ mouse-click getmouselocation >> /tmp/xdo &")
local f = io.popen("xwininfo -name '"..conky_name.."' | grep 'Absolute'")
geometry = f:read("*a")
f:close()
local geometry=string.gsub(geometry,"[\n]","")
s,f,abstlx=string.find(geometry,"X%p%s*(%d*)")
s,f,abstly=string.find(geometry,"Y%p%s*(%d*)")
click_start=nil
end--if click_start=1 ######################################
--click calculations #################################
local f=io.open("/tmp/xdo")
click=f:read()
f:close()
if click~=nil then
local f = io.open("/tmp/xdo","w")
f:write("")
f:close()
end--if click=nil
if click==nil then click="x:0 y:0 " end
--print (click)
local s,f,mousex=string.find(click,"x%p(%d*)%s")
local s,f,mousey=string.find(click,"y%p(%d*)%s")
localx=tonumber(mousex)-abstlx
localy=tonumber(mousey)-abstly
--get now location
os.execute("xdotool getmouselocation > /tmp/xdonow ")
local f=io.open("/tmp/xdonow")
mousenow=f:read()
f:close()
local s,f,mousenowx=string.find(mousenow,"x%p(%d*)%s")
local s,f,mousenowy=string.find(mousenow,"y%p(%d*)%s")
localnowx=tonumber(mousenowx)-abstlx
localnowy=tonumber(mousenowy)-abstly
--END CLICK CALCULATIONS #################################
return localx,localy,localnowx,localnowy
end--function

#2 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-07 21:17:01

Sector11 wrote:
mrpeachy wrote:
Sector11 wrote:

This is my current setup
http://t.imgbox.com/adsqO1HT.jpg
1920x1080

looking good sector11 big_smile
i have been out of the conky game for a while so it is good to see stuff of mine still being useful!

Thank you.

Useful?  Oh my.  Your "stuff" as you call it is is still up there on the top 10!  big_smile

Hope you make it back soon.

I agree

#3 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-07 21:08:47

@ lionhead you just need to make something that an if statement can read a changing value from like 1 or 0
internet switch is easy and straight forward "string=conky_parse("${if_gw}1${else}0${endif}")"
the external drive is a little harder to come up with do to conky not willing to work with drives that have spaces in their names. there are ways around this, but not that are straight forward as a drive that has no spaces in it's name.
drive with no spaces: string=conky_parse("${if_existing /path/to/drive}1${else}0${endif}")
drive with spaces:
     way 1: mypeachy's mount.lua then you just need to do something like this,

for i=1,(conky_mount(1,"total")) do if (conky_mount(i,"mount")) == "path/to/drive" then string=1 else string=0 end end

     way 2: create a link in the folder your dive is mounted call something, connected to the drive and make a hidden file in your drive that you will never delete. "string=conky_parse("${if_existing /path/to/file}1${else}0${endif}

sorry if I made a typo

#4 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-06 21:20:19

@dobbie03
hwmon numbers the modules that monitor so coretemp-isa-0000 should be the "0" and "temp 1" is the first temp that reports back, all you need to do is change the aug to  something like "1 temp 1" to get the next temp and so on.

but you should also be able to use the same lines you use in conky to get the temps like this one,

"${execp sensors coretemp-isa-0000 | grep 'Core 0' | cut -c16-17}"

in rings it would be
name='execp'
aug='sensors coretemp-isa-0000 | grep 'Core 0' | cut -c16-17'

#5 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-06 20:38:44

@dobbie03 I will venture a guess that says.

I noticed that your cpu rings have a 375 max, this not 100, so you must want the ring to be shorter than the 270 degrees it is. The temp ring can be set up the same way, with a max of say 150, your temp will never reach the end... well if it does than you might have a problem other than your conky.

#6 Re: Tips, Tricks & Scripts » Help with temperatures and lua rings » 2013-04-06 19:51:19

Post in here "The New Moster Conky Thread" and you can get some help, also posting the configs when you get there.

#7 Re: Tips, Tricks & Scripts » interactive conky » 2013-04-05 17:22:50

thought I would toss in my buttons.lua i tried to make this as simple as possible. Starting form mrpeachy's work I stripped it down it's individual parts clickfunction, button_make and button_draw. Then added status, override and count, the newest addition that I made was for a top list that I was building. I made a kill button, very simple, just holds the name and pid of a process for you while you decide if you want to kill it or not. I figure that I would post all of my button codes for anyone that wants it.
2013_04_05_1365181932_114x126_scrot.png2013_04_05_1365182077_336x134_scrot.png

--Remember your "own_window_title clicky" line in conky
require 'cairo'

function conky_buttons ()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates == 3 then
--######################################################################
--######################################################################
--######################################################################
buttons={}
click_start=1
alternating_table={}
end-- updates == 4
--######################################################################
--######################################################################
--######################################################################
if updates > 5 then
--buttons={}
localx,localy,localnowx,localnowy=clickfunction()--dont edit
--alternating_table={}
if updates > 5 then if alternating_table[3] == 1 then alternating=-1 else if alternating_table[3] == -1 then alternating=1 end end end
for i = 1,3 do
if alternating_table[i+1]==nil then alternating_table[i+1]=1 end
alternating_table[i]=alternating_table[i+1]
if i==3 then alternating_table[i]=alternating end
if alternating_table[3] == nil then alternating_table[3]=1 end
end
--######################################################################
--######################################################################
--######################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
--######################################################################
--######################################################################
--######################################################################
function button_make(name,tlx,tly,width,height)
if buttons[""..(name).."_button"]==nil then buttons[""..(name).."_button"]=0 end
--calculate if click was inside box
if localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"]~=1 then
buttons[""..(name).."_button"]=1
elseif localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"]==1 then
buttons[""..(name).."_button"]=0
end
end--function
--######################################################################
--######################################################################
--######################################################################
function button_count(name,tlx,tly,width,height,max_value)
if buttons[""..(name).."_button"]==nil then buttons[""..(name).."_button"]=0 end
--calculate if click was inside box
if localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"] ~= (max_value) then
buttons[""..(name).."_button"]=(buttons[""..(name).."_button"])+1
elseif localx>=(tlx) and localx<=(tlx)+(width) and localy>=(tly) and localy<=(tly)+(height) and buttons[""..(name).."_button"] == (max_value) then
buttons[""..(name).."_button"]=0 end
end--function
--######################################################################
--######################################################################
--######################################################################
function button_status(name)
return buttons[""..(name).."_button"]
end--function
--######################################################################
--######################################################################
--######################################################################
function button_override(name,value)
buttons[""..(name).."_button"]=(value)
end--function
--######################################################################
--######################################################################
--######################################################################
function button_draw(tlx,tly,width,height,color,fill,fill_color)
cairo_set_line_width (cr,2)
cairo_rectangle (cr,tlx,tly,width,height)
if fill == 1 then
cairo_set_source_rgba (cr,fill_color[1],fill_color[2],fill_color[3],fill_color[4])
cairo_fill_preserve(cr)
end
cairo_set_source_rgba (cr,color[1],color[2],color[3],color[4])
cairo_stroke (cr)
end--function
--######################################################################
--######################################################################
--######################################################################
function kill_button(name,tlx,tly,process,pid,reset,reset_inpute)
button_make(""..name.."1",tlx,tly,40,20)
if (button_status(""..name.."1")) == 1 then
buttons[""..name.."_process"]=process
buttons[""..name.."_pid"]=pid
button_override(""..name.."1",2)
end
if (button_status(""..name.."1")) == 0 then
button_draw(tlx,tly,40,20,{.5,.5,.5,1},1,{.25,.25,.25,.5})
cairo_move_to(cr,(tlx+1),(tly+15))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"kill")
cairo_stroke(cr)
elseif (button_status(""..name.."1")) == 2 then
cairo_set_line_width(cr,2)
cairo_rectangle(cr,tlx,tly,265,50)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.25,.25,.25,1)
cairo_stroke(cr)
x={1,57}
t={"Are you sure you want to kill",""..buttons[""..name.."_process"]..""..buttons[""..name.."_pid"]..""}
for i = 1,2 do
cairo_move_to(cr,(tlx+x[i]),(tly+(i*15)))
cairo_set_source_rgba(cr,0,0,0,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
button_make(""..name.."2",(tlx+20),(tly+30),40,20)
cairo_move_to(cr,(tlx+21),(tly+45))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"kill")
cairo_stroke(cr)
button_make(""..name.."3",(tlx+200),(tly+30),50,20)
cairo_move_to(cr,(tlx+202),(tly+45))
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,15)
cairo_show_text(cr,"Close")
cairo_stroke(cr)
if (button_status(""..name.."3")) == 1 then
button_override(""..name.."3",0)
button_override(""..name.."2",0)
button_override(""..name.."1",0)
end
if (button_status(""..name.."2")) == 1 then
os.execute("kill "..buttons[""..name.."_pid"].."")
button_override(""..name.."1",0)
button_override(""..name.."2",0)
end--if (button_status(""..name.."2")) == 1 then
end--if (button_status(""..name.."1")) == 0 then
end--function
--######################################################################
--######################################################################
--######################################################################
function clickfunction()
--start click logging and calculations ##########################################
if click_start==1 then
xdot=conky_parse("${if_running xdotool}1${else}0${endif}")
if tonumber(xdot)==1 then
os.execute("killall xdotool && echo 'xdo killed' &")
end
os.execute("xdotool search --name 'clicky' behave %@ mouse-click getmouselocation >> /tmp/xdo &")
local f = io.popen("xwininfo -name 'clicky' | grep 'Absolute'")
geometry = f:read("*a")
f:close()
local geometry=string.gsub(geometry,"[\n]","")
s,f,abstlx=string.find(geometry,"X%p%s*(%d*)")
s,f,abstly=string.find(geometry,"Y%p%s*(%d*)")
click_start=nil
end--if click_start=1 ######################################
--click calculations #################################
local f=io.open("/tmp/xdo")
click=f:read()
f:close()
if click~=nil then
local f = io.open("/tmp/xdo","w")
f:write("")
f:close()
end--if click=nil
if click==nil then click="x:0 y:0 " end
--print (click)
local s,f,mousex=string.find(click,"x%p(%d*)%s")
local s,f,mousey=string.find(click,"y%p(%d*)%s")
localx=tonumber(mousex)-abstlx
localy=tonumber(mousey)-abstly
--get now location
os.execute("xdotool getmouselocation > /tmp/xdonow ")
local f=io.open("/tmp/xdonow")
mousenow=f:read()
f:close()
local s,f,mousenowx=string.find(mousenow,"x%p(%d*)%s")
local s,f,mousenowy=string.find(mousenow,"y%p(%d*)%s")
localnowx=tonumber(mousenowx)-abstlx
localnowy=tonumber(mousenowy)-abstly
--END CLICK CALCULATIONS #################################
return localx,localy,localnowx,localnowy
end--function

#8 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-04-01 18:12:16

If you can't do ${if_existing /mnt/usb/} on a drive that has spaces in it's name, couldn't you do ${if_existing /dev/disk/by-uuid/####}?
After using "sudo ls -l /dev/disk/by-id/*usb*" to find the uuid?

#9 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-28 20:48:44

Taking a break from my interface project so I thought I would post some updated pictures of it, now that I have added some interactive features. (interactive code from launcher.lua and my tweaked version of clicky.lua)

collapsed
Screenshot_03282013.png
infterface only
2013_03_28_1364504079_2720x1024_scrot.png
interface, launcher, and cpu popped out
2013_03_28_1364504154_2720x1024_scrot.png

#10 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-15 23:38:24

Naik wrote:

@ansem_of_nexus:
I tryed to, but recently i can`t get it to work...

edit: as for my last post: is there by any means a chance to wrap the output of the conky to the surface of the tablet? maybe with lua?

what do you mean the surface of the tablet?

#11 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-14 16:15:33

happy pi day

So I was wondering if anyone had tested out the Conky GUI editor, to find out if it is any good?
picture
link

#12 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-09 18:53:57

I figure since I already posted the code when I was looking for help, I should just show what my new lua project looks like so far.

so here is your sneak preview.
2013_03_09_1362854625_1600x900_scrot.jpg

I think once I have finished making it, that I want to make it into an interactive conky... maybe, we shall see.

#13 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-08 23:58:19

@dk75 oh so it's the graphic environment process, that explains it, because this new lua is rather graphic intensive.

#14 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-08 18:23:18

what is XServer / how is it connected to conky?

the lua I have been working on is a multi-conky set and uses my table lua
conky left:  640x450 bottom_left
conky center: 400x800 bottom_middle
conky right: 650x450 bottom_right
this is the main lua script

--this lua script for use in conky
require 'cairo'


function conky_interface_center()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--################################
-- Strings
--################################
d_math=math.pi/180
cpu=tonumber(conky_parse("${cpu}"))
if cpu == nil then cpu=0 end
cpu1=tonumber(conky_parse("${cpu cpu1}"))
cpu2=tonumber(conky_parse("${cpu cpu2}"))
topname1=conky_parse("${top name 1}")
topcpu1=conky_parse("${top cpu 1}")
toppid1=conky_parse("${top pid 1}")
topmem1=conky_parse("${top mem 1}")
toptime1=conky_parse("${top time 1}")
topname2=conky_parse("${top name 2}")
topcpu2=conky_parse("${top cpu 2}")
toppid2=conky_parse("${top pid 2}")
topmem2=conky_parse("${top mem 2}")
toptime2=conky_parse("${top time 2}")
topname3=conky_parse("${top name 3}")
topcpu3=conky_parse("${top cpu 3}")
topname4=conky_parse("${top name 4}")
topcpu4=conky_parse("${top cpu 4}")
--################################
-- Main Body
--################################
--border
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,4,90,100,0,(90*d_math))
cairo_arc(cr,4,490,100,(270*d_math),0)
cairo_arc(cr,404,490,100,(180*d_math),(270*d_math))
cairo_arc(cr,404,90,100,(90*d_math),(180*d_math))
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.3,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
--cpu arc
transition_arc(
204,290,160,130,
135,405,
cpu1,100,
.2,.2,1,.2,
.3,.3,1,1,
.5,.5,1,
75,
1,.3,.3
)
transition_arc(
204,290,130,100,
135,405,
cpu2,100,
.2,.2,1,.2,
.3,.3,1,1,
.5,.5,1,
75,
1,.3,.3
)
--cpu info
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,204,290,75,0,(360*d_math))
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.2,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
for i=1,7 do
x={186,171,190,184,194,184,194}
y={240,260,280,305,320,340,355}
s={20,15,15,13,11,13,11}
t={"CPU","Average",""..cpu.."%","Cpu 1",""..cpu1.."%","Cpu 2",""..cpu2.."%"}
cairo_move_to(cr,x[i],y[i])
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,s[i])
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
--top list
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,204,290,100,(55*d_math),(125*d_math))
cairo_arc(cr,204,290,160,(127*d_math),(127*d_math))
cairo_line_to(cr,113,475)
cairo_line_to(cr,296,475)
cairo_arc(cr,204,290,160,(53*d_math),(53*d_math))
cairo_close_path(cr)
if i == 3 then
cairo_set_source_rgba(cr,.2,.2,.2,.75)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
for i=1,8 do
x={130,215,130,215,130,215,130,215}
y={405,405,425,425,445,445,465,465}
t={topname1,""..topcpu1.."%",topname2,""..topcpu2.."%",topname3,""..topcpu3.."%",topname4,""..topcpu4.."%"}
cairo_move_to(cr,x[i],y[i])
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,13)
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
--top 1
if cpu >= 50 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,100,510)
cairo_line_to(cr,70,550)
cairo_line_to(cr,70,590)
cairo_line_to(cr,100,630)
cairo_line_to(cr,310,630)
cairo_line_to(cr,340,590)
cairo_line_to(cr,340,550)
cairo_line_to(cr,310,510)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.2,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
cairo_set_line_width(cr,1)
cairo_arc(cr,90,570,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,230,570,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.1,.1,.1,1)
cairo_fill(cr)
cairo_arc(cr,90,570,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,(90+(((230-90)/100)*topcpu1)),570,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.2,.2,1,.5)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,0,0,0,0)
cairo_stroke(cr)
for i=1,5 do
b2w=(1/5)*i
line=8-(i*2)
cairo_set_line_width(cr,line)
cairo_arc(cr,90,570,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,230,570,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,b2w,b2w,1,b2w)
cairo_stroke(cr)
end
x={110,250,245,100,100}
y={540,540,577,600,620}
s={17 ,13 ,20 ,15 ,15 }
t={topname1,toppid1,""..topcpu1.."%","Mem:"..topmem1.."%","Time up:"..toptime1..""}
for i=1,5 do
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_move_to(cr,x[i],y[i])
cairo_set_font_size (cr,s[i])
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
end
--top 2
if cpu >= 75 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,100,660)
cairo_line_to(cr,70,700)
cairo_line_to(cr,70,740)
cairo_line_to(cr,100,780)
cairo_line_to(cr,310,780)
cairo_line_to(cr,340,740)
cairo_line_to(cr,340,700)
cairo_line_to(cr,310,660)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.2,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
cairo_set_line_width(cr,1)
cairo_arc(cr,90,720,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,230,720,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.1,.1,.1,1)
cairo_fill(cr)
cairo_arc(cr,90,720,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,(90+(((230-90)/100)*topcpu1)),720,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.2,.2,1,.5)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,0,0,0,0)
cairo_stroke(cr)
for i=1,5 do
b2w=(1/5)*i
line=8-(i*2)
cairo_set_line_width(cr,line)
cairo_arc(cr,90,720,10,(90*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,230,720,10,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,b2w,b2w,1,b2w)
cairo_stroke(cr)
end
x={110,250,245,100,100}
y={690,690,727,750,770}
s={17 ,13 ,20 ,15 ,15 }
t={topname2,toppid2,""..topcpu2.."%","Mem:"..topmem2.."%","Time up:"..toptime2..""}
for i=1,5 do
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_move_to(cr,x[i],y[i])
cairo_set_font_size (cr,s[i])
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
end
--################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end conky interface center
--################################
--################################
--################################
function conky_interface_left()
if conky_window == nil then return end
if conky_window == nil then interface_left=0 end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--################################
-- Strings
--################################
d_math=math.pi/180
wireless_name=conky_parse("${wireless_essid wlan0}")
ip_wire=conky_parse("${addr}")
ip_wireless=conky_parse("${addr wlan0}")
down_wire=conky_parse("${downspeedf}")
down_wireless=conky_parse("${downspeedf wlan0}")
up_wire=conky_parse("${upspeedf}")
up_wireless=conky_parse("${upspeedf wlan0}")
signal_perc=tonumber(conky_parse("${wireless_link_qual_perc wlan0}"))
if signal_perc == nil then signal_perc=0 end
link_qual=tonumber(conky_parse("${wireless_link_qual wlan0}"))
link_qual_max=tonumber(conky_parse("${wireless_link_qual_max wlan0}"))
bitrate=conky_parse("${wireless_bitrate wlan0}")

--################################
-- Main Body
--################################
--border
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,550,630,600,(205*d_math),(270*d_math))
cairo_line_to(cr,650,105)
cairo_arc_negative(cr,650,455,200,(270*d_math),(180*d_math))
cairo_line_to(cr,50,455)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.3,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
--################################
-- Network
--################################
--no network
if ip_wireless == "No Address" and ip_wire == "No Address" then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
--left
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,110,325)
cairo_line_to(cr,60,400)
cairo_line_to(cr,160,400)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,0,0,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,110,350)
cairo_line_to(cr,110,380)
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,110,385)
cairo_line_to(cr,110,390)
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
--right
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,375,325)
cairo_line_to(cr,325,400)
cairo_line_to(cr,425,400)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,0,0,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,375,350)
cairo_line_to(cr,375,380)
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_move_to(cr,375,385)
cairo_line_to(cr,375,390)
cairo_set_source_rgba(cr,1,.25,.25,br_alpha)
cairo_stroke(cr)
end
cairo_set_source_rgba(cr,1,.2,.2,1)
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_move_to(cr,167,370)
cairo_set_font_size (cr,25)
cairo_show_text(cr,"No Network")
cairo_stroke(cr)
end-- no network
--wire
if ip_wire ~= "No Address" then
--border
for i=1,5 do
br_alpha=((1/5)*(i))
br_line=10-(i*2)
cairo_set_line_width(cr,br_line)
cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND)
cairo_move_to(cr,130,428)
cairo_line_to(cr,355,428)
cairo_set_source_rgba(cr,.6,.6,1,br_alpha)
cairo_stroke(cr)
cairo_arc(cr,110,370,60,(30*(math.pi/180)),(330*(math.pi/180)))
cairo_arc(cr,375,370,60,(210*(math.pi/180)),(150*(math.pi/180)))
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.2,.4)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.6,.6,1,br_alpha)
cairo_stroke(cr)
end
cairo_set_line_cap(cr,CAIRO_LINE_CAP_BUTT)
cairo_set_line_join(cr,CAIRO_LINE_JOIN_MITER)
cairo_set_line_width(cr,1)
--down arrow
down_x=180
down_y=350
ie=10
for i=1,ie do
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down_x-ie)+i),(down_y+i))
cairo_line_to(cr,down_x,(down_y+ie))
cairo_line_to(cr,((down_x+ie)-i),(down_y+i))
cairo_line_to(cr,down_x,((down_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.3,.3,1,((1/ie)*i))
cairo_stroke(cr)
end
--up arrow
up_x=305
up_y=370
for i=1,ie do
cairo_move_to(cr,up_x,(up_y+i))
cairo_line_to(cr,((up_x-ie)+i),((up_y+(ie*2))-i))
cairo_line_to(cr,up_x,(up_y+ie))
cairo_line_to(cr,((up_x+ie)-i),((up_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,0,1,0,((1/ie)*i))
cairo_stroke(cr)
end
--text
x={200,200,190}
y={365,390,420}
t={down_wire,up_wire,ip_wire}
for i=1,3 do
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_move_to(cr,x[i],y[i])
cairo_set_font_size (cr,15)
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
--down graph











limiter=0



if wired_down_table[1] >=1000 then wired_down_table_data1=1000 else wired_down_table_data1=wired_down_table[1] end
if wired_down_table[2] >=1000 then wired_down_table_data2=1000 else wired_down_table_data2=wired_down_table[2] end
if wired_down_table[3] >=1000 then wired_down_table_data3=1000 else wired_down_table_data3=wired_down_table[3] end
if wired_down_table[4] >=1000 then wired_down_table_data4=1000 else wired_down_table_data4=wired_down_table[4] end
if wired_down_table[5] >=1000 then wired_down_table_data5=1000 else wired_down_table_data5=wired_down_table[5] end
x={
(((30/100)*(wired_down_table_data1-limiter))*alternating_table[3]),
(((30/100)*(wired_down_table_data2-limiter))*alternating_table[2]),
(((30/100)*(wired_down_table_data3-limiter))*alternating_table[3]),
(((30/100)*(wired_down_table_data4-limiter))*alternating_table[2]),
(((30/100)*(wired_down_table_data5-limiter))*alternating_table[3])}
cairo_move_to(cr,110,315)
for i = 1,5 do
diff=425-315
interval=diff/6
cairo_set_line_width(cr,1)
cairo_line_to(cr,(110+x[i]),(315+(interval*i)))
end
cairo_line_to(cr,110,425)
cairo_set_source_rgba(cr,.4,.4,1,1)
cairo_stroke(cr)
--up graph

if wired_up_table[1] >=1000 then wired_up_table_data1=1000 else wired_up_table_data1=wired_up_table[1] end
if wired_up_table[2] >=1000 then wired_up_table_data2=1000 else wired_up_table_data2=wired_up_table[2] end
if wired_up_table[3] >=1000 then wired_up_table_data3=1000 else wired_up_table_data3=wired_up_table[3] end
if wired_up_table[4] >=1000 then wired_up_table_data4=1000 else wired_up_table_data4=wired_up_table[4] end
if wired_up_table[5] >=1000 then wired_up_table_data5=1000 else wired_up_table_data5=wired_up_table[5] end
x={
(((30/100)*(wired_up_table_data1-limiter))*alternating_table[3]),
(((30/100)*(wired_up_table_data2-limiter))*alternating_table[2]),
(((30/100)*(wired_up_table_data3-limiter))*alternating_table[3]),
(((30/100)*(wired_up_table_data4-limiter))*alternating_table[2]),
(((30/100)*(wired_up_table_data5-limiter))*alternating_table[3])}
cairo_move_to(cr,375,315)
for i = 1,5 do
diff=425-315
interval=diff/6
cairo_set_line_width(cr,1)
cairo_line_to(cr,(375+x[i]),(315+(interval*i)))
end
cairo_line_to(cr,375,425)
cairo_set_source_rgba(cr,.25,1,.25,1)
cairo_stroke(cr)
end--wired
--wireless
if ip_wireless ~= "No Address" and ip_wire == "No Address" then
--border
for i=1,5 do
br_alpha=((1/5)*(i))
br_line=10-(i*2)
cairo_set_line_width(cr,br_line)
cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_join(cr,CAIRO_LINE_JOIN_ROUND)
cairo_arc_negative(cr,110,370,60,(360*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,345,370,60,(270*(math.pi/180)),(360*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.2,.2,.2,.1)
cairo_fill(cr)
cairo_arc(cr,115,370,60,(270*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,345,370,60,(270*(math.pi/180)),(358*(math.pi/180)))
cairo_set_source_rgba(cr,.6,.6,1,br_alpha)
cairo_stroke(cr)
cairo_arc(cr,110,370,60,(90*(math.pi/180)),(360*(math.pi/180)))
cairo_arc(cr,400,400,30,(270*(math.pi/180)),(90*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.2,.2,.2,.1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.6,.6,1,br_alpha)
cairo_stroke(cr)

end
cairo_set_line_cap(cr,CAIRO_LINE_CAP_BUTT)
cairo_set_line_join(cr,CAIRO_LINE_JOIN_MITER)
cairo_set_line_width(cr,1)
--signal indicator
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,370,10,0,(360*d_math))
if i == 1 then if signal_perc > 0 then
cairo_set_source_rgba(cr,.25,.25,1,.75)
cairo_fill_preserve(cr)
else
cairo_set_source_rgba(cr,1,.3,.3,.75)
cairo_fill_preserve(cr)
end end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
if signal_perc >= 25 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,370,20,(110*d_math),(250*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_arc_negative(cr,110,370,20,(70*d_math),(290*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
end
if signal_perc >= 50 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,370,30,(110*d_math),(250*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_arc_negative(cr,110,370,30,(70*d_math),(290*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
end
if signal_perc >= 75 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,370,40,(110*d_math),(250*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_arc_negative(cr,110,370,40,(70*d_math),(290*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
end
if signal_perc >= 90 then
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,370,50,(110*d_math),(250*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,br_line)
cairo_arc_negative(cr,110,370,50,(70*d_math),(290*d_math))
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
end
--down arrow
ie=10
down_x=350
down_y=375
for i=1,ie do
cairo_set_line_width(cr,1)
cairo_move_to(cr,((down_x-ie)+i),(down_y+i))
cairo_line_to(cr,down_x,(down_y+ie))
cairo_line_to(cr,((down_x+ie)-i),(down_y+i))
cairo_line_to(cr,down_x,((down_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.3,.3,1,((1/ie)*i))
cairo_stroke(cr)
end
-- up arrow
up_x=350
up_y=405
for i=1,ie do
cairo_move_to(cr,up_x,(up_y+i))
cairo_line_to(cr,((up_x-ie)+i),((up_y+(ie*2))-i))
cairo_line_to(cr,up_x,(up_y+ie))
cairo_line_to(cr,((up_x+ie)-i),((up_y+(ie*2))-i))
cairo_close_path(cr)
cairo_set_source_rgba(cr,0,1,0,((1/ie)*i))
cairo_stroke(cr)
end
--text
if signal_perc < 100 then signal=""..signal_perc.."%" else signal=signal_perc end
x={180,180,360,360,98 ,160,175,181,210}
y={395,415,390,420,420,330,332,330,330}
s={15 ,15 ,11 ,11 ,13 ,13 ,20 ,13 ,13 }
t={wireless_name,ip_wireless,down_wireless,up_wireless,signal,link_qual,"/",link_qual_max,"Bandwidth: "..bitrate..""}
for i=1,9 do
cairo_set_source_rgba(cr,.8,.8,.8,1)
cairo_move_to(cr,x[i],y[i])
cairo_set_font_size (cr,s[i])
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
end-- wireless
--################################
-- End of Network
--################################















--################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end conky interface left
--################################
--################################
--################################
function conky_interface_right()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--################################
-- Strings
--################################
d_math=math.pi/180







--################################
-- Main Body
--################################
--border
for i=1,4 do
br_alpha=((1/4)*(i))
br_line=8-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,110,630,600,(270*d_math),(335*d_math))
cairo_line_to(cr,610,455)
cairo_arc_negative(cr,10,455,200,(360*d_math),(270*d_math))
cairo_line_to(cr,10,105)
cairo_close_path(cr)
if i == 1 then
cairo_set_source_rgba(cr,.2,.2,.3,.5)
cairo_fill_preserve(cr)
end
cairo_set_source_rgba(cr,.3,.3,1,br_alpha)
cairo_stroke(cr)
end
conky_drive(420,280)




--################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end conky interface right
--################################
--################################
--Functions
--################################
function conky_drive(center_x,center_y)
if (center_x) == nil then center_x=100 end
if (center_y) == nil then center_y=100 end
partition_location1="/boot"
partition_location2="/"
partition_location3="/home"
partition_location4="swap"
partition1=.5
partition2=10
partition3=285
partition4=5
drive_size=partition1+partition2+partition3+partition4
part1=tonumber(conky_parse("${fs_used_perc "..partition_location1.."}"))
part2=tonumber(conky_parse("${fs_used_perc "..partition_location2.."}"))
part3=tonumber(conky_parse("${fs_used_perc "..partition_location3.."}"))
part4=tonumber(conky_parse("${swapperc}"))
if part4 == nil then part4=0 end
point_math=360/drive_size
point1=point_math*partition1
point2=(point_math*partition2)+point1
point3=(point_math*partition3)+point2
outer_radius=80
diskio=conky_parse("${diskio}")
if diskio == nil then diskio="Error" end
part1_used=conky_parse("${fs_used "..partition_location1.."}")
part2_used=conky_parse("${fs_used "..partition_location2.."}")
part3_used=conky_parse("${fs_used "..partition_location3.."}")
part4_used=conky_parse("${swap}")
part1_size=conky_parse("${fs_size "..partition_location1.."}")
part2_size=conky_parse("${fs_size "..partition_location2.."}")
part3_size=conky_parse("${fs_size "..partition_location3.."}")
part4_size=conky_parse("${swapmax}")
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,11)
--border
for i=1,5 do
br_alpha=((1/5)*(i))
br_line=10-(i*2)
cairo_set_line_width(cr,br_line)
cairo_arc(cr,((center_x)-50),((center_y)-50),40,(180*(math.pi/180)),(270*(math.pi/180)))
cairo_arc(cr,((center_x)+50),((center_y)-50),40,(270*(math.pi/180)),(360*(math.pi/180)))
cairo_line_to(cr,((center_x)+90),((center_y)+130))
cairo_line_to(cr,((center_x)+60),((center_y)+160))
cairo_line_to(cr,((center_x)-60),((center_y)+160))
cairo_line_to(cr,((center_x)-90),((center_y)+130))
cairo_close_path(cr)
cairo_set_source_rgba(cr,.2,.2,.2,.1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.6,.6,1,br_alpha)
cairo_stroke(cr)
end
--partition 1
transition_arc(
center_x,center_y,outer_radius,(outer_radius/3),
0,point1,
part1,100,
.2,.2,.2,.2,
.7,.7,1,1,
.25,.25,1,
75,
1,.3,.3
)
--partition 2
transition_arc(
center_x,center_y,outer_radius,(outer_radius/3),
point1,point2,
part2,100,
.2,.2,.2,.2,
.7,.7,1,1,
.25,.25,1,
75,
1,.3,.3
)
--partition 3
transition_arc(
center_x,center_y,outer_radius,(outer_radius/3),
point2,point3,
part3,100,
.2,.2,.2,.2,
.7,.7,1,1,
.25,.25,1,
75,
1,.3,.3
)
--partition 4
transition_arc(
center_x,center_y,outer_radius,(outer_radius/3),
point3,360,
part4,100,
.2,.2,.2,.2,
.7,.7,1,1,
.25,.25,1,
75,
1,.3,.3
)
cairo_set_line_width(cr,1)
cairo_arc(cr,(center_x),(center_y),(outer_radius/3),0,(360*(math.pi/180)))
cairo_set_source_rgba(cr,.4,.4,.4,.75)
cairo_fill(cr)
cairo_move_to (cr,((center_x)-20),((center_y)+4))
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size (cr,11)
cairo_set_source_rgba (cr,.8,.8,.8,1)
cairo_show_text (cr,diskio)
cairo_stroke (cr)
for i=1,8 do
x_i={0,75,0,75,0,75,0,75}
x=(((center_x)-75)+(x_i[i]))
y_i={0,0,15,15,30,30,45,45}
y=(((center_y)+95)+(y_i[i]))
t={"SDA1:"..part1.."%",""..part1_used.."/"..part1_size.."",
"SDA2:"..part2.."%",""..part2_used.."/"..part2_size.."",
"SDA3:"..part3.."%",""..part3_used.."/"..part3_size.."",
"SDA4:"..part4.."%",""..part4_used.."/"..part4_size.."",
}
cairo_move_to(cr,x,y)
cairo_show_text(cr,t[i])
cairo_stroke(cr)
end
end
function transition_arc (x,y,outer_radius,inner_radius,start_degree,end_degree,value,scale,bgr,bgg,bgb,bga,brr,brg,brb,bra,ir,ig,ib,alert_level,ar,ag,ab)
if (value) == nil then value=0 end
cairo_set_line_width(cr,2)
cairo_arc(cr,x,y,(outer_radius),((start_degree)*(math.pi/180)),((end_degree)*(math.pi/180)))
cairo_arc_negative(cr,x,y,(inner_radius),((end_degree)*(math.pi/180)),((start_degree)*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,bgr,bgg,bgb,bga)
cairo_fill(cr)
i_end=(((end_degree)-(start_degree))/(scale))*(value)
for i=1,i_end do
position1=((start_degree)*(math.pi/180))+((i-2)*(math.pi/180))
position2=((start_degree)*(math.pi/180))+(i*(math.pi/180))
alpha=(1/i_end)*i
cairo_arc(cr,x,y,(outer_radius),position1,position2)
cairo_arc_negative(cr,x,y,(inner_radius),position2,position1)
cairo_close_path(cr)
if (value) > (alert_level) then
cairo_set_source_rgba(cr,(ar),(ag),(ab),alpha)
else
cairo_set_source_rgba(cr,(ir),(ig),(ib),alpha)
end
cairo_fill(cr)
end--for end
cairo_arc(cr,x,y,(outer_radius),((start_degree)*(math.pi/180)),((end_degree)*(math.pi/180)))
cairo_arc_negative(cr,x,y,(inner_radius),((end_degree)*(math.pi/180)),((start_degree)*(math.pi/180)))
cairo_close_path(cr)
cairo_set_source_rgba(cr,brr,brg,brb,bra)
cairo_stroke(cr)
end--function end

this is the tables lua script

require 'cairo'
function conky_tables()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates == 4 then
cpu_average_table={}
cpu_core1_table={}
cpu_core2_table={}
wired_down_table={}
wired_up_table={}
wireless_down_table={}
wireless_up_table={}
diskio_table={}
alternating_table={}
end
if updates > 5 then
cpu=tonumber(conky_parse("${cpu}"))
cpu_core1=tonumber(conky_parse("${cpu cpu1}"))
cpu_core2=tonumber(conky_parse("${cpu cpu2}"))
wired_down=tonumber(conky_parse("${downspeedf}"))
wired_up=tonumber(conky_parse("${upspeedf}"))
wireless_down=tonumber(conky_parse("${downspeedf wlan0}"))
wireless_up=tonumber(conky_parse("${upspeedf wlan0}"))
table_length=10
--cpu_average_table={}
if cpu == nil then cpu=0 end
for i = 1, tonumber(table_length) do
            if cpu_average_table[i+1]==nil then cpu_average_table[i+1]=0 end
cpu_average_table[i]=cpu_average_table[i+1]
            if i==table_length then
            cpu_average_table[table_length]=cpu
            end
end
--cpu_core1_table={}
if cpu_core1 == nil then cpu_core1=0 end
for i = 1, tonumber(table_length) do
            if cpu_core1_table[i+1]==nil then cpu_core1_table[i+1]=0 end
cpu_core1_table[i]=cpu_core1_table[i+1]
            if i==table_length then
            cpu_core1_table[table_length]=cpu_core1
            end
end
--cpu_core2_table={}
if cpu_core2 == nil then cpu_core2=0 end
for i = 1, tonumber(table_length) do
            if cpu_core2_table[i+1]==nil then cpu_core2_table[i+1]=0 end
cpu_core2_table[i]=cpu_core2_table[i+1]
            if i==table_length then
            cpu_core2_table[table_length]=cpu_core2
            end
end
--wired_down_table={}
if wired_down == nil then wired_down=0 end
for i = 1, tonumber(table_length) do
            if wired_down_table[i+1]==nil then wired_down_table[i+1]=0 end
wired_down_table[i]=wired_down_table[i+1]
            if i==table_length then
            wired_down_table[table_length]=wired_down
            end
end
--wired_up_table={}
if wired_up == nil then wired_up=0 end
for i = 1, tonumber(table_length) do
            if wired_up_table[i+1]==nil then wired_up_table[i+1]=0 end
wired_up_table[i]=wired_up_table[i+1]
            if i==table_length then
            wired_up_table[table_length]=wired_up
            end
end
--wireless_down_table={}
if wireless_down == nil then wireless_down=0 end
for i = 1, tonumber(table_length) do
            if wireless_down_table[i+1]==nil then wireless_down_table[i+1]=0 end
wireless_down_table[i]=wireless_down_table[i+1]
            if i==table_length then
            wireless_down_table[table_length]=wireless_down
            end
end
--wireless_up_table={}
if wireless_up == nil then wireless_up=0 end
for i = 1, tonumber(table_length) do
            if wireless_up_table[i+1]==nil then wireless_up_table[i+1]=0 end
wireless_up_table[i]=wireless_up_table[i+1]
            if i==table_length then
            wireless_up_table[table_length]=wireless_up
            end
end
--alternating_table={}
if updates > 5 then if alternating_table[3] == 1 then alternating=-1 else if alternating_table[3] == -1 then alternating=1 end end end
for i = 1,3 do
if alternating_table[i+1]==nil then alternating_table[i+1]=1 end
alternating_table[i]=alternating_table[i+1]
if i==3 then alternating_table[i]=alternating end
if alternating_table[3] == nil then alternating_table[3]=1 end
end
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

as soon as I get this little matter cleared up I want to finish it

#15 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-08 08:50:48

So I have been working on a new lua and I ran into a interesting problem. The script runs fine, but there is a process that goes just mad and hold around 10% on my cpu (/usr/bin/x11/x -nolisten tcp -auth /var/run/slim.auth vt07). Htop says it is a root process and I don't see normally. Does anyone know what this is about?

#17 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-03-07 20:21:18

I wanted to make sure this didn't get missed just because it was in mrpeachy's "HOW TO : using lua scripts in conky"

Gordon wrote:

Hi mrpeachy,

I am trying to follow your howto and have come across a problem that I have no idea how to fix it or what it is. this is what I get when I run conky in terminal

gordon@crunchbang:~$ conky
WARNING: gnome-keyring:: couldn't connect to: /home/gordon/.cache/keyring-f9X7tR/pkcs11: No such file or directory
Conky: missing text block in configuration; exiting
***** Imlib2 Developer Warning ***** :
	This program is calling the Imlib call:

	imlib_context_free();

	With the parameter:

	context

	being NULL. Please fix your program.

and this is what I have in lua

-- this is a lua script for use in conky

require 'cairo'

function conky_main()  -- start of 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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then -- start of updates
-- ####################################
ptint ('hello world')
-- ####################################
end -- if updates
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr = nil
end  -- of main function

which is what I think you say is the minimum that you need. What have I got wrong please ?

#18 Re: Tips, Tricks & Scripts » My tint2 config » 2013-03-07 19:36:24

@donkeyotay I believe that all you need to do is add "panel_items=ST" to your tint configuration.

#19 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-27 18:04:04

@arclance perfect, thank you.

So now I have one more question, what does the "*" do in this case?

#20 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-27 00:58:22

So Sector11 suggested a bash script that might point me in the right direction it used pgrep. This seemed perfect as it would present the pid of any conky I wanted, but in conky this doesn't seem to work right. In conky this command gives me the pid  and another number that is counting up.
The command is:

pgrep -f ./conky/test2.conkyrc

I have used both exec and execp in conky trying to get just the pid only to no success, oh and the number that counts up doesn't go away like the pid does if the conky isn't running. That makes my if nil switch nonfunctional in lua

#21 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-23 20:47:46

I have an interesting question. Is it possible to make a conky or lua script aware of another. I mean if conky A is running or not running, conky B will know and change a value/string accordingly to show that status?

#22 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-21 22:23:59

PackRat wrote:

@ansem_of_nexus:

It works; a bit large though - which lines control the radius?

I changed:

outer_radius=175

but it looked like I lost a bit of the proportions. There a quick fix to resize?

http://t.imgbox.com/acqv0Tcc.jpg

hand_width=3, I would say 5 should do it. The hand width is double the number, like cairo set line width does.

#23 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-21 20:05:56

So the fastest way to make your clock for you, was to just add what the hands were missing. So I added the hour lines and increased the size / position to that of the clock script you showed me. So this should work for what you wanted, I think.

require 'cairo'
function conky_main()
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)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--################################
center_x=237
center_y=237
outer_radius=175
hours=12
hand_width=3
hands_red=.75
hands_green=0
hands_blue=0
hands_alpha=1
hands_ired=.7
hands_igreen=.7
hands_iblue=.7
hands_ialpha=1
mr,mg,mb,ma=1,1,1,1
ampm=conky_parse("${time %p}")
second=tonumber(conky_parse("${time %S}"))
minute=tonumber(conky_parse("${time %M}"))
if hours ~= 12 then hours=24 end
if hours == 12 then hour=tonumber(conky_parse("${time %I}")) else hour=tonumber(conky_parse("${time %H}")) end
hour_hand_radius1=outer_radius-40
hour_hand_radius2=outer_radius-60
hour_position=(-90*(math.pi/180))+(((360/(hours*60*60))*((hour*60*60)+(minute*60)+second))*(math.pi/180))
cairo_set_line_width(cr,1)
cairo_arc(cr,center_x,center_y,10,(hour_position-(15*(math.pi/180))),(hour_position+(15*(math.pi/180))))
cairo_arc(cr,center_x,center_y,hour_hand_radius2,(hour_position+(hand_width*(math.pi/180))),(hour_position+(hand_width*(math.pi/180))))
cairo_arc(cr,center_x,center_y,hour_hand_radius1,hour_position,hour_position)
cairo_arc(cr,center_x,center_y,hour_hand_radius2,(hour_position-(hand_width*(math.pi/180))),(hour_position-(hand_width*(math.pi/180))))
cairo_close_path(cr)
cairo_set_source_rgba(cr,hands_ired,hands_igreen,hands_iblue,hands_ialpha)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
minute_hand_radius1=outer_radius-15
minute_hand_radius2=outer_radius-35
minute_position=(-90*(math.pi/180))+(((360/(60*60))*((minute*60)+second))*(math.pi/180))
cairo_arc(cr,center_x,center_y,10,(minute_position-(15*(math.pi/180))),(minute_position+(15*(math.pi/180))))
cairo_arc(cr,center_x,center_y,minute_hand_radius2,(minute_position+(hand_width*(math.pi/180))),(minute_position+(hand_width*(math.pi/180))))
cairo_arc(cr,center_x,center_y,minute_hand_radius1,minute_position,minute_position)
cairo_arc(cr,center_x,center_y,minute_hand_radius2,(minute_position-(hand_width*(math.pi/180))),(minute_position-(hand_width*(math.pi/180))))
cairo_close_path(cr)
cairo_set_source_rgba(cr,hands_ired,hands_igreen,hands_iblue,hands_ialpha)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
second_hand_radius=outer_radius-5
second_position=(-90*(math.pi/180))+(((360/60)*second)*(math.pi/180))
cairo_set_line_width(cr,2)
cairo_move_to(cr,center_x,center_y)
cairo_arc(cr,center_x,center_y,second_hand_radius,second_position,second_position)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,1)
cairo_arc(cr,center_x,center_y,10,(0*(math.pi/180)),(360*(math.pi/180)))
cairo_set_source_rgba(cr,0,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
--[[am & pm
if hours == 12 then
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr,10)
cairo_set_source_rgba (cr,.8,.8,.8,1)
cairo_move_to (cr,(center_x-6.25),(center_y+3.25))
cairo_show_text (cr,ampm)
cairo_stroke (cr)
else
cairo_set_line_width(cr,2)
cairo_arc(cr,center_x,center_y,5,(0*(math.pi/180)),(360*(math.pi/180)))
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end]]
for i=1,hours do
cairo_arc(cr,center_x,center_y,(outer_radius-5),((-90*(math.pi/180))+(((i-1)*(360/hours))*(math.pi/180))),((-90*(math.pi/180))+(((i-1)*(360/hours))*(math.pi/180))))
cairo_arc(cr,center_x,center_y,(outer_radius-15),((-90*(math.pi/180))+(((i-1)*(360/hours))*(math.pi/180))),((-90*(math.pi/180))+(((i-1)*(360/hours))*(math.pi/180))))
cairo_set_source_rgba(cr,mr,mg,mb,ma)
cairo_stroke(cr)
end
--################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end

If this doesn't work, let me know and I will continue with the conversion to packrat's clock from where I stopped.

#24 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-21 17:43:52

@ragamatrix That is ok, I will get started on it here in a little bit. I should have it done by to night

#25 Re: Tips, Tricks & Scripts » The New Monster Conky Thread » 2013-02-20 20:03:43

ragamatrix wrote:

@ansem_of_nexus
One is your code "multi-face" and the other of  PackRat.
I'd like to use the multiface clock hands on the PackRat's clock...
It's 2 differents codes i'm not sure it's possible because the values are not declared in the same way.

It should be very simple to add my hand code in. I will put the hand code below. Once it is in your lua script you will just have to change the values, at the top is all the strings. The PackRat clock will call all the sames strings (just named something else most likely, but it may not call the am&pm value), you just need to find which strings have the conky_parse value that my hands need and change the strings to match. I would just real quick do it, but I don't have the PackRat clock lua.

Also my hands are setup to be 12 and 24 hour depending on what you want, if the clock has a similar feature then you might be able to change my coding to the coding already present.

center_x=110
center_y=110

hours=12

hands_red=.5
hands_green=.5
hands_blue=.5
hands_alpha=1
hands_ired=.25
hands_igreen=.25
hands_iblue=.25
hands_ialpha=1

outer_radius=100
ampm=conky_parse("${time %p}")
second=tonumber(conky_parse("${time %S}"))
minute=tonumber(conky_parse("${time %M}"))
if hours ~= 12 then hours=24 end
if hours == 12 then
hour=tonumber(conky_parse("${time %I}"))
else
hour=tonumber(conky_parse("${time %H}"))
end

hour_hand_radius1=outer_radius-30
hour_hand_radius2=outer_radius-50
hour_position=(-90*(math.pi/180))+(((360/(hours*60*60))*((hour*60*60)+(minute*60)+second))*(math.pi/180))
cairo_set_line_width(cr,1)
cairo_arc(cr,center_x,center_y,10,(hour_position-(20*(math.pi/180))),(hour_position+(20*(math.pi/180))))
cairo_arc(cr,center_x,center_y,hour_hand_radius2,(hour_position+(5*(math.pi/180))),(hour_position+(5*(math.pi/180))))
cairo_arc(cr,center_x,center_y,hour_hand_radius1,hour_position,hour_position)
cairo_arc(cr,center_x,center_y,hour_hand_radius2,(hour_position-(5*(math.pi/180))),(hour_position-(5*(math.pi/180))))
cairo_close_path(cr)
cairo_set_source_rgba(cr,hands_ired,hands_igreen,hands_iblue,hands_ialpha)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
minute_hand_radius1=outer_radius-15
minute_hand_radius2=outer_radius-35
minute_position=(-90*(math.pi/180))+(((360/(60*60))*((minute*60)+second))*(math.pi/180))
cairo_arc(cr,center_x,center_y,10,(minute_position-(20*(math.pi/180))),(minute_position+(20*(math.pi/180))))
cairo_arc(cr,center_x,center_y,minute_hand_radius2,(minute_position+(5*(math.pi/180))),(minute_position+(5*(math.pi/180))))
cairo_arc(cr,center_x,center_y,minute_hand_radius1,minute_position,minute_position)
cairo_arc(cr,center_x,center_y,minute_hand_radius2,(minute_position-(5*(math.pi/180))),(minute_position-(5*(math.pi/180))))
cairo_close_path(cr)
cairo_set_source_rgba(cr,hands_ired,hands_igreen,hands_iblue,hands_ialpha)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
second_hand_radius=outer_radius-5
second_position=(-90*(math.pi/180))+(((360/60)*second)*(math.pi/180))
cairo_set_line_width(cr,2)
cairo_move_to(cr,center_x,center_y)
cairo_arc(cr,center_x,center_y,second_hand_radius,second_position,second_position)
cairo_set_source_rgba(cr,hands_red,hands_green,hands_blue,hands_alpha)
cairo_stroke(cr)
cairo_set_line_width(cr,1)
cairo_arc(cr,center_x,center_y,10,(0*(math.pi/180)),(360*(math.pi/180)))
cairo_set_source_rgba(cr,0,0,0,1)
cairo_fill_preserve(cr)
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_stroke(cr)
--am & pm
if hours == 12 then
cairo_select_font_face (cr,"mono",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr,10)
cairo_set_source_rgba (cr,.8,.8,.8,1)
cairo_move_to (cr,(center_x-6.25),(center_y+3.25))
cairo_show_text (cr,ampm)
cairo_stroke (cr)
else
cairo_set_line_width(cr,2)
cairo_arc(cr,center_x,center_y,5,(0*(math.pi/180)),(360*(math.pi/180)))
cairo_set_source_rgba(cr,.5,.5,.5,1)
cairo_fill(cr)
end--am & pm

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo