You are not logged in.
Do you have the cookie?
Do I have the cookie, I have more than one, I have chocolate chip cookies, oatmeal cookies, peanut butter cookies, and the super deluxe chocolate chip oatmeal raisin chewy king .... ohhhhhhhhhh that cookie ... yup:
/home/sector11/Conky_WeatherCom_metric/cookie
.weather.com TRUE / FALSE 2147483647.999 i m3q9ti^4e2155214fa9af31
.weather.com TRUE / FALSE 2147483647.999 u m
4 lines - last two are blank
Are you using the correct conkyrc? (not the one intended for the C version)
Can you post your whole script and your whole conkyrc?EDIT: The wget message is nothing.
RE: wget - you're the boss.
/home/sector11/Conky_WeatherCom_metric/conkyrc_weather_com_metric
# killall conky && conky -c /home/sector11/Conky_WeatherCom_metric/conkyrc_weather_com_metric &
# 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,skip_taskbar,skip_pager
#own_window_colour brown
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer right
use_xft yes
# Update interval in seconds
update_interval 1
# Minimum size of text area
minimum_size 355 500
maximum_width 355
override_utf8_locale yes
# Draw shades?
draw_shades yes
# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
#stippled_borders 3
# border margins
border_inner_margin 9
border_outer_margin 0
# border width
#border_width 10
# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb
# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 30
imlib_cache_size 50
text_buffer_size 2048
# stuff after 'TEXT' will be formatted on screen
lua_load /media/5/Conky/LUA/draw-bg.lua
TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.5}${font Arial:size=12}${color ffe595}RIGHT NOW ${font}${hr 2}${texeci 600 bash $HOME/Conky_WeatherCom_metric/weath_com_metric}
${font Arial:size=10}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${font}
${goto 200}${color ffe595}TEMP: $color${alignr}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°C (${execpi 1800 sed -n '5p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°C)${image $HOME/Conky_WeatherCom_metric/now.png -p 0,30 -s 120x120}
${goto 200}${color ffe595}WIND: $color${alignr}${execpi 1800 sed -n '6p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn} ${execpi 1800 sed -n '7p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}km/h
${goto 200}${color ffe595}HUMIDITY: $color${alignr}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}
${goto 200}${color ffe595}DEW POINT: $color${alignr}${execpi 1800 sed -n '9p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°C
${goto 200}${color ffe595}VISIBILITY: $color${alignr}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}
${goto 200}${color ffe595}PRESSURE: $color${alignr}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}
${goto 200}${color ffe595}UV INDEX: $color${alignr}${execpi 1800 sed -n '12p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}
${font Arial:size=12}${color ffe595}TODAY - TONIGHT ${font}${hr 2}
${font Arial:size=11}${color ffe595}${goto 75}Today${goto 240}Tonight${image $HOME/Conky_WeatherCom_metric/TD.png -p 35,170 -s 100x100}${image $HOME/Conky_WeatherCom_metric/TN.png -p 200,170 -s 100x100}${font}${color}
${color ffe595}TEMP: ${color}${execpi 1800 sed -n '2p' $HOME/Conky_WeatherCom_metric/Today/day}°C${goto 195}${color ffe595}TEMP: ${color}${execpi 1800 sed -n '2p' $HOME/Conky_WeatherCom_metric/Today/night}°C
${execpi 1800 sed -n '3,16p' $HOME/Conky_WeatherCom_metric/Today/final_today}
${font Arial:size=12}${color ffe595}10 DAYS FORECAST ${font}${hr 2}
${font Arial:size=11}${color ffe595}${goto 65}${execpi 1800 sed -n '1p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 175}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 285}${execpi 1800 sed -n '15p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${color}${image $HOME/Conky_WeatherCom_metric/10_2.png -p 20,500 -s 70x70}${image $HOME/Conky_WeatherCom_metric/10_9.png -p 130,500 -s 70x70}${image $HOME/Conky_WeatherCom_metric/10_16.png -p 240,500 -s 70x70}
${goto 115}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 225}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 335}${execpi 1800 sed -n '17p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${font}
${goto 116}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 226}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 336}${execpi 1800 sed -n '18p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${execpi 1800 sed -n '5p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}${goto 135}${execpi 1800 sed -n '12p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}${goto 260}${execpi 1800 sed -n '19p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}
${color ffe595}PRECIP:${color}${execpi 1800 sed -n '6p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 135}${color ffe595}PRECIP:${color}${execpi 1800 sed -n '13p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 260}${color ffe595}PRECIP:${color}${execpi 1800 sed -n '20p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${color ffe595}WIND:${color}${execpi 1800 sed -n '7p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 135}${color ffe595}WIND:${color}${execpi 1800 sed -n '14p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 260}${color ffe595}WIND:${color}${execpi 1800 sed -n '21p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${color ffe595}${hr 1}
${font Arial:size=11}${goto 65}${execpi 1800 sed -n '22p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 175}${execpi 1800 sed -n '29p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 285}${execpi 1800 sed -n '36p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${color}${image $HOME/Conky_WeatherCom_metric/10_23.png -p 20,640 -s 70x70}${image $HOME/Conky_WeatherCom_metric/10_30.png -p 130,640 -s 70x70}${image $HOME/Conky_WeatherCom_metric/10_37.png -p 240,640 -s 70x70}
${goto 115}${execpi 1800 sed -n '24p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 225}${execpi 1800 sed -n '31p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 335}${execpi 1800 sed -n '38p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${font}
${goto 116}${execpi 1800 sed -n '25p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 226}${execpi 1800 sed -n '32p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 336}${execpi 1800 sed -n '39p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${execpi 1800 sed -n '26p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}${goto 135}${execpi 1800 sed -n '33p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}${goto 260}${execpi 1800 sed -n '40p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-18}
${color ffe595}PRECIP:${color}${execpi 1800 sed -n '27p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 135}${color ffe595}PRECIP:${color}${execpi 1800 sed -n '34p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 260}${color ffe595}PRECIP:${color}${execpi 1800 sed -n '41p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${color ffe595}WIND:${color}${execpi 1800 sed -n '28p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 135}${color ffe595}WIND:${color}${execpi 1800 sed -n '35p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 260}${color ffe595}WIND:${color}${execpi 1800 sed -n '42p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${color ffe595}${hr 1}
${font Arial:size=11}${goto 50}${execpi 1800 sed -n '43p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 135}${execpi 1800 sed -n '50p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 220}${execpi 1800 sed -n '57p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 305}${execpi 1800 sed -n '64p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}${color}${image $HOME/Conky_WeatherCom_metric/10_44.png -p 0,780 -s 55x55}${image $HOME/Conky_WeatherCom_metric/10_51.png -p 85,780 -s 55x55}${image $HOME/Conky_WeatherCom_metric/10_58.png -p 170,780 -s 55x55}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${image $HOME/Conky_WeatherCom_metric/10_58.png -p 255,780 -s 55x55}${endif}${font}
${goto 75}${execpi 1800 sed -n '45p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 160}${execpi 1800 sed -n '52p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 245}${execpi 1800 sed -n '59p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 330}${execpi 1800 sed -n '66p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}
${goto 76}${execpi 1800 sed -n '45p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 160}${execpi 1800 sed -n '53p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 245}${execpi 1800 sed -n '60p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 330}${execpi 1800 sed -n '67p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}
${execpi 1800 sed -n '47p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-12}${goto 95}${execpi 1800 sed -n '54p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-12}${goto 180}${execpi 1800 sed -n '61p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-12}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 265}${execpi 1800 sed -n '68p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c1-12}${endif}
${execpi 1800 sed -n '47p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c13-24}${goto 95}${execpi 1800 sed -n '54p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c13-24}${goto 180}${execpi 1800 sed -n '61p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c13-24}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 265}${execpi 1800 sed -n '68p' $HOME/Conky_WeatherCom_metric/10days/raw_10|cut -c13-24}${endif}
${color ffe595}PR:${color}${execpi 1800 sed -n '48p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 95}${color ffe595}PR:${color}${execpi 1800 sed -n '55p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 180}${color ffe595}PR:${color}${execpi 1800 sed -n '62p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 265}${color ffe595}PR:${color}${execpi 1800 sed -n '69p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}
${color ffe595}W:${color}${execpi 1800 sed -n '49p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 95}${color ffe595}W:${color}${execpi 1800 sed -n '56p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${goto 180}${color ffe595}W:${color}${execpi 1800 sed -n '63p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 265}${color ffe595}W:${color}${execpi 1800 sed -n '70p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}
/home/sector11/Conky_WeatherCom_metric/weath_com_metric
#!/bin/bash
#put your 10 day weather.com address here
#address10="http://www.weather.com/weather/tenday/Miami+FL+USFL0316:1:US"
### my address: http://www.weather.com/weather/tenday/Buenos+Aires+ARBA0009:1:AR
address10="http://www.weather.com/weather/tenday/Buenos+Aires+ARBA0009:1:AR"
addr_now=$(echo $address10|sed 's/tenday/right-now/')
addr_today=$(echo $address10|sed 's/tenday/today/')
kill -STOP $(pidof conky)
killall wget
wget --user-agent="Firefox" --load-cookies $HOME/Conky_WeatherCom_metric/cookie -O $HOME/Conky_WeatherCom_metric/RightNow/raw_rn $addr_now
wget --user-agent="Firefox" --load-cookies $HOME/Conky_WeatherCom_metric/cookie -O $HOME/Conky_WeatherCom_metric/Today/raw_td $addr_today
wget --user-agent="Firefox" --load-cookies $HOME/Conky_WeatherCom_metric/cookie -O $HOME/Conky_WeatherCom_metric/10days/raw_10 $address10
rm $HOME/Conky_WeatherCom_metric/10days/10days_OK
if [[ -s $HOME/Conky_WeatherCom_metric/RightNow/raw_rn ]]; then
#############
# Right now #
#############
sed -i '/wx-weather-icon wx-hide/,/<div class="wx-next6hr-details ">/!d' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
sed -i -e '/^[ \t]*$/d' -e 's/\r//g' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
sed -i '/\.png\|°\|weather-phrase\|feels-like\|"wx-temp"\|"wx-value"\|arrow wind-dir-/!d' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
sed -i -e 's/^.*wxicon\/120\///g' -e s'/png.*$/png/g' -e 's/^.*"wx-temp">//g' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
sed -i -e 's/^.*wx-dir-arrow wind-dir-//g' -e 's/"><\/div>.*$//g' -e 's/<\/span>.*$//g' -e 's/^.*">//g' -e 's/°//g' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
image=$(sed -n 1p $HOME/Conky_WeatherCom_metric/RightNow/raw_rn)
if [[ $(sed -n 6p $HOME/Conky_WeatherCom_metric/RightNow/raw_rn) == "Calm" ]]; then
sed -i '6s/$/\n/' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn
fi
cp $HOME/Conky_WeatherCom_metric/weather_com_images/$image $HOME/Conky_WeatherCom_metric/now.png
fi
if [[ -s $HOME/Conky_WeatherCom_metric/Today/raw_td ]]; then
#############
# Today #
#############
sed -i '/<div class="wx-daypart">/,/<div class="wx-tempgraph wx-module wx-grid3of6/!d' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e '/^[ \t]*$/d' -e 's/^[ \t]*//g' -e 's/\r//g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/^.*wx-observed">//g' -e 's/°.*$//g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/^.*wxicon\/120\///g' -e 's/\.png.*$/\.png/g' -e 's/^.*"wx-temp"> //g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/^.*<h3>//g' -e 's/^.*"wx-phrase ">//g' -e 's/^.*<dt>//g' -e 's/^.*<dd>//g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/^.*snowfall-value">//g' -e "s/<span class='wx-firstletter'>//g" -e 's/^.*<strong>//g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/^.*<p class="wx-narrative">//g' -e 's/<sup>//g' -e 's/<\/sup>//g' -e 's/<span class=.*<\/span>//g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e 's/<.*$//g' -e '/^[ \t]*$/d' -e 's/Chance of rain/Chance of rain:/g' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -i -e :a -e '/:$/N; s/:\n/: /; ta' $HOME/Conky_WeatherCom_metric/Today/raw_td
sed -n '1,/Night/p' $HOME/Conky_WeatherCom_metric/Today/raw_td > $HOME/Conky_WeatherCom_metric/Today/day
sed -n '/Night/,$p' $HOME/Conky_WeatherCom_metric/Today/raw_td > $HOME/Conky_WeatherCom_metric/Today/night
sed -i '/Day\|Night/d' $HOME/Conky_WeatherCom_metric/Today/{day,night}
if (( $(cat $HOME/Conky_WeatherCom_metric/Today/day|wc -l)==3 )); then
line2=$(sed -n 2p $HOME/Conky_WeatherCom_metric/Today/day)
sed -i '2d' $HOME/Conky_WeatherCom_metric/Today/day
sed -i 1i$line2 $HOME/Conky_WeatherCom_metric/Today/day
fi
day=$(sed -n 1p $HOME/Conky_WeatherCom_metric/Today/day)
cp $HOME/Conky_WeatherCom_metric/weather_com_images/$day $HOME/Conky_WeatherCom_metric/TD.png
night=$(sed -n 1p $HOME/Conky_WeatherCom_metric/Today/night)
cp $HOME/Conky_WeatherCom_metric/weather_com_images/$night $HOME/Conky_WeatherCom_metric/TN.png
fold -s30 $HOME/Conky_WeatherCom_metric/Today/day > $HOME/Conky_WeatherCom_metric/Today/day1
sed -i 's/\(^.*: \)\(.*$\)/\$\{color ffe595\}\1\$\{color\}\2/g' $HOME/Conky_WeatherCom_metric/Today/day1
fold -s30 $HOME/Conky_WeatherCom_metric/Today/night > $HOME/Conky_WeatherCom_metric/Today/night1
sed -i 's/\(^.*: \)\(.*$\)/\$\{color ffe595\}\1\$\{color\}\2/g' $HOME/Conky_WeatherCom_metric/Today/night1
for (( i=1; i<=$(cat $HOME/Conky_WeatherCom_metric/Today/night1|wc -l); i++ ))
do
sed -i "${i}s/^/\$\{goto 195\}/" $HOME/Conky_WeatherCom_metric/Today/night1
done
paste -d'*' $HOME/Conky_WeatherCom_metric/Today/{day1,night1} > $HOME/Conky_WeatherCom_metric/Today/final_today
sed -i 's/\*//g' $HOME/Conky_WeatherCom_metric/Today/final_today
j=$(cat $HOME/Conky_WeatherCom_metric/Today/final_today|wc -l)
if (( $j<16 )); then
for (( i=1; i<=$(( 16-$j )); i++ ))
do
echo '' >> $HOME/Conky_WeatherCom_metric/Today/final_today
done
fi
fi
if [[ -s $HOME/Conky_WeatherCom_metric/10days/raw_10 ]]; then
#############
# 10 days #
#############
observed_high=$(grep "Observed High" $HOME/Conky_WeatherCom_metric/10days/raw_10|wc -l)
sed -i '/"wx-daypart"/,/wx-planmyday10 wx-plan-day/!d' $HOME/Conky_WeatherCom_metric/10days/raw_10
sed -i -e '/^[ \t]*$/d' -e 's/\r//g' -e '/^$/d' -e 's/^[ \t]*//g' $HOME/Conky_WeatherCom_metric/10days/raw_10
sed -i -e 's/^.*wxicon\/70\///g' -e 's/\.png.*$/\.png/g' $HOME/Conky_WeatherCom_metric/10days/raw_10
sed -i -e 's/^.*"wx-temp"> \|"wx-temp-alt"> \|"wx-phrase">\|<dt>\|<dd>\|<h3>\|<p class=//g' $HOME/Conky_WeatherCom_metric/10days/raw_10
sed -i -e 's/<sup>°.*$//g' -e 's/<\/p>\|<\/dd>.*$//g' -e '/<\|>\|^$/d' -e 's/ at / /g' $HOME/Conky_WeatherCom_metric/10days/raw_10
sed -i 's/ km\/h/km\/h/g' $HOME/Conky_WeatherCom_metric/10days/raw_10
line1=$(sed -n 1p $HOME/Conky_WeatherCom_metric/10days/raw_10|sed 's/ *$//')
if [[ $line1 == Tonight && $observed_high == 0 ]]; then
sed -i '3s/$/\n-/' $HOME/Conky_WeatherCom_metric/10days/raw_10
fi
for (( i=2; i<=65; i+=7 ))
do
image=$(sed -n ${i}p $HOME/Conky_WeatherCom_metric/10days/raw_10)
cp $HOME/Conky_WeatherCom_metric/weather_com_images/$image $HOME/Conky_WeatherCom_metric/10_${i}.png
done
fi
line_count=$(cat $HOME/Conky_WeatherCom_metric/10days/raw_10|wc -l)
if [[ $line_count == 70 ]]; then
touch $HOME/Conky_WeatherCom_metric/10days/10days_OK
fi
kill -CONT $(pidof conky)
/media/5/Conky/LUA/draw-bg.lua
--[[Background originally by londonali1010 (2009)
ability to set any size for background mrpeachy 2011
ability to set variables for bg in conkyrc dk75
the change is that if you set width and/or height to 0
then it assumes the width and/or height of the conky window
so:
Above and After TEXT (requires a composite manager or it blinks!)
lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
OR Both above TEXT (no composite manager required - no blinking!)
lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT
Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
See below: 1 2 3 4 5 6 7
${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
covers the whole window and will change if you change the minimum_size setting
1 = 20 corner_radius
2 = 0 x_position
3 = 0 y_position
3 = 0 width
5 = 0 height
6 = 0x000000 color
7 = 0.4 alpha
######### calendar function ##################################################
then to use it, you activate the calendar function BELOW TEXT like this
${lua luacal {settings}}
#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
# x=x position top left
# y=y position top left
# tf=title font, eg "mono" must be in quotes
# tfs=title font size
# tc=title color
# ta=title alpha
# bf=body font, eg "mono" must be in quotes
# bfs=body font size
# bc=body color
# ba=body alpha
# hf=highlight font, eg "mono" must be in quotes
# hfs=highlight font size
# hc=highlight color
# ha=highlight alpha
# sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts
# gt=gap from title to body
# gh=gap horizontal between columns
# gv=gap vertical between rows
# sd=start day, 0=Sun, 1=Mon
# hstyle = heading style, 0=just days, 1=date insert
# tdf=title date font, eg "mono" must be in quotes
# tdfs=title date font size
# tdc=title date color
# tda=title date alpha
# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}
]]
require 'cairo'
local cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( { year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( { year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]=" "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]=" "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
elseif hstyle==1 then
if tonumber(sday)==0 then
dys={"SU","MO"," "," "," ","FR","SA"}
cairo_text_extents(cr,"MO",extents)
local s=extents.x_advance+gaph
local f=gaph*5
local tdfont=caltab.tdf or "mono"
local tdfontsize=caltab.tdfs or 12
local tdc=caltab.tdc or 0xffffff
local tda=caltab.tda or 1
cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tdfontsize);
local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
local insert=os.date("%b %y")
cairo_text_extents(cr,insert,extents)
local w=extents.x_advance
cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
cairo_show_text (cr,insert)
cairo_stroke (cr)
else
dys={"MO","TU"," "," "," ","SA","SU"}
cairo_text_extents(cr,"TU",extents)
local s=extents.x_advance+gaph
local f=gaph*5
local tdfont=caltab.tdf or "mono"
local tdfontsize=caltab.tdfs or 12
local tdc=caltab.tdc or 0xffffff
local tda=caltab.tda or 1
cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tdfontsize);
local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
local insert=os.date("%b %y")
cairo_text_extents(cr,insert,extents)
local w=extents.x_advance
cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
cairo_show_text (cr,insert)
cairo_stroke (cr)
end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function#######################################################
That's the whole kit and caboodle!
Questions? Just ask.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Try with this
address10="http://www.b.weather.com/weather/tenday/Buenos+Aires+ARBA0009:1:AR"
address. Notice the www.b.weather.com instead of www.weather.com.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Try with this
address10="http://www.b.weather.com/weather/tenday/Buenos+Aires+ARBA0009:1:AR"
address. Notice the www.b.weather.com instead of www.weather.com.
<-- Ba As with .b. 8.( London Ont. Canada ->
Started the Florida default with the same results.
All were started:
killall conky && conky -c /home/sector11/Conky_WeatherCom_metric/conkyrc_weather_com_metric &
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
ANNOUNCEMENT
Major goof up on my part. In the 5-6-12 update of the weather.com script, I updated the version of the metric script in my pc, but not the one in the dropbox tarball. Weather.com metric script - bash version - rebundled. Thanks to Sector11 for noticing it.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
ANNOUNCEMENT
Major goof up on my part. In the 5-6-12 update of the weather.com script, I updated the version of the metric script in my pc, but not the one in the dropbox tarball. Weather.com metric script - bash version - rebundled. Thanks to Sector11 for noticing it.
Is that what it's called? noticing it. I love it!
I call it an undocumented feature, abate one I noticed.
OK, time to download again and get to work!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Yeap, total brainfart on my part...
...and nobody noticed after almost 6 months, which says a lot about how many people are using the script
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Yeap, total brainfart on my part...
...and nobody noticed after almost 6 months, which says a lot about how many people are using the script
"That" particular script, I see TEO weather scripts all over the place, more accuweather & wunderground. I just happened to pick this one
And the new update is working as expected with the default conky that come packaged with the archive..
Background: Cataratas del Igiazú, Argentina
Now to play!
Using: TeoBigusGeekus_Conky_Weather_Scripts_1-10-12.tar.gz
Last edited by Sector11 (2012-11-29 21:15:35)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Using: 4) Weather.com conky script - all users
It come in two flavours: <-- 12 HR and 24 HR -->
and is the preferred clock of gauchos in Salta, Argentina!
Here's getting the MAX and MIN temperature values:
no no not the values, the spacing!
The conky: Teo_Weather_Clock.conky
# killall conky && conky -c ~/Conky_WeatherCom_metric/Teo_Weather_Clock.conky &
#
# Thank you:
# Chronograph LUA - mrpeachy (originally 4 clocks - tweaked by Sector11)
# v9000 LUA weather - mrpeachy
# background - londonali1010, mrpeachy, dk75
### Begin Window Settings ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Teo Weather Clock
# 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
### 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 normal
# own_window_argb_visual yes
### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0
#minimum_size 420 420 ## width, height
#maximum_width 420 ## width
### For use with The-Clock.lua
minimum_size 300 500 ## width, height
maximum_width 300 ## width
gap_x 10 #15 ### left &right
gap_y 10 ### up & down
### alignment values or top_left, bottom_right, etc
# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment tl
#################################################### End Window Settings ###
### Font Settings ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=11
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
###################################################### End Font Settings ###
### Color Settings #########################################################
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 C2CCFF # Not a clue - a blue #778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140 0 DarkOrange
color3 7FFF00 #127 255 0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF # 0 191 255 DeepSkyBlue
color7 00FFFF # 0 255 255 Cyan
color8 FFFF00 #255 255 0 Yellow
color9 B22222 #178 34 34 FireBrick
##################################################### End Color Settings ###
### Borders Section ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
##################################################### End Borders Secton ###
### Miscellaneous Section ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes
# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none
# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256
# Subtract (file system) buffers from used memory?
no_buffers yes
# change GiB to G and MiB to M
short_units yes
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes
imlib_cache_size 0
# Maximum size of user text buffer, i.e. layout below TEXT line in config file
# (default is 16384 bytes)
# max_user_text 16384
# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
############################################## End Miscellaneous Section ###
### LUA Settings ###########################################################
## draw-bg.lua - Above and After TEXT - requires a composite manager.
##
lua_load ~/Conky_WeatherCom_metric/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
#
# ----------------------------------------------------------------------------
## OR Both above TEXT - No composite manager required.
#
#lua_load ~/Conky_WeatherCom_metric/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3
#
# TEXT
### Teo Weather Clock ########################################################
lua_load ~/Conky_WeatherCom_metric/LUA/Teo_Weather_Clock.lua
lua_draw_hook_post main
############################## End LUA Settings ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
${texeci 600 bash $HOME/Conky_WeatherCom_metric/weath_com_metric}\
${color5}↑: ${color7}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10}°${alignr 5}\
${color5}T: ${color7}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°
${color5}↓: ${color2}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}°${alignr 5}\
${color5}±: ${color7}${execpi 1800 sed -n '5p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°
${image $HOME/Conky_WeatherCom_metric/now.png -p 122,122 -s 50x50}
${color5}Hum${alignr 5}D.P.${color}
${color7}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${alignr 5}${execpi 1800 sed -n '9p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}°${color}
${color5}Pressure${alignr 5}UV Index${color}
${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${alignr 5}${execpi 1800 sed -n '12p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${color}
${font monofur:bold:size=14}${alignc}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/RightNow/raw_rn}${font}
${font monofur:bold:size=10}${color5}${execpi 1800 sed -n '1p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 84}${execpi 1800 sed -n '8p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 145}${execpi 1800 sed -n '15p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 207}${execpi 1800 sed -n '22p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 267}${execpi 1800 sed -n '29p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${color}
${image $HOME/Conky_WeatherCom_metric/10_2.png -p 0,346 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_9.png -p 62,346 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_16.png -p 124,346 -s 50x50}
${image $HOME/Conky_WeatherCom_metric/10_23.png -p 186,346 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_30.png -p 248,346 -s 50x50}
${color2}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 68}${color2}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 130}${color2}${execpi 1800 sed -n '17p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '18p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 192}${color2}${execpi 1800 sed -n '24p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '25p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 254}${color2}${execpi 1800 sed -n '31p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '32p' $HOME/Conky_WeatherCom_metric/10days/raw_10}
${color5}${goto 20}${execpi 1800 sed -n '36p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 84}${execpi 1800 sed -n '43p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 145}${execpi 1800 sed -n '50p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 207}${execpi 1800 sed -n '57p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 267}${execpi 1800 sed -n '64p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}${color}
${image $HOME/Conky_WeatherCom_metric/10_37.png -p 0,415 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_44.png -p 62,415 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_51.png -p 124,415 -s 50x50}\
${image $HOME/Conky_WeatherCom_metric/10_58.png -p 186,415 -s 50x50}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${image $HOME/Conky_WeatherCom_metric/10_58.png -p 248,415 -s 50x50}${endif}
${color2}${execpi 1800 sed -n '3p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '4p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 68}${color2}${execpi 1800 sed -n '10p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '11p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 130}${color2}${execpi 1800 sed -n '17p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '18p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${goto 192}${color2}${execpi 1800 sed -n '24p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '25p' $HOME/Conky_WeatherCom_metric/10days/raw_10}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 254}${color2}${execpi 1800 sed -n '31p' $HOME/Conky_WeatherCom_metric/10days/raw_10} ${color7}${execpi 1800 sed -n '32p' $HOME/Conky_WeatherCom_metric/10days/raw_10}${endif}
${color1}${hr}
Teo_Weather_Clock.lua
--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
21 Jun 2012 - Chronograph modifications by Sector11
22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
12 Nov 2012 - memory leak plugged - mrpeachy
14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
26 Nov 2012 - The Clock - Sector11 (small version)
use in conkyrc
lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT
-- INDEX use search|find with: -- ### sonething ###
-- ### CLOCK POSITION - AND DEFAULTS ###
-- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
-- See lines 39 to 41 for overall size changes
-- ### START DIAL B ### Day Names Dial ###
-- See Lines 77 - 79 and 145 for changes
-- ### START DIAL C ### Month Names Dial ###
-- See Lines 143 -145 and 192 for changes
-- ### START DIAL D ### Day Numbers Dial ###
-- See Lines 226 & 257 for changes
-- ### START CLOCK A ###
-- See Lines & and 456 & 483 changes
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
-- CLOCK A HOUR HAND
-- CLOCK A MINUTE HAND SETUP
-- CLOCK A SECOND HAND SETUP
-- PART SECOND HAND Lines: 503 519, 531
NOTE: Putting ### CLOCK A ### last insures that it's functions are written
over the other dials.
]]
require 'cairo'
-- ### CLOCK POSITION - AND DEFAULTS ##########################################
local init={
center_x=153, --from 135 = +40
center_y=153, --from 135
radius=140,
lang="Spanish", -- English French Greek Spanish
hour=12, -- 12 | 24
second=true, --true | false - Seconds: dots and numbers IF 12HR
line=true, -- true | false - Part Second Hand
handday=false, -- DAY NAME hand - true or false
--handdaynum=false, -- DAY NUMBER hand - true or false
handmonth=false, -- MONTH NAME hand - true or false
color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
alpha=1 --alpha for day, day number and month IF NO SECOND HAND
}
-- ONLY NEED ONE COPY OF THIS FUNCTION
function rgb_to_r_g_b(col,alp)
return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)
function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
-- ### CLOCK 12|24 HR SELECTOR ############################
local clock_type_A=init.hour
-- ############################ CLOCK 12|24 HR SELECTOR ###
-- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
--local clock_border_width=0
-- set color and alpha for clock border
--local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
-- gap from clock border to minute marks
local b_to_m=0
-- #################### SET BORDER OPTIONS FOR "CLOCKS" ###
-- ### START DIAL B ### Day Names Dial ####################
-- DIAL POSITION
local center_x=init.center_x
local center_y=init.center_y
local radius=42
-- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end
local day_number=tonumber(os.date("%w"))
if init.handday == true then
for i=1,7 do
-- work out points
local point=(math.pi/180)*((360/7)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
else
for i=1,7 do -- working out points
if day_number == i-1 then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active day names
end
local point=(math.pi/180)*((360/7)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=27
for i=1,7 do
if day_number == i-1 then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active
end
local point=(math.pi/180)*((360/7)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
end
-- ######################################### END DIAL B ###
-- ### START DIAL C ### Month Names Dial ##################
-- DIAL POSITION
local center_x=init.center_x --(+85)
local center_y=init.center_y
local radius=73
-- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end
local this_month=tonumber(os.date("%m"))
if init.handmonth == true then
for i=1,12 do
-- OUTER POINTS POSTION FOR -- ### START DIAL D ## TEXT
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
else
for i=1,12 do
if this_month == i then
cairo_set_source_rgba (cr,0,1,1,1) -- active month colour
else
cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active month names
end
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=58
for i=1,12 do
if this_month == i then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.05) -- non-active month names
end
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
end
-- ######################################### END DIAL C ###
-- ### START DIAL D ### Day Numbers Dial ##################
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
-- MONTH TABLE
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning DAY #'s
local center_x=init.center_x
local center_y=init.center_y
local radius=105
cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
local this_day=tonumber(os.date("%d"))
for i=1,number_days do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/number_days)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
--only print even numbers
if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
text=string.format("%02d",i) --formats numbers to double digits
elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
text=string.format("%02d",i) --formats numbers to double digits
else
text=""
end --odd even matching
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
if i==this_day then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.35) -- dim inactive numbers
end
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=90
for i=1,number_days do
local point=(math.pi/180)*((360/number_days)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
if i==this_day then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.35) -- dim the points
end
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_stroke (cr)
end
-- ######################################### END DIAL D ###
-- ### START CLOCK A ######################################
-- SET MARKS ###
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
-- set mark length
local m_length_A=0 -- doesn't work but can't delete
-- set mark width
local m_width_A=0 -- doesn't work but can't delete
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete
-- SETUP HOUR HANDS ###
-- CLOCK A HOUR HAND
hh_length_A=90
-- set hour hand width
hh_width_A=4
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
-- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work
-- SETUP MINUTE HANDS ###
-- CLOCK A MINUTE HAND SETUP
-- set length of minute hand
mh_length_A=123
-- set minute hand width
mh_width_A=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
--mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work
-- SETUP SECOND HAND ###
-- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
-- set length of seconds hand -- yes I know it is commented out!
--sh_length_A=150
-- set hour hand width
--sh_width_A=2
-- set hour hand line cap
--sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
--shr,shg,shb,sha=1,0,0,1 -- fully opaque red
-- PART SECOND HAND
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
local arc=(math.pi/180)*((360/60)*seconds)
--calculate point 1
local radius1=120
local x1=0+radius1*math.sin(arc)
local y1=0-radius1*math.cos(arc)
--calculate point 2
local radius2=130
local x2=0+radius2*math.sin(arc)
local y2=0-radius2*math.cos(arc)
--draw line connecting points
cairo_move_to (cr, center_x+x1,center_y+y1)
cairo_line_to (cr, center_x+x2, center_y+y2)
cairo_set_source_rgba (cr,255/255,0/255,0/255,1) -- PART SECOND HAND
cairo_stroke (cr)
end
-- CLOCK A ### 12 HR TIME ###
-- CLOCK SETTINGS
clock_radius=0 --does not work
clock_centerx=init.center_x -- centre of Clock hands
clock_centery=init.center_y -- centre of Clock hands
-- DRAWING CODE
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
-- set line cap type
cairo_set_line_cap (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end -- of for loop
-- HOUR MARKS -- ???????????????????????????????????????????????????????????????
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND ###
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Hour Hand ================
cairo_set_line_cap (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Minute Hand ==============
cairo_set_line_cap (cr, mh_cap)
cairo_stroke (cr)
-- ### CLOCK A ###
local center_x=init.center_x -- Centre of the HR / Min Numbers
local center_y=init.center_y -- Centre of the HR / Min Numbers
local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
cairo_select_font_face (cr, "DS-Digital", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 22)
cairo_set_source_rgba (cr,1,1,1,1.0) -- HR Clock numbers
-- TABLE OF TEXT -- in order
if init.hour == 12 then
text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_set_source_rgba (cr,1,1,1,1.0) -- colour of HR Numbers
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=124 -- 12 HR Clock
for i=1,12 do
local point=(math.pi/180)*((360/12)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,0.50)
cairo_stroke (cr)
end
end
if init.hour == 24 then
text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
for i=1,24 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/24)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
-- INNER POINTS POSITION, radius smaller than text circle
local radius=124 -- 24 HR Clock
for i=1,24 do
local point=(math.pi/180)*((360/24)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
cairo_set_source_rgba (cr,1,1,1,0.4)
cairo_stroke (cr)
end
end
-- ############################################################################
-- POSITION FOR TEXT HOUR NUMBERS
if init.hour == 12 and init.second == true then
text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
-- INNER POINTS POSITION, radius smaller than text circle
cairo_set_source_rgba (cr,1,1,1,0.2) -- does not work -- settings moved
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
for i=1,60 do
local radius=124 -- dots for seconds Clock A (12 dial)
local point=(math.pi/180)*((360/60)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
if seconds == i-1 then
cairo_set_source_rgba (cr,255/255,0/255,0/255,0.05) -- does not work - settings moved
else
if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,0,1,1,0.45) -- dots for seconds A Clock
end
end
cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
cairo_stroke (cr)
end
radius=radius-3
cairo_set_font_size (cr, 10)
for i=1,60 do
-- OUTTER POINTS POSTION FOR TEXT
local point=(math.pi/180)*((360/60)*(i-1))
local x=0+radius*(math.sin(point))
local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
local text=text_days[i]--gets text from table
if seconds == tonumber(text) then
cairo_set_source_rgba (cr,0,1,1,1.0) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.5) -- seconds numbers
end
cairo_text_extents(cr,text,extents)
local width=extents.width
local height=extents.height
cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
cairo_show_text (cr, text)
cairo_stroke (cr)
end
end
-- ############################################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end -- end main function
draw-bg.lua
--[[Background originally by londonali1010 (2009)
ability to set any size for background mrpeachy 2011
ability to set variables for bg in conkyrc dk75
the change is that if you set width and/or height to 0
then it assumes the width and/or height of the conky window
so:
Above and After TEXT (requires a composite manager or it blinks!)
lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}
OR Both above TEXT (no composite manager required - no blinking!)
lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT
Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
See below: 1 2 3 4 5 6 7
${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
covers the whole window and will change if you change the minimum_size setting
1 = 20 corner_radius
2 = 0 x_position
3 = 0 y_position
3 = 0 width
5 = 0 height
6 = 0x000000 color
7 = 0.4 alpha
######### calendar function ##################################################
then to use it, you activate the calendar function BELOW TEXT like this
${lua luacal {settings}}
#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
# x=x position top left
# y=y position top left
# tf=title font, eg "mono" must be in quotes
# tfs=title font size
# tc=title color
# ta=title alpha
# bf=body font, eg "mono" must be in quotes
# bfs=body font size
# bc=body color
# ba=body alpha
# hf=highlight font, eg "mono" must be in quotes
# hfs=highlight font size
# hc=highlight color
# ha=highlight alpha
# sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts
# gt=gap from title to body
# gh=gap horizontal between columns
# gv=gap vertical between rows
# sd=start day, 0=Sun, 1=Mon
# hstyle = heading style, 0=just days, 1=date insert
# tdf=title date font, eg "mono" must be in quotes
# tdfs=title date font size
# tdc=title date color
# tda=title date alpha
# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}
]]
require 'cairo'
local cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( { year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( { year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]=" "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]=" "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
elseif hstyle==1 then
if tonumber(sday)==0 then
dys={"SU","MO"," "," "," ","FR","SA"}
cairo_text_extents(cr,"MO",extents)
local s=extents.x_advance+gaph
local f=gaph*5
local tdfont=caltab.tdf or "mono"
local tdfontsize=caltab.tdfs or 12
local tdc=caltab.tdc or 0xffffff
local tda=caltab.tda or 1
cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tdfontsize);
local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
local insert=os.date("%b %y")
cairo_text_extents(cr,insert,extents)
local w=extents.x_advance
cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
cairo_show_text (cr,insert)
cairo_stroke (cr)
else
dys={"MO","TU"," "," "," ","SA","SU"}
cairo_text_extents(cr,"TU",extents)
local s=extents.x_advance+gaph
local f=gaph*5
local tdfont=caltab.tdf or "mono"
local tdfontsize=caltab.tdfs or 12
local tdc=caltab.tdc or 0xffffff
local tda=caltab.tda or 1
cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tdfontsize);
local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
local insert=os.date("%b %y")
cairo_text_extents(cr,insert,extents)
local w=extents.x_advance
cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
cairo_show_text (cr,insert)
cairo_stroke (cr)
end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function#######################################################
Last edited by Sector11 (2012-12-01 12:19:54)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Awesome work Sector11!!!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Awesome work Sector11!!!
Thank you.
I forgot a couple of ${if_existing} statements. That's been fixed, here and above, now. It means when the weather goes into "Tonight" mode the 10th day isn't there.
The complete working conky looks like this:
Notice the:
High = ↑
low = ↓ and
Feels Like = ±
because it's available with the font: monofur (as well as Greek characters)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Hi there,
I have a hard time following the 22 pages of conky gallor here but it seems like great work and exactly what I am after.
I am using chronographer conky script which I really like. I would just want to add the moon phase.
I found the moonphase.tff font set which seems awesome to display the phase easily. The chronographer conky script uses accuweather for the forecast, but it doesn't pull out the moonphase from accuweather.
So I am wondering where I can find the script to pull the accuweather moonphase, and the I'll connect it to the font ~ or if someone did that already, even better! Or any pointer to the script I should start disecting to get that going
thanks!! 8o
ponnuki studio
ponnuki.net
Offline
That strange - I would have sworn that Teo's scripts got the moon phase.
It's in the: raw_td file for today.
- I'm using weather.com
Last edited by Sector11 (2012-12-03 00:11:15)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
so I should find the script in :
TeoBigusGeekus_Conky_Weather_Scripts_29-11-12/4_Weather_com_ALL/Conky_WeatherCom_metric/Today
wella actually most of the folder in weathercom are empty apart for the png...
ponnuki studio
ponnuki.net
Offline
You should run the script first for the folders to be populated.
Read the pdf for more info.
Oh yeah, I forgot: you don't even have to run the script; there's a pdf called "Output_of_the_script" (or something) where you can see what info is extracted with it.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
You should run the script first for the folders to be populated.
Read the pdf for more info.
Oh yeah, I forgot: you don't even have to run the script; there's a pdf called "Output_of_the_script" (or something) where you can see what info is extracted with it.
For the weather.com script I used there is no moon phase information in the PDF files but there is in the raw_td, today and tonight files.
With my very limited sed | grep skills, I added this to the end of the conky posted earlier. If I recall correctly, at night after weather.com stops sending today info, the line numbers in the files change and the "today" file stops with the moon phase as well.
${color1}${hr}
-------------
day: ${execpi 1800 sed -n | grep -n 'Moonphase:' /media/5/Conky/TeoWeatherClock/Today/day | cut -c 15-}
night: ${execpi 1800 sed -n | grep -n 'Moonphase:' /media/5/Conky/TeoWeatherClock/Today/night | cut -c 15-}
--- by lines ---
raw_td: ${execpi 1800 sed -n '12p' /media/5/Conky/TeoWeatherClock/Today/raw_td | cut -c 12-}
day: ${execpi 1800 sed -n '11p' /media/5/Conky/TeoWeatherClock/Today/day | cut -c 12-}
night: ${execpi 1800 sed -n '11p' /media/5/Conky/TeoWeatherClock/Today/night | cut -c 12-}
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
If I recall correctly, I didn't bother with the moon phases because they are totally inconsistent, as this the whole weather.com page.
Sometimes they are present, sometimes they're not, so I excluded them altogether.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
If I recall correctly, I didn't bother with the moon phases because they are totally inconsistent, as this the whole weather.com page.
Sometimes they are present, sometimes they're not, so I excluded them altogether.
Yea, I picked up on that. Not nice of them changing the info like that.
That's it, now I start work on "1d1_Accuweather_INT_Images"
it a spin of the wheel though - The Clock, The Chronograph or by itself?
decisions - - - decisions - - - decisions
Last edited by Sector11 (2012-12-03 20:33:39)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Yea, I picked up on that. Not nice of them changing the info like that.
That's it, now I start work on "1d1_Accuweather_INT_Images"
it a spin of the wheel though - The Clock, The Chronograph or by itself?
decisions - - - decisions - - - decisions
A sane choice IMHO. weather.com sucks. I only did this script for people that missed kaivalagi's one (and the C version because the bash one is slow).
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
A sane choice IMHO. weather.com sucks. I only did this script for people that missed kaivalagi's one (and the C version because the bash one is slow).
Yea, and K's conkyForecast is working again without the ID and KEY it use to require. Go figure!
One accuweather conky coming soon!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
that's what I figured out so far, that accuweather had the moon phase available.
What about the xml outpust from accuweather ~ do you need a username/password to access the xml output? would be a lot more fun to parse xml than a changin webpage :S
For chronographer, the disk space usage is always something that I find irrevelenant, as if I would need a live feed to tell me 'HO NO MY HD IS FULL!! DIDN"T SEE THAT COMMING!' so I was thinking to replace that inner clock with the moon font (so there is more detail of the moon cycle).
But again, cronograph uses accuweather so I'll look how to move forward with accuweather moon cycle, I gues it could also be calculated directly from today's date, instead of fetched over the internet... I wish I was good at all that !! (well I whish I was good at many thing! like everything!)
ponnuki studio
ponnuki.net
Offline
HELP!!!
Accuweather decided to change the layout of their webpage and the script is screwed now... here is what mine displays now:
Here is what they say about that:
http://www.accuweather.com/en/features/ … to/2220710
can someone please fix this so that my display would look like it should again? I can post the whole conkyrc and Accuweather-Script.sh if needed.
Took me days to adapt the conkyrc I got from this link:
http://gnome-look.org/content/show.php/ … ent=148080
that looks like this:
to get it to look like this on my desktop:
NOTE: The first two from the right are weather.com based conky
Thanks
Last edited by Doruletz (2012-12-05 14:17:07)
Linux ROCKS, Winodw$ SUCKS.
And Mac is just an overpriced dumbed down version of "Linux for Dummies"
Offline
Deleted.
Last edited by TeoBigusGeekus (2012-12-10 12:35:18)
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Talk about bad timing ....
Lots of mails to answer - starting with short ones to everyone to
explain absence --
Lost power Wednesday afternoon, just got it back... huge parts of the
city still in blackout. Cause: poor to no maintenance (my opinion) and
it might happen again tomorrow if the news is correct!
Catch up later.
I'll be back ...
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Hey TeoBigusGeekus Ive noticed a few errors while starting up the usa_images script again. It seems to start ok but the errors cause it to not update correctly I think. Just so you know buddy.
My output when starting conky:luke@crunchbang-desktop:~$ ~/Conky/conky_start.sh WARNING: gnome-keyring:: couldn't connect to: /home/luke/.cache/keyring-BpfGdu/pkcs11: No such file or directory Conky: desktop window (1800003) is subwindow of root window (28f) Conky: window type - normal Conky: drawing to created window (0x1400002) Conky: drawing to double buffer luke@crunchbang-desktop:~$ WARNING: gnome-keyring:: couldn't connect to: /home/luke/.cache/keyring-BpfGdu/pkcs11: No such file or directory Conky: desktop window (1800003) is subwindow of root window (28f) Conky: window type - normal Conky: drawing to created window (0x2000002) Conky: drawing to double buffer wget: no process found --2012-09-27 01:08:21-- http://www.accuweather.com/en/us/monrovia-ca/91016/current-weather/91016us?day=1 Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.26, 63.80.242.34 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.26|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/curr_cond_raw' [ <=> ] 93,226 336K/s in 0.3s 2012-09-27 01:08:28 (336 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/curr_cond_raw' saved [93226] --2012-09-27 01:08:28-- http://www.accuweather.com/en/us/monrovia-ca/91016/daily-weather-forecast/38115_pc Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.26, 63.80.242.34 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.26|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/tod_ton_raw' [ <=> ] 97,724 336K/s in 0.3s 2012-09-27 01:08:33 (336 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/tod_ton_raw' saved [97724] --2012-09-27 01:08:33-- http://www.accuweather.com/en/us/monrovia-ca/91016/daily-weather-forecast/38115_pc?day=6 Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.34, 63.80.242.26 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.34|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/last_days_raw' [ <=> ] 97,463 336K/s in 0.3s 2012-09-27 01:08:40 (336 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/last_days_raw' saved [97463] cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory wget: no process found --2012-09-27 01:08:40-- http://www.accuweather.com/en/us/monrovia-ca/91016/current-weather/91016us?day=1 Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.26, 63.80.242.34 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.26|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/curr_cond_raw' [ <=> ] 93,327 335K/s in 0.3s 2012-09-27 01:08:46 (335 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/curr_cond_raw' saved [93327] --2012-09-27 01:08:46-- http://www.accuweather.com/en/us/monrovia-ca/91016/daily-weather-forecast/38115_pc Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.34, 63.80.242.26 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.34|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/tod_ton_raw' [ <=> ] 97,849 335K/s in 0.3s 2012-09-27 01:08:52 (335 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/tod_ton_raw' saved [97849] --2012-09-27 01:08:52-- http://www.accuweather.com/en/us/monrovia-ca/91016/daily-weather-forecast/38115_pc?day=6 Resolving www.accuweather.com (www.accuweather.com)... 63.80.242.26, 63.80.242.34 Connecting to www.accuweather.com (www.accuweather.com)|63.80.242.26|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `/home/luke/Accuweather_Conky_USA_Images/last_days_raw' [ <=> ] 97,493 335K/s in 0.3s 2012-09-27 01:08:57 (335 KB/s) - `/home/luke/Accuweather_Conky_USA_Images/last_days_raw' saved [97493] cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory cp: cannot stat `/home/luke/Accuweather_Conky_USA_Images/Forecast_Images/.png': No such file or directory
Btw I downloaded the scripts again in case you updated them but nothing changed.
Heres my weather conky:############################################## # Settings ############################################## max_specials 10000 max_user_text 15000 background no use_xft yes xftfont sans:size=9 xftalpha 1 total_run_times 0 own_window yes own_window_argb_visual yes own_window_transparent yes own_window_type normal own_window_title conky own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager double_buffer yes minimum_size 250 maximum_width 250 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_right gap_x 10 gap_y 15 no_buffers yes uppercase no cpu_avg_samples 2 override_utf8_locale yes text_buffer_size 100000 top_name_width 5 update_interval 1 default_color FFFFFF temperature_unit fahrenheit ## Set the path to your script here. lua_load ~/Conky/allcombined.lua ## lua funcions ## background ################################################################## #${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha}} #note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height ## gradient bars ############################################################### #${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}} ## calendar ############################################################### #${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day} #note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts ## textured background ############################################################### #${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}} ## lua draw images ############################################################### #${lua luaimage {x_position,y_position,width,height,"/path/to/image"}} #note for images: set width=0 - width will be image width, set height=0 - height will be image height ## lua draw text ############################################################### #${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}} # not for text: justify can be "r" = right, "c" = center, "l" = left #${lua draw_bg {10,0,0,0,0,0x000000,0.1}} TEXT ${lua draw_bg {15,0,0,0,0,0x000000,0.5}} ${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p -30,30 -s 180x108} ${goto 125}${font Ubuntu:size=10}TEMP:${alignr 3}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F (${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F) ${goto 125}WIND:${alignr 3}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}HUM:${alignr 3}${execpi 600 sed -n '7p' $HOME/Accuweather_Conky_USA_Images/curr_cond} #${goto 125}PRESS:${alignr 3}${execpi 600 sed -n '8p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}CLOUDY:${alignr 3}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/curr_cond} #${goto 125}UV INDEX:${alignr 10}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/curr_cond} #${goto 125}DEW POINT:${alignr 3}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}PERCIP:${alignr 3}${execpi 600 sed -n '12p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}VISIB.:${alignr 3}${execpi 600 sed -n '13p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}SUNRISE:${alignr 3}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${goto 125}SUNSET:${alignr 3}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
I'm having the exact same errors. Is there any fix for this? I assume they've changed the page.
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat