Now THIS is just NUTZ:
weatherrc:
Code:
##############################################
# 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 1550 900
maximum_width 1550
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 top_left
gap_x -30
gap_y 1
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 ~/v9000/v9000-2.lua
lua_draw_hook_pre weather
lua_load ~/v9000/s11templateh-left.lua
TEXT
${voffset -30}
v9000-2.lua:
Code:
--weather v9000 by mrpeachy 01/10/12; released: Feb 29, 2012
require 'cairo'
require 'imlib2'
local username = os.getenv("USERNAME")
--you can enter your username here in case of errors,
--enter username in quotes like this username = "yourname"
local username = "dale"
package.path = '/home/'..username..'/.v9000_config.lua'
require '.v9000_config'
start=1
--INITIALIZE SETTINGS-- need only be run once
settings_table=weather_settings()
--##################################
--######## main function ###########
function conky_weather()--##########
--##################################
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}'))
--###UNCOMMENT THE BELOW LINE TO ENABLE CPU DELAY##########################################################
--if updates>5 then--###### YOU WILL ALSO HAVE TO UNCOMMENT THE MATCHING end ON LINE 923 ####################
--#########################################################################################################
local testing=0--this setting is for script testing, if not in testing set to 0
--#########################################################################################################
--############start of timed section#######################################################################
--#########################################################################################################
local timer=(updates %tonumber(settings_table[1]))
--################################################
if timer==0 or start==1 then--######
start=nil--#######################################
local web=settings_table[2]
local alert_check=settings_table[13]
--################################################
print ("gathering data with curl")
local f=io.popen("curl --max-time 60 '"..web.."' | sed 's/%//g'")
allweatherdata=f:read("*a")
f:close()
allweatherdata=string.gsub(allweatherdata,"[\n\r]","")
testall=string.find(allweatherdata,">10 Day Forecast ")
--CHECK FOR WEATHER ALERTS
if testall~=nil and alert_check==1 then
local alert=string.find(allweatherdata,"Severe Weather Alert!")
if alert~=nil then
print ("getting weather alerts")
--get alert web
local a,b,alertchunk=string.find(allweatherdata,">Local Information</div>(.*)>Severe Weather Alert!<")
local a,b,alertsite=string.find(alertchunk,"><a href=%p(.*)%p><img src=")
local f=io.popen("curl --max-time 60 'http://www.intellicast.com"..alertsite.."' | sed 's/%//g'")
alertdata=f:read("*a")
f:close()
alertdata=string.gsub(alertdata,"[\n\r]","")
alerttest=string.find(alertdata,"%a")
else
print ("you have no weather alerts")
alerttest=0
end--if alert~=nil
else
print ("not checking for alerts")
alerttest=1
end--if testall and alert check
processall=1
end--of timed data gathering section
--#########################################################################
--#########################################################################
--in case curl craps up it should retry until it works
if testall==nil or alerttest==nil then
print ("curl attempt timed out, trying again")
local web=settings_table[2]
local alert_check=settings_table[13]
local f=io.popen("curl --max-time 60 '"..web.."' | sed 's/%//g'")
allweatherdata=f:read("*a")
f:close()
allweatherdata=string.gsub(allweatherdata,"[\n\r]","")
testall=string.find(allweatherdata,">10 Day Forecast ")
--CHECK FOR WEATHER ALERTS
if testall~=nil and alert_check==1 then
local alert=string.find(allweatherdata,"Severe Weather Alert!")
if alert~=nil then
print ("getting weather alerts")
--get alert web
local a,b,alertchunk=string.find(allweatherdata,">Local Information</div>(.*)>Severe Weather Alert!<")
local a,b,alertsite=string.find(alertchunk,"><a href=%p(.*)%p><img src=")
local f=io.popen("curl --max-time 60 'http://www.intellicast.com"..alertsite.."' | sed 's/%//g'")
alertdata=f:read("*a")
f:close()
alertdata=string.gsub(alertdata,"[\n\r]","")
alerttest=string.find(alertdata,"%a")
else
print ("you have no weather alerts")
alerttest=0
end--if alert~=nil
else
print ("not checking for alerts")
alerttest=1
end--if testall and alert_check
processall=1
end--if testall==nil
--end or curl reruns ######################################################
--START PROCESSING ###########################################################################
if testall~=nil and alerttest~=nil and processall==1 then
local weathericons=settings_table[3]
local con_short=settings_table[4]
local visibility_unit=settings_table[6]
local wind_mph_unit=settings_table[7]
local wind_km_unit=settings_table[8]
local wind_kts_unit=settings_table[9]
local ceiling_unit=settings_table[10]
local wind_degrees_unit=settings_table[11]
local translate=settings_table[12]
local alert_check=settings_table[13]
--#########################################################################
--LOAD TRANSLATE TABLES IF TRANSLATE SETTING = 1
if translate==1 then
monthshort=settings_table[21]
monthnames=settings_table[20]
dayhort=settings_table[19]
daynames=settings_table[18]
neswtext=settings_table[14]
tsuffix=settings_table[15]
uvindextext=settings_table[16]
moonphases=settings_table[17]
additional=settings_table[22]
else--neswtext,tsuffix,uvindextext,moonphases,daynames,dayshort,monthnames,monthshort
dayshort={Monday="Mon",Tuesday="Tue",Wednesday="Wed",Thursday="Thu",Friday="Fri",Saturday="Sat",Sunday="Sun"}
monthshort={January="Jan",February="Feb",March="Mar",April="Apr",May="May",June="Jun",July="Jul",August="Aug",September="Sep",October="Oct",November="Nov",December="Dec"}
end--end if translate =1
--#########################################################################
--process data tables
--intellicast to conky weather icon conversion
wimage={
wx_65="32", -- Clear
wx_66="30", -- Partly Cloudy
wx_67="26", -- Cloudy
wx_68="32", -- Clear
wx_69="28", -- Mostly Cloudy
wx_70="20", -- Fog
wx_71="32", -- Clear
wx_72="21", -- Haze
wx_73="36", -- Hot
wx_74="14", -- Light Snow Showers
wx_75="28", -- Mostly Cloudy
wx_76="18", -- Sleet
wx_77="14", -- Light Snow Showers
wx_78="23", -- Blustery
wx_79="05", -- Mixed Rain and Snow
wx_80="15", -- Drifting Snow
wx_81="15", -- Drifting Snow
wx_82="11", -- Light Rain
wx_83="16", -- Snow
wx_84="00", -- Tornado
wx_85="32", -- Clear
wx_86="25", -- N/A
wx_87="09", -- Drizzle
wx_88="05", -- Mixed Rain and Snow
wx_89="18", -- Sleet
wx_90="18", -- Sleet
wx_91="39", -- Scattered Showers
wx_92="39", -- Scattered Showers
wx_93="39", -- Scattered Showers
wx_94="39", -- Scattered Showers
wx_95="37", -- Isolated Thunderstorms
wx_96="37", -- Isolated Thunderstorms
wx_97="31", -- Clear
wx_98="29", -- Partly Cloudy
wx_99="27", -- Mostly Cloudy
wx_100="47", -- Isolated Thunderstorms
wx_101="47", -- Isolated Thunderstorms
wx_102="33", -- Fair
wx_103="26", -- Cloudy
wx_104="20", -- Fog
wx_105="45", -- Scattered Showers
wx_106="45", -- Scattered Showers
wx_107="11", -- Light Rain
wx_108="46", -- Snow Showers
wx_109="46", -- Snow Showers
wx_110="06", -- Mixed Rain and Sleet
wx_111="18", -- Sleet
wx_112="06", -- Mixed Rain and Sleet
wx_113="46", -- Snow Showers
wx_114="46", -- Snow Showers
wx_115="31", -- Clear
wx_116="47", -- Isolated Thunderstorms
}--end w image table
--convert intellicast icons to weather font
wfont={
wx_65="a",
wx_66="c",
wx_67="f",
wx_68="a",
wx_69="d",
wx_70="0",
wx_71="a",
wx_72="9",
wx_73="5",
wx_74="p",
wx_75="d",
wx_76="w",
wx_77="p",
wx_78="6",
wx_79="x",
wx_80="8",
wx_81="8",
wx_82="h",
wx_83="q",
wx_84="m",
wx_85="a",
wx_86="-",
wx_87="h",
wx_88="x",
wx_89="w",
wx_90="w",
wx_91="g",
wx_92="g",
wx_93="g",
wx_94="g",
wx_95="k",
wx_96="k",
wx_97="A",
wx_98="C",
wx_99="D",
wx_100="K",
wx_101="K",
wx_102="B",
wx_103="f",
wx_104="0",
wx_105="G",
wx_106="G",
wx_107="h",
wx_108="O",
wx_109="O",
wx_110="x",
wx_111="w",
wx_112="x",
wx_113="O",
wx_114="O",
wx_115="A",
wx_116="K",
}--end w font table
--conversion day and month tables
moonfontt={
["New"]="@",
["Full"]="=",
["First Quarter"]="T",
["Last Quarter"]="G",
["Waning Gibbous"]="D",
["Waning Crescent"]="J",
["Waxing Crescent"]="Q",
["Waxing Gibbous"]="W",
}--end of moon font table
moonicont={
["New"]=weathericons.."moon_new.png",
["Full"]=weathericons.."moon_full.png",
["First Quarter"]=weathericons.."moon_first_quarter.png",
["Last Quarter"]=weathericons.."moon_last_quarter.png",
["Waning Gibbous"]=weathericons.."moon_waning_gibbous.png",
["Waning Crescent"]=weathericons.."moon_waning_crescent.png",
["Waxing Crescent"]=weathericons.."moon_waxing_crescent.png",
["Waxing Gibbous"]=weathericons.."moon_waxing_gibbous.png",
}--end of moon icon table
windfontt={
S="9",
SSW=":",
SW=";",
WSW="<",
W="=",
WNW=">",
NW="?",
NNW="@",
N="1",
NNE="2",
NE="3",
ENE="4",
E="5",
ESE="6",
SE="7",
SSE="8"
}--end of wind direction font table
--#########################################################################
--#########################################################################
--setup tables for forecast weather
forecast_day={}
forecast_day_caps={}
forecast_day_lc={}
forecast_day_short={}
forecast_day_short_caps={}
forecast_day_short_lc={}
forecast_month={}
forecast_month_caps={}
forecast_month_lc={}
forecast_month_short={}
forecast_month_short_caps={}
forecast_month_short_lc={}
forecast_date={}
weather_icon={}
weather_font={}
high_temp={}
low_temp={}
conditions={}
conditions_caps={}
conditions_lc={}
conditions_short={}
conditions_short_caps={}
conditions_short_lc={}
sun_rise={}
sun_rise_lc={}
sun_rise_time={}
sun_rise_24={}
moon_rise={}
moon_rise_lc={}
moon_rise_time={}
moon_rise_24={}
moon_rise_ampm={}
moon_rise_ampm_lc={}
sun_set={}
sun_set_lc={}
sun_set_time={}
sun_set_24={}
moon_set={}
moon_set_lc={}
moon_set_time={}
moon_set_24={}
moon_set_ampm={}
moon_set_ampm_lc={}
humidity={}
precipitation={}
snow={}
cloud_cover={}
moon_phase={}
moon_phase_caps={}
moon_phase_lc={}
moon_font={}
moon_icon={}
wind_mph={}
wind_km={}
wind_kts={}
wind_font={}
wind_icon={}
wind_deg={}
wind_nesw={}
uv_index_num={}
uv_index_txt={}
uv_index_txt_caps={}
uv_index_txt_lc={}
--#########################################################################
--#########################################################################
--get forecast chunk
local a,b,allweather=string.find(allweatherdata,">10 Day Forecast (.*)>More from Intellicast</div>")
--extract information into tables
local start=0
local f=1
while f~=nil do
--match forecast day name and date
local s,f,t=string.find(allweather,"<td colspan=\"2\"><strong>([%a,%s%d]*)</strong></td>",start)
if t~=nil then
--split name from month and date
local a,b,day=string.find(t,"(%a*),%s")
local a,b,month=string.find(t,",%s(%a*)%s")
local a,b,date=string.find(t,"(%d*)$")
--ser day names, regular, caps, lowercase and short
table.insert(forecast_day_short,dayshort[day])
table.insert(forecast_day_short_caps,string.upper(dayshort[day]))
table.insert(forecast_day_short_lc,string.lower(dayshort[day]))
if translate==1 then
day=daynames[day]
else
day=day
end
table.insert(forecast_day,day)
table.insert(forecast_day_caps,string.upper(day))
table.insert(forecast_day_lc,string.lower(day))
--set month types
table.insert(forecast_month_short,monthshort[month])
table.insert(forecast_month_short_caps,string.upper(monthshort[month]))
table.insert(forecast_month_short_lc,string.lower(monthshort[month]))
if translate==1 then
month=monthnames[month]
else
month=month
end
table.insert(forecast_month,month)
table.insert(forecast_month_caps,string.upper(month))
table.insert(forecast_month_lc,string.lower(month))
--set date
table.insert(forecast_date,date)
end--if t~= nil
--intellicast weather icon match
local s,f,t=string.find(allweather,"40_white/(wx_[%d]*).png\"",start)
--convert to conkyweather icon
if t~=nil then
table.insert(weather_icon,weathericons..wimage[t]..".png")
--convert to weather font
table.insert(weather_font,wfont[t])
end
--match conditions
local s,f,t=string.find(allweather," /><br />([%a%s%p]*)</td>",start)
if t~=nil then
table.insert(conditions,t)
table.insert(conditions_caps,string.upper(t))
table.insert(conditions_lc,string.lower(t))
--set short versions--------------------------------
local cons=t
for k,v in pairs(con_short) do
local cons_length=string.len(cons)
local match_length=string.len(k)
if cons_length==match_length then
cons=string.gsub(cons,k,v)
end
end
table.insert(conditions_short,cons)
table.insert(conditions_short_caps,string.upper(cons))
table.insert(conditions_short_lc,string.lower(cons))
-----------------------------------------------------
end
--match high temp
local s,f,t=string.find(allweather,"\"Hi\">([%p%d]*)°",start)
table.insert(high_temp,t)
--match low temp
local s,f,t=string.find(allweather,"\"Lo\">([%p%d]*)°",start)
table.insert(low_temp,t)
--match sun rise times
local s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",start)
if t~=nil then
--get time only
local a,b,tm=string.find(t,"([%d%p]*)")
--get suffix only
local a,b,suf=string.find(t,"(%u%u)")
--###############################
--24 hour conversion
table.insert(sun_rise_24,convert24(tm,suf))
--###############################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
table.insert(sun_rise,tm.." "..suf)
table.insert(sun_rise_lc,string.lower(tm.." "..suf))
table.insert(sun_rise_time,tm)
end
--match sun set times
local s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
if t~=nil then
--get time only
local a,b,tm=string.find(t,"([%d%p]*)")
--get suffix only
local a,b,suf=string.find(t,"(%u%u)")
--###############################
--24 hour conversion
table.insert(sun_set_24,convert24(tm,suf))
--###############################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
table.insert(sun_set,tm.." "..suf)
table.insert(sun_set_lc,string.lower(tm.." "..suf))
table.insert(sun_set_time,tm)
end
--moon rise
local s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",f)
if t~=nil then
--get time only
local a,b,tm=string.find(t,"([%d%p]*)")
--get suffix only
local a,b,suf=string.find(t,"(%u%u)")
--###############################
--24 hour conversion
table.insert(moon_rise_24,convert24(tm,suf))
--###############################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
table.insert(moon_rise,tm.." "..suf)
table.insert(moon_rise_lc,string.lower(tm.." "..suf))
table.insert(moon_rise_time,tm)
table.insert(moon_rise_ampm,suf)
table.insert(moon_rise_ampm_lc,string.lower(suf))
end
--moon set
local s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
if t~=nil then
--get time only
local a,b,tm=string.find(t,"([%d%p]*)")
--get suffix only
local a,b,suf=string.find(t,"(%u%u)")
--###############################
--24 hour conversion
table.insert(moon_set_24,convert24(tm,suf))
--###############################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
table.insert(moon_set,tm.." "..suf)
table.insert(moon_set_lc,string.lower(tm.." "..suf))
table.insert(moon_set_time,tm)
table.insert(moon_set_ampm,suf)
table.insert(moon_set_ampm_lc,string.lower(suf))
end
--match uv index
local s,f,tuv=string.find(allweather,"UV Index:</strong>%s*(%d*%s*%([%a%s]*%))%s*<br />",start)
if tuv~=nil then
--get just number
local a,b,unm=string.find(tuv,"(%d*)%s*%([%a%s]*%)")
--get just text
local a,b,utx=string.find(tuv,"%d*%s*%(([%a%s]*)%)")
table.insert(uv_index_num,unm)
if translate==1 then
utx=uvindextext[utx]
else
utx=utx
end
table.insert(uv_index_txt,utx)
table.insert(uv_index_txt_caps,string.upper(utx))
table.insert(uv_index_txt_lc,string.lower(utx))
end
--match humidity
local s,f,t=string.find(allweather,"Humidity:</strong> (%d*)<br />",start)
table.insert(humidity,t)
--match ppt
local s,f,t=string.find(allweather,"Precipitation:</strong> (%d*)<br />",start)
table.insert(precipitation,t)
--match snow %
local s,f,t=string.find(allweather,"Snow Probability:</strong>%s*(%d*)<br />",start)
table.insert(snow,t)
--match cloud coveage
local s,f,t=string.find(allweather,"Cloud Coverage:</strong> (%d*)<br />",start)
table.insert(cloud_cover,t)
--match moon phase
local s,f,t=string.find(allweather,"Moon Phase:</strong> ([%a%s]*) <br />",start)
--set moon phase text
if t~= nil then
--set moon phase font and icon
table.insert(moon_font,moonfontt[t])
table.insert(moon_icon,moonicont[t])
if translate==1 then
t=moonphases[t]
else
t=t
end
table.insert(moon_phase,t)
table.insert(moon_phase_caps,string.upper(t))
table.insert(moon_phase_lc,string.lower(t))
end
--match wind speeds
local s,f,tmph=string.find(allweather,"Wind Speed:</strong> (%d*)Mph",start)
local tmph=tonumber(tmph)
table.insert(wind_mph,tmph)
local s,f,t=string.find(allweather,"Mph%s*%((%d*)Km,",start)
table.insert(wind_km,t)
local s,f,t=string.find(allweather,"Km,%s*(%d*)Kts%)",start)
table.insert(wind_kts,t)
--match wind direction
local s,f,twd=string.find(allweather,"Wind Direction:</strong> ([%d&;%s%(%a%)]*)%s*</div>",start)
if twd~=nil then
local a,b,tdeg=string.find(twd,"(%d*)°")
table.insert(wind_deg,tdeg)
--match wind font and nesw
local a,b,tnesw=string.find(twd,"%((%a*)%)")
table.insert(wind_font,windfontt[tnesw])
if tmph>0 and tmph<19 then
table.insert(wind_icon,weathericons.."green_"..string.lower(tnesw)..".png")
elseif tmph>18 and tmph<38 then
table.insert(wind_icon,weathericons.."yellow_"..string.lower(tnesw)..".png")
elseif tmph>37 and tmph<64 then
table.insert(wind_icon,weathericons.."orange_"..string.lower(tnesw)..".png")
elseif tmph>63 then
table.insert(wind_icon,weathericons.."green_"..string.lower(tnesw)..".png")
elseif tmph==0 then
table.insert(wind_icon,weathericons.."no_wind.png")
end
if translate==1 then
tnesw=neswtext[tnesw]
else
tnesw=tnesw
end
table.insert(wind_nesw,tnesw)
end
if f==nil then break end
start=f
end--while
--#########################################################################################################################################
--#########################################################################
--get location
local a,b,wl=string.find(allweatherdata,"<title>%s*Intellicast%s%p%s(.*)</title>")
weather_location=string.gsub(wl," Extended Forecast in",",")
--#########################################################################
--#########################################################################
--format now weather
--extract current data
--get now weather chunk
local a,b,nowweather=string.find(allweatherdata,">Current Conditions (.*)>View Detailed Observations for the last<br />")
now={}
monthlong={Jan="January",Feb="February",Mar="March",Apr="April",May="May",Jun="June",Jul="July",Aug="August",Sep="September",Oct="October",Nov="November",Dec="December"}
local s,f,tnow=string.find(nowweather,"<div style=\"float:right;color:#666;\"> As of ([%d%p%a%s]*) %(Local Time%)")
local s,f,t=string.find(tnow,"(%d*%p%d*%s%a*) on")
--get time only
local a,b,ntm=string.find(t,"(%d*%p%d*)")
--get suffix only
local a,b,suf=string.find(t,"(%u%u)")
--###############################
--24 hour conversion
now["time_24"]=convert24(ntm,suf)
--###############################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
now["time"]=ntm.." "..suf
now["time_lc"]=string.lower(ntm.." "..suf)
now["time_num"]=ntm
now["time_ampm"]=suf
now["time_ampm_lc"]=string.lower(suf)
--get day
local s,f,t=string.find(tnow,"on (%a*)%s%d*")
if translate==1 then
day=daynames[t]
else
day=t
end
now["day"]=day
now["day_caps"]=string.upper(day)
now["day_lc"]=string.lower(day)
--short day names
local ds=dayshort[t]
now["day_short"]=ds
now["day_short_caps"]=string.upper(ds)
now["day_short_lc"]=string.lower(ds)
--get date
local s,f,t=string.find(tnow,"%s(%d%d)%s")
now["date"]=t
--get months
local s,f,t=string.find(tnow,"%d%d%s(%a*)%s%d")
if translate==1 then
mnth=monthlong[t]
now["month_short"]=monthshort[mnth]
now["month_short_caps"]=string.upper(monthshort[mnth])
now["month_short_lc"]=string.lower(monthshort[mnth])
mnth=monthnames[mnth]
else
now["month_short"]=t
now["month_short_caps"]=string.upper(t)
now["month_short_lc"]=string.lower(t)
mnth=monthlong[t]
end
now["month"]=mnth
now["month_caps"]=string.upper(mnth)
now["month_lc"]=string.lower(mnth)
--get year
local s,f,t=string.find(tnow,"%a%a%a%s(%d%d%d%d)")
now["year"]=t
--get weather icon
local s,f,t=string.find(nowweather,"40_white/(wx_[%d]*)%ppng%p%stitle=%p")
now["weather_icon"]=weathericons..wimage[t]..".png"
now["weather_font"]=wfont[t]
--class=%pIcon%p /> ([%a%s]*)%s*</td>
local s,f,t=string.find(nowweather,"class=%pIcon%p /> ([%a%s%p]*)%s*%s*</td>%s*<td class=%pEmpty%p> ")
local t=t:gsub("^%s*(.-)%s*$", "%1")
now["conditions"]=t
now["conditions_caps"]=string.upper(t)
now["conditions_lc"]=string.lower(t)
--set short versions------------------------
local cons=t
for k,v in pairs(con_short) do
local cons_length=string.len(cons)
local match_length=string.len(k)
if cons_length==match_length then
cons=string.gsub(cons,k,v)
end
end
now["conditions_short"]=cons
now["conditions_short_caps"]=string.upper(cons)
now["conditions_short_lc"]=string.lower(cons)
--------------------------------------------
local s,f,t=string.find(nowweather,"Temperature\">([%p%d]*)°")
now["temp"]=t
local s,f,t=string.find(nowweather,">Feels Like: ([%p%d]*)°</a>")
now["feels_like"]=t
local s,f,t=string.find(nowweather,">Wind Chill: </a></td>%s*<td>([%p%d]*)°</td>")
now["wind_chill"]=t
local s,f,t=string.find(nowweather,">Ceiling: </a></td>%s*<td>([%a%d]*)</td>")
if t~="Unl" then
local s,f,t=string.find(t,"([%d%p]*)")
tc=t..ceiling_unit
else
if translate==1 then unlset=additional.Unl else unlset=t end
tc=unlset
end
now["ceiling"]=tc
now["ceiling_caps"]=string.upper(tc)
now["ceiling_lc"]=string.lower(tc)
--get heat index
local s,f,t=string.find(nowweather,">Heat Index: </a></td>%s*<td>([%p%d]*)°</td>")
now["heat_index"]=t
--get visibility
local s,f,t=string.find(nowweather,">Visibility: </a></td>%s*<td>([%a%d%p]*)</td>")
if t~="Unl" then
local s,f,t=string.find(t,"([%d%p]*)")
tv=t..visibility_unit
else
if translate==1 then unlset=additional.Unl else unlset=t end
tv=unlset
end
now["visibility"]=tv
now["visibility_caps"]=string.upper(tv)
--get dew point
local s,f,t=string.find(nowweather,">Dew Point: </a></td>%s*<td>([%p%d]*)°</td>")
now["dew_point"]=t
--get wind speed
local s,f,t=string.find(nowweather,">Wind: </a></td>%s*<td>(%d*)mph</td>")
local tmph=tonumber(t)
now["wind_mph"]=t..wind_mph_unit
now["wind_mph_caps"]=string.upper(t..wind_mph_unit)
--convert mph to km and knots #################################################
--[[1 mile per hour = 0.869 international nautical mile per hour (knot)
1 mile per hour = 1.609 kilometers per hour
1 mile per hour = 0.4470 meter per second
1 knot = 1.852 kilometers per hour
1 knot = 0.5144 meter per second
1 meter per second = 3.6 kilometers per hour]]
now["wind_km"]=round(tonumber(t)*1.609)..wind_km_unit
now["wind_km_caps"]=string.upper(round(tonumber(t)*1.609)..wind_km_unit)
now["wind_kts"]=round(tonumber(t)*0.869)..wind_kts_unit
now["wind_kts_caps"]=string.upper(round(tonumber(t)*0.869)..wind_kts_unit)
--#############################################################################
local s,f,t=string.find(nowweather,">Humidity: </a></td>%s*<td>(%d*)</td>")
now["humidity"]=t
--get wind direction #######################################################
local s,f,twd=string.find(nowweather,">Direction: </a></td>%s*<td style=[%p%a]*>([%d&;%s%(%a%)]*)</td>%s*</tr>")
--check for NA
local a,b,t=string.find(twd,"(%a*)")
local tnesw=t
if tnesw~="NA" then
local a,b,t=string.find(twd,"(%d*)°")
now["wind_deg"]=t..wind_degrees_unit
local a,b,tnesw=string.find(twd,"%((%a*)%)")
if tmph>0 and tmph<19 then
now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
elseif tmph>18 and tmph<38 then
now["wind_icon"]=weathericons.."yellow_"..string.lower(tnesw)..".png"
elseif tmph>37 and tmph<64 then
now["wind_icon"]=weathericons.."orange_"..string.lower(tnesw)..".png"
elseif tmph>63 then
now["wind_icon"]=weathericons.."green_"..string.lower(tnesw)..".png"
end
now["wind_font"]=windfontt[tnesw]
--################################
if translate==1 then
tnesw=neswtext[tnesw]
else
tnesw=tnesw
end
--################################
now["wind_nesw"]=tnesw
else
if translate==1 then naset=additional.NA else naset="NA" end
now["wind_deg"]=naset
now["wind_icon"]=weathericons.."no_wind.png"
now["wind_nesw"]=naset
now["wind_font"]=windfontt["N"]
end
--END WIND DIRECTION #######################################################
--get pressure
local s,f,t=string.find(nowweather,">Pressure: </a></td>%s*<td>([%d%p]*)\"</td>")
now["pressure"]=t
--convert pressures ########################################################
--[[ 1 inch of mercury = 25.4 mm of mercury = 33.86 millibars
= 33.86 hectoPascals]]
now["pressure_mb"]=round(tonumber(t))
--##########################################################################
local s,f,t=string.find(nowweather,">Gusts: </a></td>%s*<td>([%d%a]*)</td>")
if t~="NA" then
local s,f,t=string.find(t,"(%d*)")
tg=t..wind_mph_unit
tgkm=round(tonumber(t)*1.609)..wind_km_unit
tgkts=round(tonumber(t)*0.869)..wind_kts_unit
else
if translate==1 then naset=additional.NA else naset="NA" end
tg=naset
tgkm=naset
tgkts=naset
end
now["wind_gusts"]=tg
now["wind_gusts_caps"]=string.upper(tg)
now["wind_gusts_km"]=tgkm
now["wind_gusts_km_caps"]=string.upper(tgkm)
now["wind_gusts_kts"]=tgkts
now["wind_gusts_kts_caps"]=string.upper(tgkts)
--##########################################################################
--get hourly forecast options hour1--------------------
--get day 1 bit
local s,f,hfc=string.find(nowweather,"<td class=%pHour%p%sstyle=%ppadding%pleft([%a%d%p%s]*)%pdeg%p</strong>",1)
--get time and conditions
--<strong>1 PM</strong><br />%s*P Cloudy%s*</td>%s*<td class=%pHour%p
local a,b,tm=string.find(hfc,"<strong>([%d%p]*)[%s%a]*</strong><br",1)
local a,b,suf=string.find(hfc,"<strong>[%d%p%s]*([%a]*)</strong><br",1)
--24 hour conversion ######################
now["fc_hour1_time_24"]=convert24(tm,suf)
--#########################################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
now["fc_hour1_time"]=tm
now["fc_hour1_ampm"]=suf
now["fc_hour1_ampm_lc"]=string.lower(suf)
local a,b,t=string.find(hfc,"</strong><br%s/>%s*([%p%s%a]*)%s*</td>%s*<td class=%pHour%p",1)
now["fc_hour1_cond"]=t
now["fc_hour1_cond_lc"]=string.lower(t)
now["fc_hour1_cond_caps"]=string.upper(t)
----------set short versions--------------------------------
local cons=t
for k,v in pairs(con_short) do
local cons_length=string.len(cons)
local match_length=string.len(k)
if cons_length==match_length then
cons=string.gsub(cons,k,v)
end
end
now["fc_hour1_cond_short"]=cons
now["fc_hour1_cond_short_caps"]=string.upper(cons)
now["fc_hour1_cond_short_lc"]=string.lower(cons)
-------------------------------------------------------------
--get weather icon and font
local a,b,t=string.find(hfc,"32_white/(wx_[%d]*)%ppng%p%stitle=%p",1)
now["fc_hour1_wicon"]=weathericons..wimage[t]..".png"
now["fc_hour1_wfont"]=wfont[t]
--get temperature
--><strong>-5°</strong></td>
local a,b,t=string.find(hfc,"><strong>([%p%d]*)°</strong></td>",1)
now["fc_hour1_temp"]=t
--end of hour1 data gathering--repeat 2 more times
--get hourly forecast options hour2--------------------
local start=tonumber(b)
--get time and conditions
--<strong>1 PM</strong><br />%s*P Cloudy%s*</td>%s*<td class=%pHour"%p
local a,b,tm=string.find(hfc,"<strong>([%d%p]*)[%s%a]*</strong><br",start)
local a,b,suf=string.find(hfc,"<strong>[%d%p%s]*([%a]*)</strong><br",start)
--24 hour conversion ######################
now["fc_hour2_time_24"]=convert24(tm,suf)
--#########################################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
now["fc_hour2_time"]=tm
now["fc_hour2_ampm"]=suf
now["fc_hour2_ampm_lc"]=string.lower(suf)
local a,b,t=string.find(hfc,"</strong><br%s/>%s*([%a%s%p]*)%s*</td>%s*<td class=%pHour%p",start)
now["fc_hour2_cond"]=t
now["fc_hour2_cond_lc"]=string.lower(t)
now["fc_hour2_cond_caps"]=string.upper(t)
----------set short versions--------------------------------
local cons=t
for k,v in pairs(con_short) do
local cons_length=string.len(cons)
local match_length=string.len(k)
if cons_length==match_length then
cons=string.gsub(cons,k,v)
end
end
now["fc_hour2_cond_short"]=cons
now["fc_hour2_cond_short_caps"]=string.upper(cons)
now["fc_hour2_cond_short_lc"]=string.lower(cons)
-------------------------------------------------------------
--get weather icon and font
local a,b,t=string.find(hfc,"32_white/(wx_[%d]*)%ppng%p%stitle=%p",start)
now["fc_hour2_wicon"]=weathericons..wimage[t]..".png"
now["fc_hour2_wfont"]=wfont[t]
--get temperature
--><strong>-5°</strong></td>
local a,b,t=string.find(hfc,"><strong>([%p%d]*)°</strong></td>",start)
now["fc_hour2_temp"]=t
--end of hour2 data gathering--repeat 1 more times
--get hourly forecast options hour3--------------------
local start=tonumber(b)
--get time and conditions
--<strong>1 PM</strong><br />%s*P Cloudy%s*</td>%s*<td class=%pHour"%p
local a,b,tm=string.find(hfc,"<strong>([%d%p]*)[%s%a]*</strong><br",start)
local a,b,suf=string.find(hfc,"<strong>[%d%p%s]*([%a]*)</strong><br",start)
--24 hour conversion ######################
now["fc_hour3_time_24"]=convert24(tm,suf)
--#########################################
if translate==1 then
suf=tsuffix[suf]
else
suf=suf
end
now["fc_hour3_time"]=tm
now["fc_hour3_ampm"]=suf
now["fc_hour3_ampm_lc"]=string.lower(suf)
local a,b,t=string.find(hfc,"</strong><br%s/>%s*([%a%s%p]*)%s*</td>%s*<td class=%pHour%p",start)
now["fc_hour3_cond"]=t
now["fc_hour3_cond_lc"]=string.lower(t)
now["fc_hour3_cond_caps"]=string.upper(t)
----------set short versions--------------------------------
local cons=t
for k,v in pairs(con_short) do
local cons_length=string.len(cons)
local match_length=string.len(k)
if cons_length==match_length then
cons=string.gsub(cons,k,v)
end
end
now["fc_hour3_cond_short"]=cons
now["fc_hour3_cond_short_caps"]=string.upper(cons)
now["fc_hour3_cond_short_lc"]=string.lower(cons)
-------------------------------------------------------------
--get weather icon and font
local a,b,t=string.find(hfc,"32_white/(wx_[%d]*)%ppng%p%stitle=%p",start)
now["fc_hour3_wicon"]=weathericons..wimage[t]..".png"
now["fc_hour3_wfont"]=wfont[t]
--get temperature
--><strong>-5°</strong></td>
local a,b,t=string.find(hfc,"><strong>([%p%d]*)",start)
now["fc_hour3_temp"]=t
--end of hour3 data gathering--finished for all hours
--ALERTS###############################################################
if alert_check==1 then
--set tables
alert_type={}
alert_issued={}
if alerttest~=0 then
alert_icon=weathericons.."icon_alert_1.gif"
--extract information into tables
local start=0
local f=1
while f~=nil do
local s,f,t=string.find(alertdata,"><strong class='Alert'>([%a%s]*)</strong><br/>",start)
if t~=nil then
table.insert(alert_type,string.upper(t))
end--if t~=nil
local s,f,t=string.find(alertdata,"<br />([%d%a%s:]*)<br /><br />",start)
if t~=nil then
table.insert(alert_issued,t)
end--if t~=nil
if f==nil then break end
start=f
alert_number=#alert_type
end--while
else
alert_icon=weathericons.."icon_alert_0.gif"
table.insert(alert_type,"NO ALERTS")
table.insert(alert_issued,"")
alert_number=0
end--alerttest~=nil
else
alert_type={}
alert_issued={}
alert_icon=weathericons.."icon_alert_0.gif"
table.insert(alert_type,"alerts turned off")
table.insert(alert_issued,"")
alert_number=0
end--if alert check ###########################################
--###############end of data processing########################
--#########################################################################
if testing==0 then
processall=0
print ("processing complete")
elseif testing==1 then
processall=1
end--if testing ==0
--###################################################################################
end--of data processing section #####################################################
--###################################################################################
if processall==0 or testing==1 then
_G.weather_script()
end
--#########################################################################################################
--###UNCOMMENT THE BELOW LINE TO ENABLE CPU DELAY##########################################################
--end--####### end of if updates>5 #############################
--#########################################################################################################
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
--######################################
end-- end main function ################
--######################################
function round(num)
local idp=tonumber(settings_table[5])
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end--of round function #################################################################
function string:split(delimiter)--######################################################
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
table.insert( result, string.sub( self, from ) )
return result
end--string split #######################################################################
function xout(txj)--c,a,f,fs,x,y,txt,j ##################################################
c=nil
c=(txj.c or default_color)
a=nil
a=(txj.a or default_alpha)
f=nil
f=(txj.f or default_font)
fs=nil
fs=(txj.fs or default_font_size)
x=nil
x=(txj.x or 0)
y=nil
y=(txj.y or 0)
txt=nil
txt=(txj.txt or "set txt")
j=nil
j=(txj.j or "l")
local function col(c,a)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,a
end--local function
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local text=string.gsub(txt," ","_")
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
local wx=extents.width
cairo_set_source_rgba (cr,col(c,a))
if j=="l" then
cairo_move_to (cr,x,y)
adx=wx
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
adx=wx/2
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
adx=0
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
nextx=nil
nextx=adx+x
return nextx
end--function xout ###################################################################
function out(tx)--####################################################################
c=nil
c=(tx.c or default_color)
a=nil
a=(tx.a or default_alpha)
f=nil
f=(tx.f or default_font)
fs=nil
fs=(tx.fs or default_font_size)
x=nil
x=(tx.x or 0)
y=nil
y=(tx.y or 0)
txt=nil
txt=(tx.txt or "set txt")
local function col(c,a)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,a
end--local function
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
cairo_set_source_rgba (cr,col(c,a))
cairo_move_to (cr,x,y)
cairo_show_text (cr,txt)
cairo_stroke (cr)
end--function out ###################################################################
function image(im)--#################################################################
x=nil
x=(im.x or 0)
y=nil
y=(im.y or 0)
w=nil
w=(im.w or default_image_width)
h=nil
h=(im.h or default_image_height)
file=nil
file=tostring(im.file)
if file==nil then print("set image file") end
---------------------------------------------
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then
width=imlib_image_get_width()
else
width=tonumber(w)
end
if tonumber(h)==0 then
height=imlib_image_get_height()
else
height=tonumber(h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(x, y)
imlib_free_image()
show=nil
end--function image ##################################################################
function convert24(tm,suf)
local tmlen=string.len(tm)
local colon=string.find(tm,":")
if colon~=nil then
tmhr=string.sub(tm,1,colon-1)
tmmn=string.sub(tm,colon+1,tmlen)
else
tmhr=tm
tmmn=""
end
if suf=="PM" and tonumber(tmhr)~=12 then
tmhr=tmhr+12
elseif suf=="PM" and tonumber(tmhr)==12 then
tmhr=12
elseif suf=="AM" and tonumber(tmhr)<10 then
tmhr="0"..tmhr
elseif suf=="AM" and tonumber(tmhr)>=10 and tonumber(tmhr)~=12 then
tmhr=tmhr
elseif suf=="AM" and tonumber(tmhr)==12 then
tmhr="00"
end
if colon~=nil then
return tmhr..":"..tmmn
else
return tmhr
end--if colon~=nil
end--of function
--END OF SCRIPT
v9000_config.lua
Code:
--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/Weather.aspx?location=USGA0333"--insert unit=C& after aspx? for C
--set location of weather images (replace "benjamin" with your own username)
local weathericons="/home/dale/v9000/additional_files/weathericons/"
--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"]="Snow Showers",
["Thunderstorm"]="T.Storm",--remember to put a comma at the end of every entry
["Scattered"]="Scattered",
["Few Snow Showers"]="Fw Sn Shws",
["Wind"]="Wind",
["Showers"]="Showers",
["Isolated Thunderstorms"]="Isolated T.Strm",
["Scattered Thunderstorms"]="Scattered T.Strm",
}--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=1
--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 ########################################
--#######################################################################
holidaysrc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
max_user_text 1500000
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 5120
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 300 480
maximum_width 300
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont DejaVu Sans Mono:size=8
#xftfont Ubuntu Mono:size=10
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color e5e5e5
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 1600
gap_y 17
# stuff after 'TEXT' will be formatted on screen # ${if_match ${exec wmctrl -d | awk '{print $6}' | sed 's/,0//'} == 0}${else}${endif}1a3644
max_specials 2048
pad_percents 2
short_units yes
TEXT
${color 75b3d1}${font Ubuntu:Bold:size=16}${goto 20}2012 Holidays${font}
${voffset -5}${color 848484}${hr 3}${color}
${if_match ${execpi 600 sed -n '2p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '2p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '2p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '3p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '3p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '3p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '4p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '4p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '4p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '5p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '5p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '5p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '6p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '6p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '6p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '7p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '7p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '7p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '8p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '8p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '8p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '9p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '9p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '9p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '10p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '10p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '10p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '11p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '11p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '11p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '12p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '12p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '12p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '13p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '13p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '13p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '14p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '14p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '14p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '15p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '15p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '15p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '16p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '16p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '16p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '17p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '17p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '17p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '18p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '18p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '18p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '46p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '46p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '46p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '19p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '19p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '19p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '20p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '20p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '20p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '21p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '21p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '21p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '22p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '22p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '22p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '23p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '23p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '23p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '24p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '24p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '24p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '25p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '25p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '25p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '26p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '26p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '26p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '27p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '27p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '27p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '28p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '28p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '28p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '29p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '29p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '29p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '30p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '30p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '30p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '31p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '31p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '31p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '32p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '32p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '32p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '33p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '33p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '33p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '34p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '34p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '34p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '35p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '35p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '35p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '36p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '36p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '36p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '37p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '37p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '37p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '38p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '38p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '38p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '39p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '39p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '39p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '40p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '40p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '40p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '41p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '41p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '41p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '42p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '42p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '42p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '43p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '43p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '43p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '44p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '44p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '44p' /home/dale/holidays.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '45p' /home/dale/holidays.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '45p' /home/dale/holidays.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '45p' /home/dale/holidays.txt | cut -c 5-43}
${voffset -1}${color 848484}${hr 3}
${image /home/dale/Pictures/border2.png -p 297,28 -s 3x675}
${voffset -40}
holidays.txt:
Code:
001 01-01 Sun New Year's Day
016 01-16 Mon Martin Luther King Day
024 01-24 Tue Belly Laugh Day
033 02-02 Thu Groundhog Day
043 02-12 Sun Lincoln's Birthday
045 02-14 Tue Valentine's Day
051 02-20 Mon Presidents Day
051 02-20 Mon Washington's Birthday
052 02-21 Tue Mardi Gras Carnival
071 03-11 Sun Daylight Saving (Start)
077 03-17 Sat St- Patrick's Day
092 04-01 Sun AprilFool's Day
097 04-06 Fri Good Friday
099 04-08 Sun Easter
100 04-09 Mon Easter Monday
113 04-22 Sun Earth Day
126 05-05 Sat Cinco de Mayo
134 05-13 Sun Mother's Day
140 05-19 Sat Armed Forces Day
148 05-27 Sun Pentecost
149 05-28 Mon Memorial Day
149 05-28 Mon Pentecost Monday
166 06-14 Thu Flag Day
169 06-17 Sun Father's Day
186 07-04 Wed Independence Day
204 07-22 Sun Parents' Day
247 09-03 Mon Labor Day
253 09-09 Sun Grandparents' Day
255 09-11 Tue Patriot Day
260 09-16 Sun Stepfamily Day
261 09-17 Mon Citizenship Day
272 09-28 Fri Native American Day
282 10-08 Mon Columbus Day
290 10-16 Tue Boss's Day
294 10-20 Sat Sweetest Day
305 10-31 Wed Halloween
309 11-04 Sun Daylight Saving (End)
316 11-11 Sun Veterans' Day
327 11-22 Thu Thanksgiving
328 11-23 Fri Black Friday
331 11-26 Mon Cyber Monday
342 12-07 Fri Pearl Harbor Remembrance Day
360 12-25 Tue Christmas Day
366 12-31 Mon New Year's Eve
132 05-11 Mon New Test Date
special_days_rc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 5120
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 300 300
maximum_width 300
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont DejaVu Sans Mono:size=8
#xftfont Ubuntu Mono: Bold:size=10
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color e5e5e5
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 1600
gap_y 735
# stuff after 'TEXT' will be formatted on screen # ${if_match ${exec wmctrl -d | awk '{print $6}' | sed 's/,0//'} == 0}${else}${endif}1a3644
max_specials 2048
pad_percents 2
short_units yes
TEXT
${color 75b3d1}${font Ubuntu:Bold:size=16}${goto 20}Special Days${font}
${voffset -5}${color 848484}${hr 3}${color}
${if_match ${execpi 600 sed -n '2p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '2p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '2p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '3p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '3p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '3p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '4p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '4p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '4p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '5p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '5p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '5p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '6p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '6p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '6p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '7p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '7p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '7p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '8p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '8p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '8p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '9p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '9p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '9p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '10p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '10p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '10p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '11p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '11p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '11p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '12p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '12p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '12p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '13p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '13p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '13p' /home/dale/special-days.txt | cut -c 5-43}
${if_match ${execpi 600 sed -n '14p' /home/dale/special-days.txt | cut -c 1-3} < ${time %j}}${color 275166}${else}${if_match ${execpi 600 sed -n '14p' /home/dale/special-days.txt | cut -c 1-3} > ${time %j}}${color 75b3d1}${else}${color ffd700}${endif}${endif}${execpi 600 sed -n '14p' /home/dale/special-days.txt | cut -c 5-43}
${image /home/dale/Pictures/border2.png -p 0,275 -s 300x3}
${image /home/dale/Pictures/border2.png -p 297,26 -s 3x250}
${voffset -230}
schedule_rc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 280 5
maximum_width 280
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont DejaVu Sans Mono:size=8
#xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 75b3d1
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 1919
gap_y 18
pad_percents 2
short_units yes
TEXT
${color 75b3d1}${font Ubuntu:Bold:size=16}${goto 20}Schedule${font}
${voffset -5}${color 848484}${hr 3}${color}
${goto 25}${if_match ${execpi 600 sed -n '1p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '1p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '2p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '2p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '3p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '3p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '4p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '4p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '5p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '5p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '6p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '6p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '7p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '7p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '8p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '8p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '9p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '9p' /home/dale/Documents/schedule.txt}
${goto 25}${if_match ${execpi 600 sed -n '10p' /home/dale/Documents/schedule.txt | cut -c 4-5} == ${time %d}}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '10p' /home/dale/Documents/schedule.txt}
${image /home/dale/Pictures/border2.png -p 0,25 -s 3x210}
${image /home/dale/Pictures/border2.png -p 277,25 -s 3x210}
${color 848484}${hr 3}${color}
todo_rc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 280 5
maximum_width 280
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont DejaVu Sans Mono:size=8
#xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 75b3d1
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 1919
gap_y 270
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${color 75b3d1}${font Ubuntu:Bold:size=16}${goto 20}To Do List${font}
${voffset -5}${color 848484}${hr 3}${color}
${goto 25}${if_match "${execpi 600 sed -n '1p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '1p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '2p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '2p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '3p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '3p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '4p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '4p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '5p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '5p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '6p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '6p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '7p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '7p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '8p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '8p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '9p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '9p' /home/dale/Documents/todo.txt | cut -c 4-30}
${goto 25}${if_match "${execpi 600 sed -n '10p' /home/dale/Documents/todo.txt | cut -c 1-2}" == "01"}${color ffd700}${else}${color 75b3d1}${endif}${execpi 600 sed -n '10p' /home/dale/Documents/todo.txt | cut -c 4-30}
${image /home/dale/Pictures/border2.png -p 0,25 -s 3x176}
${image /home/dale/Pictures/border2.png -p 277,25 -s 3x176}
${voffset 7}${color 848484}${hr 3}
sys_info_rc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 685 5
maximum_width 685
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
#xftfont DejaVu Sans Mono:size=8
xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
color6 e5e5e5 #gray90
default_color 75b3d1
#color7 ffffff #white
#color8 fff68f #khaki1
#color8 FF6600 #orange
#color4 add8e6 #LightBlue
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 2217
gap_y 18
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${font Ubuntu:Bold:size=16}${goto 20}${color 75b3d1}System Information${font Ubuntu Mono:Bold:size=9}${goto 265}${color e5e5e5}Home build with ${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-29}${goto 575}Running at: ${freq_g}GHz
${voffset -5}${color 848484}${font}${hr 3}${color}
#Line 1$
${font Ubuntu:size=12}${goto 90}${color ffd700}Hardware${goto 350}System${goto 570}Network${color}${font}
${goto 25}MoBo:${goto 90}${color e5e5e5}${pre_exec sed -n '13p' /home/dale/myconfig.txt | cut -c 16-18}${execpi 600 sed -n '12p' /home/dale/myconfig.txt | cut -c 16-36}${color}\
${goto 255}OS: ${goto 365}${color e5e5e5}${pre_exec cat /etc/issue.net} ${execi 1000 lsb_release -a | grep 'Codename' | cut -c 11-15}${color}\
${goto 520}External IP:${alignr 10}${color e5e5e5}${execi 360 wget -q -O /dev/stdout http://checkip.dyndns.org/ | cut -d : -f 2- | cut -d \< -f -1}${color}
#Line 2
${goto 25}Installed Memory: ${goto 213}${color e5e5e5}${pre_exec sed -n '48p' /home/dale/myconfig.txt | cut -c 16-20}${color}\
${goto 255}Kernel Name: ${goto 347}${color e5e5e5}${pre_exec sed -n '5p' /usr/src/linux-headers-2.6.38-13-generic/Makefile | cut -c 8-35}${color}\
${goto 520}Gateway IP:${alignr 10}${color e5e5e5}${gw_ip}${color}
#Line 3
${goto 25}HDD Size: ${goto 212}${color e5e5e5}${pre_exec sed -n '604p' /home/dale/myconfig.txt | cut -c 31-34}${color}${color}\
${goto 255}Kernel: ${goto 382}${color e5e5e5}${kernel}${color}\
${goto 520}Network Type: ${alignr 10}${color e5e5e5}${wireless_mode wlan0}${color}
#Line 4
${goto 25}FS Type: ${goto 217}${color e5e5e5}${fs_type /}${color}\
${goto 255}Available Updates: ${goto 497}${color e5e5e5}${execi 1800 aptitude search "~U" | wc -l | tail}${color}\
${goto 520}Network Name: ${alignr 10}${color e5e5e5}${wireless_essid wlan0}${color}
#Line 5
${goto 25}Architecture: ${goto 216}${color e5e5e5}$machine${color}\
${goto 255}Conky Version: ${goto 477}${color e5e5e5}${conky_version}${color}\
${goto 520}Gateway Interface: ${alignr 10}${color e5e5e5}${gw_iface}${color}
#Line 6
${goto 25}GPU: ${goto 105}${color e5e5e5}${pre_exec sed -n '424p' /home/dale/myconfig.txt | cut -c35-46}${execpi 3600 sed -n '424p' /home/dale/myconfig.txt | cut -c23-34}${color}\
${goto 255}Desktop Environment: ${goto 429}${color e5e5e5}${pre_exec env | grep "GDMSESSION" | cut -c12-}${pre_exec gnome-session --version | cut -c14-}${color}\
${goto 520}wlan Qual: ${alignr 4}${color e5e5e5}${wireless_link_qual wlan0}${color}
#Line 7
${goto 25}Audio Controller:${goto 170}${color e5e5e5}${pre_exec sed -n '460p' /home/dale/myconfig.txt | cut -c23-35}${color}\
${goto 255}Window Manager:${goto 465}${color e5e5e5}${pre_exec wmctrl -m | grep "Name" | cut -c7-}${color}\
${goto 520}wlan Max: ${alignr 4}${color e5e5e5}${wireless_link_qual_max wlan0}${color}
${goto 25}Volume: ${color e5e5e5}${if_match "${execi 10 /home/dale/scripts/vol.sh}" == "Master 100%"}${goto 169}${else}${goto 175}${endif}${color e5e5e5}${texeci 3 /home/dale/scripts/vol.sh}${color}${font}\
${goto 255}Compiz Version:${goto 474}${color e5e5e5}${pre_exec compiz --version | cut -c7-}${color}\
${goto 520}wlan Signal Percent:${alignr 10}${color e5e5e5}${wireless_link_qual_perc wlan0}%${color}
#Line 8
${voffset -5}${color 848484}${hr 3}${color}
#Line 9
${font Ubuntu Mono:Bold:size=14}${goto 20}Temps & Performance${font Ubuntu:Bold:size=10}${goto 305}Max Temp: ${color e5e5e5}72°C (162°F)${alignr 10}${color}Current User: ${color e5e5e5}${pre_exec env | grep "USERNAME" | cut -c10-}${font}
${voffset -5}${color 848484}${hr 3}${color}
#Line 10
${goto 25}CPU1 Temperature:${goto 146}${color e5e5e5}${execi 60 sensors | grep 'Core 0' | cut -c 13-21}${color}\
${goto 225}HDD Temp:${goto 357}${color e5e5e5}+${hddtemp}°C\
${goto 420}${color ffd700}Top CPU\
${goto 560}Top RAM${color}
#Line 11
${goto 25}CPU2 Temperature:${goto 146}${color e5e5e5}${execi 60 sensors | grep 'Core 1' | cut -c 13-21}${color}\
${goto 225}GPU Temp:${goto 341}${color e5e5e5}${execi 60 sensors | grep 'temp1' | cut -c 11-21}${color}\
#${goto 225}Load Average (1 Min):${goto 370}${color e5e5e5}${loadavg 1}${color}
${goto 430}${top name 1}${goto 505}${color e5e5e5}${top cpu 1}${color}\
${goto 570}${top_mem name 1}${alignr 10}${color e5e5e5}${top_mem mem 1}${color}
#Line 12
${goto 25}CPU3 Temperature:${goto 146}${color e5e5e5}${execi 60 sensors | grep 'Core 2' | cut -c 13-21}${color}\
${goto 225}Southbridge Temp:${goto 341}${color e5e5e5}${execi 60 sensors | grep 'temp2' | cut -c 11-21}${color}\
${goto 430}${top name 2}${goto 505}${color e5e5e5}${top cpu 2}${color}\
${goto 570}${top_mem name 2}${alignr 10}${color e5e5e5}${top_mem mem 2}${color}
#Line 13
${goto 25}CPU4 Temperature:${goto 146}${color e5e5e5}${execi 60 sensors | grep 'Core 3' | cut -c 13-21}${color}\
${goto 225}System Temp:${goto 341}${color e5e5e5}${execi 60 sensors | grep 'temp3' | cut -c 11-21}${color}\
${goto 430}${top name 3}${goto 505}${color e5e5e5}${top cpu 3}${color}\
${goto 570}${top_mem name 3}${alignr 10}${color e5e5e5}${top_mem mem 3}${color}
#Line 14
${goto 25}CPU Fan Speed:${goto 141}${color e5e5e5}${execi 60 sensors | grep 'fan1' | cut -c 13-21}${color}\
${goto 225}Total Processes:${goto 374}${color e5e5e5}${processes}${color}\
${goto 430}${top name 4}${goto 505}${color e5e5e5}${top cpu 4}${color}\
${goto 570}${top_mem name 4}${alignr 10}${color e5e5e5}${top_mem mem 4}${color}
#Line 15
${goto 25}Uptime: ${goto 156}${color e5e5e5}${uptime_short}${color}\
${goto 225}Running Processes:${goto 388}${color e5e5e5}${running_processes}${color}\
${goto 430}${top name 5}${goto 505}${color e5e5e5}${top cpu 5}${color}\
${goto 570}${top_mem name 5}${alignr 10}${color e5e5e5}${top_mem mem 5}
${voffset 1}${color 848484}${hr 3}${color}
${image /home/dale/Pictures/border2.png -p 0,25 -s 3x130}
${image /home/dale/Pictures/border2.png -p 232,25 -s 3x130}
${image /home/dale/Pictures/border2.png -p 497,25 -s 3x130}
${image /home/dale/Pictures/border2.png -p 682,25 -s 3x130}
${image /home/dale/Pictures/border2.png -p 0,185 -s 3x89}
${image /home/dale/Pictures/border2.png -p 195,185 -s 3x89}
${image /home/dale/Pictures/border2.png -p 395,185 -s 3x89}
${image /home/dale/Pictures/border2.png -p 535,185 -s 3x89}
${image /home/dale/Pictures/border2.png -p 682,185 -s 3x89}
${voffset -143}
conkyrhythmboxrc:
Code:
# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #! Debian Wheezy
# Font Settings ##############################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Liberation Sans:size=10
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0.9
# Force UTF8? requires XFT ###
override_utf8_locale yes
draw_shades no
draw_outline no
uppercase no
######################## End Font Settings ###################################
# Begin Window Settings ######################################################
alignment top_right
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# ARGB can be used for real transparency
# NOTE that a composite manager is required for real transparency.
# This option will not work as desired (in most cases) in conjunction with
# 'own_window_type override'
own_window_argb_visual yes
# When ARGB visuals are enabled, this use this to modify the alpha value
# Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 0
minimum_size 335 5 ## width, height
maximum_width 335 ## width - usually a good idea to equal minimum width.
gap_x 247 ## left &right
gap_y 57 ## up & down
####################### End Window Settings ##################################
# Border Settings ############################################################
border_outer_margin 40
border_inner_margin 0
draw_borders no
border_width 1
stippled_borders 10
####################### End Border Settings ##################################
# Color Settings #############################################################
default_shade_color grey
default_outline_color black
# Main Color Settings ########################################################
default_color white
color1 B9CDD4
color2 white
color3 white
color4 BAF58B
# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this
# one so double buffer won't be so big
double_buffer yes
# Adds spaces around certain objects to stop them
# from moving other things around.
# only works with mono fonts
use_spacer right
# Arguments are left, right, and none (default)
# Size of the standard text buffer (default is 256 bytes).
# Will allow for more text display per variable.
text_buffer_size 2048
# Sets bars size even for bars that do not hace that function
# IE: execbar and execibar
default_bar_size 185 9
# 0 makes Conky run forever
total_run_times 0
update_interval 1
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes
# Defaults to 4MiB
# Set to 0 to disable the image cache
# Increase this value if you use $image lots
imlib_cache_size 0
TEXT
#${if_running rhythmbox}
${execp ~/conkyRhythmbox.py --template=~/conkyRhythmbox.template}
#$endif
conkyRhythmbox.template:
Code:
${color1}[--datatype=TI --maxlength=32]
${color1}[--datatype=AR --maxlength=32]
${color1}[--datatype=AL --maxlength=30]
${voffset 10}${#FFFFFF}[--datatype=PT] ${color light blue}${execibar 1 ~/conkyRhythmbox.py --datatype=PP} ${#FFFFFF}[--datatype=LE]
${voffset 10}${color light blue}Status: ${#FFFFFF}[--datatype=ST]
${color light blue} Volume: ${#FFFFFF}[--datatype=VO]
${color light blue}BitRate: ${#FFFFFF}[--datatype=BR]
${image [--datatype=CA] -p 0,150 -s 250x250}${image ~/images/rhythmbox.png -p 2,90 -s 30x30}
meters (new_ringsrc):
Code:
# Conky settings #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
#imlib_cache_size 0
temperature_unit fahrenheit
# Window specifications #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 300 620
maximum_width 300
alignment tl
gap_x 3220
gap_y 18
# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
# Text settings #
use_xft yes
xftfont Ubuntu:Bold:size=7
xftalpha 1
uppercase no
temperature_unit fahrenheit
#celsius
if_up_strictness address
default_color e5e5e5
# Lua Load #${color e5e5e5}75b3d1
lua_load ~/scripts/new_rings.lua
lua_draw_hook_pre clock_rings
TEXT
${font Ubuntu:Bold:size=16}${goto 140}${color 75b3d1}Meters
${voffset -15}${color 848484}${goto 1}${hr 3}${color}${font}
${voffset 7}${color 30434e}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 80}HDD Size: ${pre_exec sed -n '604p' /home/dale/myconfig.txt | cut -c 31-34}${goto 170}Free: ${fs_free /}${alignr 15}${fs_used_perc /}% Used
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 80}Home Size: ${fs_size /}${goto 170}Free: ${fs_free /}${alignr 15}${fs_used_perc /}% Used
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}Disk / Home${font}
${color 30434e}${voffset 64}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 80}Max RAM: ${memmax}${goto 170}Free: ${memfree}${alignr 15}${memperc}% Used
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 80}Swap Size: ${swapmax}${goto 170}Free: ${swapfree}${alignr 15}${swapperc}% Used
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}RAM / Swap${font}
${color 30434e}${voffset 63}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}Load Avg.: (1 Min): ${loadavg 1}%
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}Load Avg.: (5 Min): ${loadavg 2}%
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}Load 1 & 2${font}
${color 30434e}${voffset 63}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 125}Load Avg.: (15 Min): ${loadavg 3}
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}CPU Avg.: ${cpu cpu0}%
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}Load 3 &
${goto 140}CPU Avg.${font}
${color 30434e}${voffset 38}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}CPU 1: ${cpu cpu1}%
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}CPU 2: ${cpu cpu2}%
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}CPU 1 & 2${font}
${color 30434e}${voffset 63}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}CPU 3: ${cpu cpu3}%
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 140}CPU 4: ${cpu cpu4}%
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}CPU 3 & 4
${color 30434e}${voffset 52}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -27}${goto 125}Upspeed eth0: ${upspeedf eth0} KiB/s
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 125}Downspeed eth0: ${downspeedf eth0} KiB/s
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}Ethernet
${goto 140}${voffset -5}${if_up eth0}Is${else}Is Not${endif}
${goto 140}${voffset -5}Connected
${color 30434e}${voffset 12}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -27}${goto 125}Upspeed wlan0: ${upspeedf eth0} KiB/s
${color 30434e}${voffset 3}${goto 70}${hr 10}
${color e5e5e5}${font Ubuntu:Bold:size=7}${voffset -10}${goto 125}Downspeed wlan0: ${downspeedf eth0} KiB/s
${color 75b3d1}${font Ubuntu:Bold:size=16}${voffset 3}${goto 140}Wireless
${goto 140}${voffset -5}${if_up wlan0}Is${else}Is Not${endif}
${goto 140}${voffset -5}Connected
#${voffset -4}${color 848484}${goto 71}${hr 3}${color}${font}
${image /home/dale/Pictures/upbar.png -p 99,76 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,76 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,192 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,192 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,307 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,307 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,422 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,422 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,537 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,537 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,652 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,652 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,767 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,767 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 99,882 -s 10x31}
${image /home/dale/Pictures/upbar.png -p 114,882 -s 10x31}
${image /home/dale/Pictures/border2.png -p 0,27 -s 3x965}
${image /home/dale/Pictures/border2.png -p 0,992 -s 350x3}
${voffset -238}
meters lua (new_rings.lua):
Code:
--[[
Clock Rings by londonali1010 (2009) Edited by jpope
This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.
IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num>5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num>3; conversely if you update Conky every 0.5s, you should use update_num>10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.
To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
lua_load ~/scripts/clock_rings.lua
lua_draw_hook_pre clock_rings
Changelog:
+ v1.0 -- Original release (30.09.2009)
v1.1p -- Jpope edit (05.10.2009)
]]
settings_table = {
{
-- Edit this table to customise your rings.
-- You can create more rings simply by adding more elements to settings_table.
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
name='fs_used_perc',
-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
arg='/',
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
max=100,
-- "bg_colour" is the colour of the base ring.
bg_colour=0x707070,
-- "bg_alpha" is the alpha value of the base ring.
bg_alpha=0.3,
-- "fg_colour" is the colour of the indicator part of the ring.
fg_colour=0x75b3d1,
-- "fg_alpha" is the alpha value of the indicator part of the ring.
fg_alpha=1,
-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
x=70, y=108,
-- "radius" is the radius of the ring.
radius=35,
-- "thickness" is the thickness of the ring, centred around the radius.
thickness=10,
-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
start_angle=90,
-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
end_angle=360
},
{
name='fs_used_perc',
arg='/',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=108,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='memperc',
arg='',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=224,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='swapperc',
arg='',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=224,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='loadavg',
arg='1',
max=4,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=339,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='loadavg',
arg='2',
max=4,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=339,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='loadavg',
arg='3',
max=4,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=454,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='cpu',
arg='cpu0',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=454,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='cpu',
arg='cpu1',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=569,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='cpu',
arg='cpu2',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=569,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='cpu',
arg='cpu3',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=684,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='cpu',
arg='cpu4',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=684,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='upspeedf',
arg='eth0',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=799,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='downspeedf',
arg='eth0',
max=500,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=799,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='upspeedf',
arg='wlan0',
max=100,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=914,
radius=50,
thickness=10,
start_angle=90,
end_angle=360
},
{
name='downspeedf',
arg='wlan0',
max=500,
bg_colour=0x707070,
bg_alpha=0.3,
fg_colour=0x75b3d1,
fg_alpha=1,
x=70, y=914,
radius=35,
thickness=10,
start_angle=90,
end_angle=360
},
}
-- Use these settings to define the origin and extent of your clock.
clock_r=65
-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
clock_x=100
clock_y=150
show_seconds=true
require 'cairo'
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function draw_ring(cr,t,pt)
local w,h=conky_window.width,conky_window.height
local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
local angle_0=sa*(2*math.pi/360)-math.pi/2
local angle_f=ea*(2*math.pi/360)-math.pi/2
local t_arc=t*(angle_f-angle_0)
-- Draw background ring
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
cairo_set_line_width(cr,ring_w)
cairo_stroke(cr)
-- Draw indicator ring
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end
function draw_clock_hands(cr,xc,yc)
local secs,mins,hours,secs_arc,mins_arc,hours_arc
local xh,yh,xm,ym,xs,ys
secs=os.date("%S")
mins=os.date("%M")
hours=os.date("%I")
secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins+secs_arc/60
hours_arc=(2*math.pi/12)*hours+mins_arc/12
--[[ Draw hour hand
xh=xc+0.7*clock_r*math.sin(hours_arc)
yh=yc-0.7*clock_r*math.cos(hours_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xh,yh)
cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_width(cr,5)
cairo_set_source_rgba(cr,0,0,1,1)
cairo_stroke(cr)
-- Draw minute hand
xm=xc+clock_r*math.sin(mins_arc)
ym=yc-clock_r*math.cos(mins_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xm,ym)
cairo_set_line_width(cr,3)
cairo_stroke(cr)
-- Draw seconds hand
if show_seconds then
xs=xc+clock_r*math.sin(secs_arc)
ys=yc-clock_r*math.cos(secs_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xs,ys)
cairo_set_line_width(cr,1)
cairo_stroke(cr)
end]]
end
function conky_clock_rings()
local function setup_rings(cr,pt)
local str=''
local value=0
str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)
value=tonumber(str)
pct=value/pt['max']
draw_ring(cr,pct,pt)
end
-- Check that Conky has been running for at least 5s
if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)
local cr=cairo_create(cs)
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end
draw_clock_hands(cr,clock_x,clock_y)
end
ubu-rc (center logo):
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 510 110
maximum_width 510
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 1e90ff
color6 e5e5e5 #gray90
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 2295
gap_y 360
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${image ~/Pictures/ubu3.png -p 0,0 -s 506x106}
fortunerc:
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 1100 250
maximum_width 1100
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Ubuntu:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 75b3d1
color6 e5e5e5 #gray90
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 2010
gap_y 500
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${color 75b3d1}${font Ubuntu:Bold:size=16}${goto 20}Fortune${font}
${voffset -5}${color 848484}${hr 3}${color}
${font Chancery Uralic:size=28}${goto 40}${voffset 5}${execi 120 fortune -s | fold -w66 -s}
${image /home/dale/Pictures/border2.png -p 0,230 -s 1100x3}
${image /home/dale/Pictures/border2.png -p 0,25 -s 3x207}
${image /home/dale/Pictures/border2.png -p 1097,25 -s 3x207}
calendar (cal_rc):
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 1281 5
maximum_width 1281
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 75b3d1
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 1919
gap_y 777
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${font Ubuntu:Bold:size=16}${goto 357}${color 75b3d1}Calendar${font}
${voffset 10}${font LCDMono:bold:size=16}${goto 397}Last Month${goto 631}${color e5e5e5}${time %B}${goto 809}${color}Next Month
${font LCDMono:bold:size=12}${color}${execpi 3600 gcal . --starting-day=sunday | sed -e "s/</\${color e5e5e5} /;s/>/\${color} /;s/^/\${alignc}/" | tail -n 7}
${font Ubuntu:Bold:size=14}${alignc}I have not had a drink since ${color e5e5e5}Nov. 5, 2010${color}
${alignc}I have been sober for ${color e5e5e5}${exec conkyDatetimeDiff -s 20101105} ${color}or ${color e5e5e5}${exec conkyDaysDiff 20101105} total days!
${color 75b3d1}${alignc}But now... ${color green}I'M ADDICTED TO CONKY O.O
${image /home/dale/Pictures/border2.png -p 337,24 -s 615x3}\
${image /home/dale/Pictures/border2.png -p 337,27 -s 3x150}\
${image /home/dale/Pictures/border2.png -p 539,27 -s 3x150}\
${image /home/dale/Pictures/border2.png -p 746,27 -s 3x150}\
${image /home/dale/Pictures/border2.png -p 949,27 -s 3x150}\
${image /home/dale/Pictures/border2.png -p 337,174 -s 615x3}\
${image /home/dale/Pictures/green-footprint.png -p 1025,10 -s 200x200}\
${image /home/dale/Pictures/Ubuntu-embossed.png -p 45,0 -s 240x240}\
${voffset -30}
Bottom panel, gmail and date, time (panel-backrc):
Code:
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
no_buffers yes
text_buffer_size 3072
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1.0
# Minimum size of text area
minimum_size 3700 5
maximum_width 3700
override_utf8_locale yes
temperature_unit celsius
#fahrenheit
top_name_width 10
top_cpu_separate false
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
xftfont Ubuntu Mono Mono:size=8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
# border_margin 9
# border width
border_width 10
## My colors (suit yourself)
color0 ffa54f #Tan1
color1 caff70 #DarkOliveGreen1
color2 ffec8b #Salomie
color3 cdb79e #bisque3
color4 0000FF #LightBlue
color5 00ffff #cyan1
default_color 1e90ff
#own_window_colour red
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 0
gap_y 1050
# stuff after 'TEXT' will be formatted on screen
pad_percents 2
short_units yes
TEXT
${goto 1340}${font Pocket Calculator:size=22}${color 1f4066}${time %b %e, %Y} ${voffset -2}${font Pocket Calculator:size=26}${time %H:%M}\
${color 1f4066}${goto 3000}${voffset -5}${font Ubuntu Bold:size=14}${execpi 300 python /home/dale/scripts/gmail_parser.py xxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyy 3}\
${voffset -26}${goto 3290}${font Pocket Calculator:size=22}${color 1f4066}${time %b %e, %Y} ${voffset -2}${font Pocket Calculator:size=26}${time %H:%M}
${image ~/Pictures/panel-back.png -p 0,0 -s 1600x30}${image ~/Pictures/panel-back.png -p 1600,0 -s 1920x30}${image /home/dale/Pictures/Mail2.png -p 2940,3 -s 40x25}
gmail_parser.py:
Code:
## check-gmail.py -- A command line util to check GMail -*- Python -*-
## modified to display mailbox summary for conky
# ======================================================================
# Copyright (C) 2006 Baishampayan Ghose <b.ghose@ubuntu.com>
# Modified 2008 Hunter Loftis <hbloftis@uncc.edu>
# Time-stamp: Mon Jul 31, 2006 20:45+0530
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
# ======================================================================
import sys
import urllib # For BasicHTTPAuthentication
import feedparser # For parsing the feed
from textwrap import wrap
_URL = "https://mail.google.com/gmail/feed/atom"
uname = sys.argv[1]
password = sys.argv[2]
maxlen = sys.argv[3]
urllib.FancyURLopener.prompt_user_passwd = lambda self, host, realm: (uname, password)
def auth():
'''The method to do HTTPBasicAuthentication'''
opener = urllib.FancyURLopener()
f = opener.open(_URL)
feed = f.read()
return feed
def readmail(feed, maxlen):
'''Parse the Atom feed and print a summary'''
atom = feedparser.parse(feed)
print '${color 1f4066} %s new\n' % (len(atom.entries))
# for i in range(min(len(atom.entries), maxlen)):
# print ' ${color}%s' % atom.entries[i].title
##uncomment the following line if you want to show the name of the sender
# print ' ${color e5e5e5}%s' % atom.entries[i].author
# if len(atom.entries) > maxlen:
# print ' ${color ffd700}more...'
if __name__ == "__main__":
f = auth() # Do auth and then get the feed
readmail(f, int(maxlen)) # Let the feed be chewed by feedparser
Whew! Logos and other images are in the attached tar file. Added fortune. Color scheme idea thanks to one of gutterslob's on the crunchbang forum, weather thanks to mrpeachy and sector11, rings thanks to londonali and jpope, and rhythmbox thanks to VastOne also on crunchbang. And Thank You to everyone for posting questions,answers, configs and screenies.
I AM NOT changing this again!!! But, I am checking out the other workspace options that 42dorian directed me to
Stay tuned for further developments (cue: wicked laugh).
Bookmarks