Here we go..
All lua code is written By the MIGHTY MrPeachy. Hands down my favorite script writer.
The layout uses his v9000 & Bargraph scripts.
README....
.v9000_config.lua (this file goes in your /home/username directory)
--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES
function weather_settings()--#### DO NOT EDIT THIS LINE #################
--#######################################################################
--[[set update interval. update interval is based on conky cycles
if your conkyrc has an update_interval of 1, ie updates every second
then if you enter 60 below, the script will update every 60 seconds
however, if your conkyrc update_interval is 10, then by setting 60 below,
v9000 will update every 600 seconds (10 minutes)]]
local update_interval=1800 --avoid an interval of 1
--get web address by going to the intellicast site and entering your location in the box
--click on "Extended Forecast" to get the necessary address
local web="http://www.intellicast.com/Local/Forecast.aspx?unit=F&location=USMO9688"--insert unit=C& after aspx? for C
--set location of weather images (replace "benjamin" with your own username)
local weathericons="/home/falldown/v9000/additional_files/weathericons_falldown/"
--short conditions setup
--this section allows you to set your own shorter terms to replace the terms foud in conditions
--to use for current: now["conditions_short"], now["conditions_short_caps"], now["conditions_short_lc"]
--to use for forecast: conditions_short[n], conditions_short_caps[n], conditions_short_lc[n]
--ALSO USE THIS TABLE TO ENTER CONDITIONS TRANSLATIONS
con_short={--start of table, put entries below in form eg: ["Thunderstorm"]="T.Strm",
["Wind Early"]="Wnd AM",
["Snow Showers"]="Sn Shws",
["Thunderstorm"]="T.Strm",--remember to put a comma at the end of every entry
["Scattered"]="Scat",
["Few Snow Showers"]="Fw Sn Shws",
["Wind"]="Wnd",
["Showers"]="Shws",
}--this bracket closes the table
--the script is capable of converting between several unit types
--set how many decimal places you want the conversions to show
local decimal_places=1
--some weather data options need to come with their own units attached as they can be NA on occasion
--set here what you want to have for units, or set "" for nothing
--include spaces, if desired, for formatting purposes.
--NOTE ALSO EDIT THESE SETTINGS FOR TRANSLATION PURPOSES
local visibility_unit=" mi"
local wind_mph_unit=" mph"
local wind_km_unit=" kmh"
local wind_kts_unit=" kts"
local ceiling_unit=" ft"
local wind_degrees_unit="°"
--do you want the script to use translation tables?
--set 1 if you want to translate, 0 if not.
--the translation tables are located below
local translate=0
--set alerts on or off, set to 0 so that the script does not check for alerts
--set 1 to check for alerts
local alert_check=1
--#######################################################################
--TRANSLATION TABLES, activate by setting translate=1 above
--use con_short table above to translate weather conditions
--edit units settings above to complete translation
--translate NESW text
neswtext={
S="t_S",
SSW="tsetSSW",
SW="t_SW",
WSW="t_WSW",
W="t_W",
WNW="t_WNW",
NW="t_NW",
NNW="t_NNW",
N="t_N",
NNE="t_NNE",
NE="t_NE",
ENE="t_ENE",
E="t_E",
ESE="t_ESE",
SE="t_SE",
SSE="t_SSE",
}--end of N E S W text table
--translate time suffix
tsuffix={
AM="t_AM",
PM="t_PM",
}--end of time suffix table
--enter translations for uv index text
uvindextext={
["Low"]="t_Low",
["Moderate"]="t_Moderate",
["High"]="t_High",
["Very High"]="t_Very High",--format is different because of the space in the text
["Extreme"]="t_Extreme",
}--end of uv text table
--enter translations for moonpahse
moonphases={
["New"]="t_New",
["Full"]="t_Full",
["First Quarter"]="t_First Quarter",
["Last Quarter"]="t_Last Quarter",
["Waning Gibbous"]="t_Waning Gibbous",
["Waning Crescent"]="t_Waning Crescent",
["Waxing Crescent"]="t_Waxing Crescent",
["Waxing Gibbous"]="t_Waxing Gibbous",
}--end of moon phase table
--enter translations for FULL day names
daynames={
Monday="t_Monday",
Tuesday="t_Tuesday",
Wednesday="t_Wednesday",
Thursday="t_Thursday",
Friday="t_Friday",
Saturday="t_Saturday",
Sunday="t_Sunday",
}--end day names table
--enter translations for SHORT day names
dayshort={
Monday="t_Mon",
Tuesday="t_Tue",
Wednesday="t_Wed",
Thursday="t_Thu",
Friday="t_Fri",
Saturday="t_Sat",
Sunday="t_Sun"
}--end short day names table
--enter translation for FULL month names
monthnames={
January="t_January",
February="t_February",
March="t_March",
April="t_April",
May="t_May",
June="t_June",
July="t_July",
August="t_August",
September="t_September",
October="t_October",
November="t_November",
December="t_December"
}--end of month name translations
--enter translations for SHORT month names
monthshort={
January="t_Jan",
February="t_Feb",
March="t_Mar",
April="t_Apr",
May="t_May",
June="t_Jun",
July="t_Jul",
August="t_Aug",
September="t_Sep",
October="t_Oct",
November="t_Nov",
December="t_Dec"
}--end of short month name translations
--enter some additional translations
additional={
NA="t_NA",
Unl="t_Unl"--for ceiling data option
}--end of additional translations
--END OF TRANSLATION TABLES
--#######################################################################
--NOTE if you make changes to these settings, they will only take effect at the next weather update
--or after killall conky and restart
--#######################################################################
if translate==1 then
return {update_interval,web,weathericons,con_short,decimal_places,visibility_unit,wind_mph_unit,wind_km_unit,wind_kts_unit,ceiling_unit,wind_degrees_unit,translate,alert_check,neswtext,tsuffix,uvindextext,moonphases,daynames,dayshort,monthnames,monthshort,additional}
else
return {update_interval,web,weathericons,con_short,decimal_places,visibility_unit,wind_mph_unit,wind_km_unit,wind_kts_unit,ceiling_unit,wind_degrees_unit,translate,alert_check}
end
end--OF SETTINGS AND PREFERENCES ########################################
--#######################################################################
(you will need to go intellicast weather and get your location.)
conky_system (this is the conkyrc)
##############################################
# Settings
##############################################
max_specials 10000
max_user_text 1500000
background no
use_xft yes
#xftfont Sans:size=12
#xftalpha 1
font Mono:size=8
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 230 750
maximum_width 230
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment middle_left
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
color1 86acad #darker blue
color2 b1c9c9 #lighter blue
text_buffer_size 100000
top_name_width 10
update_interval 1
lua_load /home/falldown/v9000/bargraph.lua
lua_load /home/falldown/v9000/v9000.lua
lua_draw_hook_post weather
lua_load /home/falldown/v9000/config.lua
TEXT
config.lua (This is where all the lua, weather and text settings are)
--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=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=125},
{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=5,y=10},
{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=125},
{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=10,w=200,h=125,grad={{c=0x000000,a=0.35,p=0.0},{c=0xffffff,a=0.35,p=0.71},{c=0xffffff,a=0.35,p=0.73},{c=0xffffff,a=0.35,p=0.75},{c=0x000000,a=0.0,p=1}},lw=1,sub=1,db=0,subtab=subtab})
--######################################################################
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})
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})
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})
--######################################################################
subtab={
{d="start",x=5.5,y=265.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=200,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})
subtab={
{d="start",x=5,y=265},
{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=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.63},{c=0xffffff,a=0.35,p=0.65},{c=0xffffff,a=0.35,p=0.67},{c=0x000000,a=0.3,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.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})
--######################################################################
subtab={
{d="start",x=5.5,y=365.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=200,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})
subtab={
{d="start",x=5,y=365},
{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=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.59},{c=0xffffff,a=0.35,p=0.61},{c=0xffffff,a=0.35,p=0.63},{c=0x000000,a=0.3,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.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})
--######################################################################
subtab={
{d="start",x=5.5,y=465.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=200,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})
subtab={
{d="start",x=5,y=465},
{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=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.55},{c=0xffffff,a=0.35,p=0.57},{c=0xffffff,a=0.35,p=0.59},{c=0x000000,a=0.3,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.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})
--######################################################################
subtab={
{d="start",x=5.5,y=565.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=200,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})
subtab={
{d="start",x=5,y=565},
{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=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.51},{c=0xffffff,a=0.35,p=0.53},{c=0xffffff,a=0.35,p=0.55},{c=0x000000,a=0.3,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.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})
--######################################################################
subtab={
{d="start",x=5.5,y=665.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=200,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})
subtab={
{d="start",x=5,y=665},
{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=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.47},{c=0xffffff,a=0.35,p=0.49},{c=0xffffff,a=0.35,p=0.51},{c=0x000000,a=0.3,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.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})
--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=615--^alerts will display in a single column
alert_gap=40--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=12,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 ##################################
--#######################################################################
bargraph.lua (this draws all the pretty stuff)
[code]--easy compound shape drawing with gradients by mrpeachy 8/13/12
require 'cairo'
function conky_main_bars()
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
--#########################################################################################################
--[[subtab={} instructions #############################################################################
each step of the drawn shape must be in a sub table
first entry must be d="start", set x and y of start point of shape
other entried can be these types
d="line" , draws a line to set coordinates,x and y
d="rline" , draws a relative line starting at the last set point of the shape, x and y values are relative to this point
d="arc_c" , draws an clockwise arc for the set amount of degrees starting at the last set point of the shape
d="arc_a" , draws an anticlockwise arc for the set amount of degrees starting at the last set point of the shape
for arc_c and arc_a you need to set a circle quandrant where the arc will start
q=1 is the top right quarter of the circle
q=2 is the bottom right quarter
q=3 is bottom left quarter
q=4 is the top left quarter
r is the radius of the circle
degs is the number of degrees to be drawn
EG:
subtab={--start of sub path table
{d="start",x=100,y=100},
{d="rline",x=150,y=0},
{d="arc_c",q=1,r=50,degs=90},
{d="rline",x=0,y=25},
{d="rline",x=-50,y=0},
{d="rline",x=0,y=-10},
{d="arc_a",q=1,r=15,degs=90},
{d="line",x=100,y=150},
}--end of sub path table
--NOTE setting up subtab by ityself does not draw anything, subtab is then sent to the function grec in the table below
--grec settings #################################