Conky Support, Codes and Screenshots

falldown

Sure can Jed. I will post the new design (with shadow) and last fm logo in a few moments.

falldown

For the new conky.
All files remain the same.. with the exception of the
config.lua
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--## CALL bargraph.lua ##################################################
function conky_main()
     conky_main_bars()
end
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="LaudatioC"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
--#######################################################################
--background start#######################################################

subtab={
{d="start",x=10.5,y=15.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=203,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=727},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-203,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=10,w=210,h=727,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5.5,y=10.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=725},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=65,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=30,y=0},
--{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=185,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=725},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-185,y=0},
--{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=30,y=0,w=195,h=745,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=0.20,p=0.5},{c=0x000000,a=0,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=10},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=15,y=0},
--{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=745},
--{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-15,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=0,w=25,h=745,grad={{c=0xffffff,a=0.2,p=0},{c=0xffffff,a=0.3,p=0.7}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=200},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=297},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=397},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=497},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=597},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=697},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--Background setup end ##################################################
--#######################################################################
--Config start###########################################################

starty=15
gap=15
ypos=0
ypos=starty+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=18,x=60,y=ypos+4,txt=conky_parse"${sysname}/debian"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+6,txt=conky_parse"${kernel}"})
image({x=145,y=37,h=75,w=75,file="/home/falldown/images/vsido-logo-rev4.png"})

--data titles
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+10,txt="uptime:"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+50,txt="MEM:"})
ypos=gap+ypos
ypos=0
ypos=starty+gap+gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+10,txt=conky_parse"${uptime}"})
ypos=gap+ypos

--## MEM BARGRAPH #########################################################

num=tonumber(conky_parse("${memperc}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=103--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--MEM SECTION
ypos=gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+66,txt=conky_parse"${mem}/${memmax}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+35,txt=conky_parse"${memperc}%"})
ypos=gap+ypos

--CPU SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+80,txt="CPU1:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+80,txt="TEMP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+132,txt="CPU2:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+132,txt="TEMP:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+80,txt=conky_parse"${hwmon 1 temp 2}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+80,txt=conky_parse"${cpu cpu1}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+132,txt=conky_parse"${hwmon 1 temp 3}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+132,txt=conky_parse"${cpu cpu2}%"})
--CPU BARGRAPH ########################################################

num=tonumber(conky_parse("${cpu cpu1}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=163--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${cpu cpu2}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=215--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Net SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+180,txt="NET UP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+233,txt="NET DOWN:"})
--out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=260,y=ypos+180,txt=conky_parse"${memperc}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=60,y=ypos+180,txt=conky_parse"${upspeed}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=ypos+233,txt=conky_parse"${downspeed}"})

--NET BARGRAPH##########################################################
num=tonumber(conky_parse("${upspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=263--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${downspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=317--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Last fm SECTION
image({x=45,y=655,h=48,w=125,file="/home/falldown/v9000/Lastfm/logo1.png"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=75,y=ypos+620,txt="PLAYING"})
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=10,y=ypos+640,txt=conky_parse"${rss http://ws.audioscrobbler.com/1.0/user/chris-falldown/recenttracks.rss 1 item_titles 1 }"})
--######################################################################
--Time and Date SECTION
out({c=0xffffff,a=1,f="LaudatioC",fs=24,x=55,y=ypos+340,txt=conky_parse"${time %I:%M:%S}"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=24,x=25,y=ypos+295,txt=conky_parse"${time %B %d %Y}"})
--######################################################################
--Weather SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=35,y=ypos+377,txt=weather_location})
image({x=170,y=475,h=50,w=50,file=now["weather_icon"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+390,txt="Conditions:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=75,y=ypos+390,txt=now["conditions_short"]})
image({x=10,y=498,h=45,w=45,file=now["wind_icon"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=55,y=ypos+450,txt=now["wind_mph"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=30,y=ypos+405,txt="Temperature:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=112,y=ypos+405,txt=now["temp"].."°F"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=65,y=ypos+420,txt="Feels Like:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=130,y=ypos+421,txt=now["temp"].."°F"})
--out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=440,y=ypos-10,txt="Weather for "})
--######################################################################
--NEXT 3 HOUR SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=60,y=567,txt="NEXT 3 HOURS"})
image({w=30,h=30,x=40,y=570,file=now["fc_hour1_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=584,txt=now["fc_hour1_time"].." "..now["fc_hour1_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=595,txt=now["fc_hour1_temp"].."°F"})

image({w=30,h=30,x=115,y=570,file=now["fc_hour2_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=584,txt=now["fc_hour2_time"].." "..now["fc_hour2_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=595,txt=now["fc_hour2_temp"].."°F"})

image({w=30,h=30,x=185,y=570,file=now["fc_hour3_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=584,txt=now["fc_hour3_time"].." "..now["fc_hour3_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=595,txt=now["fc_hour3_temp"].."°F"})

--ALERTS SECTION
--show alert icon
image({x=5,y=600,h=22,w=22,file=alert_icon})
--show number of alerts
out({x=24,y=618,fs=22,txt=alert_number})
--display alert information
display_alerts=2--set number of alerts to show,set 0 to show all
top_left_alert_x=40--set top left coordinates for entire alerts section
top_left_alert_y=610--^alerts will display in a single column
alert_gap=15--sets the gap between the TOP of one alert and the Top of the next alert
--#######################################################################################################################################
if alert_number==0 then noal=1 elseif alert_number~=0 and display_alerts>alert_number then noal=alert_number else noal=display_alerts end
for i=1,noal do--start of alerts display section. do not edit ###########################################################################
local tlx=top_left_alert_x--write output relative to tlx #################################
local tly=top_left_alert_y+((i-1)*alert_gap)--write output relative to tlx ###############
--########################################################################################
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=tlx,y=tly,txt=alert_type[i]})
--out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=tlx,y=tly+15,txt=alert_issued[i]})
--########################################################################################
end--of alert display section ############################################################
--########################################################################################

--#######################################################################
--END OF CODE ----END OF CODE ----END OF CODE ---
--#######################################################################
end--of function do not edit this line ##################################
--#######################################################################


Which will give you this..

and here is the last fm logo..
http://dl.dropbox.com/u/60081679/Lastfm.tar.gz

jedi

Thanks falldown!  Awesome stuff!!!
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

falldown

Thank you and you are welcome.  :)

falldown

S11 what would you say are a set of "Generic" system info commands for conky that would work with every install?

So far I am thinking
nodename
system
kernel
cpu cpu0 %
memperc %
upspeedf / downspeedf
totalup / totaldown

I am wanting to create a template (very simple) for Peachy's interactive conky.

jedi

OK, love the shadow effect.  It is beyond the scope of mental capacities however to figure out how you got the light grey strip on the left of the conky.  I'd rather it not be there on mine.  (picky picky picky)  Is there an easy way to get rid of it?  Also is there a way to keep the shadow effect and have the conky broken up into boxes like it was originally?

Don't waste a lot of time on this!  I've been known to change Conky's hourly!!!  My problem is when I see that much lua code I start  :'( like a little baby cause it's so far over my head!!!
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

falldown

Easy solution Jed.. The top code is all the pretty lua drawing code.

Take this at the top of each set of codes..
subtab={
{d="start",x=10.5,y=15.5},

and make a dramatic change to one of the values.. (how I started learning)
save and it will instantly show you what part you are working with.

The separate boxes..
--######################################################################
--This is the base black box
subtab={
{d="start",x=5.5,y=165.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})
--This is the gradient overlay (transparency)
subtab={
{d="start",x=5,y=165},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.3,p=0.0},{c=0xffffff,a=0.35,p=0.67},{c=0xffffff,a=0.35,p=0.69},{c=0xffffff,a=0.35,p=0.71},{c=0x000000,a=0.2,p=1}},lw=1,sub=1,db=0,subtab=subtab})
--this is the white separator
subtab={
{d="start",x=10,y=200},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

I labeled above code to help out.
Just copy the base black box and paste it above the original one.
offset it by adding 5 to 10 to the x and y.
change the alpha (a=) to a 0.1-9 .

Sector11

#82
^ Not as easy as that ... up/down speed - eth0,1 wlan0, 1 ??
same as total up/down ..

Not on my system ... will come back later.  I have a fairly generic one that might just foot the bill.
Stay Home

falldown

Working on a template for another one of MrPeachy's amazing scripts..

This is how the conky will look with the info windows closed.
I just started this so this is what I have completed.

More to come.  ;D

jedi

Quote from: falldown on January 19, 2013, 01:32:33 AM
Working on a template for another one of MrPeachy's amazing scripts..

This is how the conky will look with the info windows closed.
I just started this so this is what I have completed.

More to come.  ;D
Wringing my hands in anticipation!!!
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

mrpeachy

Howdy Falldown!

Good to see you working on a new project, i'm sure it will be worth the wait

as for me... no time for conky or lua these days :(


VastOne

Great to see you here mrpeachy!

Hopefully your schedule can lighten up some in the future..

Cheers!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

mrpeachy


mrpeachy

Thanks VastOne... probably not till the end of the semester!

Sector11

Quote from: mrpeachy on January 19, 2013, 03:43:40 AM
Good day Sector11!

And a good day to you mrpeachy.  Welcome to VSIDO and our little Conky "sub forum"
Really good to see you here.
Stay Home