Ok so final thing -
Thanks for the help everyone, I've got it working so far. Last thing is the weather script should be 3 days (including the current day) but it is only showing 2 including the current. Where did I mess up on that?
This is my current conky
Code:
background no
update_interval 1
total_run_times 0
own_window yes
own_window_transparent yes
own_window_class Conky
own_window_hints undecorate,sticky,skip_pager,skip_taskbar,below
double_buffer yes
no_buffers yes
text_buffer_size 2048
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
use_spacer none
minimum_size 1000 0
alignment top_left
gap_x 12
gap_y 12
uppercase no
use_xft yes
xftfont DejaVu Sans:size=12
xftalpha 0.8
default_color 000
TEXT
${color 48bcff}Chicago Weather ${hr 2}$color${execi 600 bash $HOME/1d_accuweather_rss/1d}
${font conkyweather:size=30}${execpi 600 sed -n '2p' $HOME/1d_accuweather_rss/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '1p' $HOME/1d_accuweather_rss/weather|cut -c1-20}
${goto 75}${execpi 600 sed -n '1p' $HOME/1d_accuweather_rss/weather|cut -c21-40}
${goto 75}${execpi 600 sed -n '1p' $HOME/1d_accuweather_rss/weather|cut -c41-60}
${execi 600 sed -n '3p' $HOME/1d_accuweather_rss/weather}
${font conkyweather:size=30}${execpi 600 sed -n '5p' $HOME/1d_accuweather_rss/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '4p' $HOME/1d_accuweather_rss/weather|cut -c1-20}
${goto 75}${execpi 600 sed -n '4p' $HOME/1d_accuweather_rss/weather|cut -c21-40}
${goto 75}${execpi 600 sed -n '4p' $HOME/1d_accuweather_rss/weather|cut -c41-60}
${execi 600 sed -n '6p' $HOME/1d_accuweather_rss/weather}
${font conkyweather:size=30}${execpi 600 sed -n '8p' $HOME/1d_accuweather_rss/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '4p' $HOME/1d_accuweather_rss/weather|cut -c1-20}
${goto 75}${execpi 600 sed -n '7p' $HOME/1d_accuweather_rss/weather|cut -c21-40}
${goto 75}${execpi 600 sed -n '7p' $HOME/1d_accuweather_rss/weather|cut -c41-60}
${voffset 200}${font DejaVu Sans:size=24}${time %A}, ${time %d} ${time %B} ${time %Y}${font}
${battery_bar 8,720 BAT0}
${voffset -8}${fs_bar 8,720 /}
${voffset -8}${goto 400}${cpubar 8,310 cpu}
${voffset -8}${goto 400}${font saxMono:size=9}${top pid 1}${font DejaVu Sans:size=8}${voffset -1} ${top name 1}${voffset 1}${goto 660}${font saxMono:size=9}${top cpu 1}
${goto 400}${font saxMono:size=9}${top pid 2}${font DejaVu Sans:size=8}${voffset -1} ${top name 2}${voffset 1}${goto 650}${font saxMono:size=9}${top cpu 2}
${goto 400}${font saxMono:size=9}${top pid 3}${font DejaVu Sans:size=8}${voffset -1} ${top name 3}${voffset 1}${goto 640}${font saxMono:size=9}${top cpu 3}
${goto 400}${font saxMono:size=9}${top pid 4}${font DejaVu Sans:size=8}${voffset -1} ${top name 4}${voffset 1}${goto 620}${font saxMono:size=9}${top cpu 4}
${goto 400}${membar 8, 260}
${goto 400}${font saxMono:size=9}${top_mem pid 1}${font DejaVu Sans:size=8}${voffset -1} ${top_mem name 1}${voffset 1}${goto 620}${font saxMono:size=9}${top_mem mem 1}
${goto 400}${font saxMono:size=9}${top_mem pid 2}${font DejaVu Sans:size=8}${voffset -1} ${top_mem name 2}${voffset 1}${goto 630}${font saxMono:size=9}${top_mem mem 2}
${goto 400}${font saxMono:size=9}${top_mem pid 3}${font DejaVu Sans:size=8}${voffset -1} ${top_mem name 3}${voffset 1}${goto 640}${font saxMono:size=9}${top_mem mem 3}
${goto 400}${font saxMono:size=9}${top_mem pid 4}${font DejaVu Sans:size=8}${voffset -1} ${top_mem name 4}${voffset 1}${goto 650}${font saxMono:size=9}${top_mem mem 4}${font}
${voffset -90}${font route3:size=160}${time %l}${font route3:size=100}${voffset -80}${goto 230}${time %M}${font}
and the current weather script
Code:
#!/bin/bash
#function: test_image
test_image () {
case $1 in
1|01)
echo a
;;
2|02)
echo b
;;
3|03)
echo c
;;
4|04)
echo c
;;
5|05)
echo c
;;
6|06)
echo d
;;
7|07)
echo e
;;
8|08)
echo e
;;
11)
echo 0
;;
12)
echo h
;;
13|14)
echo g
;;
15)
echo l
;;
16|17)
echo k
;;
18|26)
echo i
;;
19)
echo p
;;
20|21|23)
echo o
;;
22)
echo r
;;
24|31)
echo E
;;
25)
echo u
;;
29)
echo v
;;
30)
echo 5
;;
32)
echo 6
;;
33)
echo A
;;
34|36|37)
echo B
;;
35|38)
echo C
;;
39|40)
echo G
;;
41|42)
echo K
;;
43|44)
echo O
;;
esac
}
#put your accuweather rss address here
address="http://rss.accuweather.com/rss/liveweather_rss.asp?locCode=60510"
killall wget
wget -O $HOME/1d_accuweather_rss/weather_raw $address
if [[ -s $HOME/1d_accuweather_rss/weather_raw ]]; then
egrep 'Currently|Forecast<\/title>|_31x31.gif' $HOME/1d_accuweather_rss/weather_raw > $HOME/1d_accuweather_rss/weather
sed -i '/AccuWeather\|Currently in/d' $HOME/1d_accuweather_rss/weather
sed -i -e 's/^[ \t]*//g' -e 's/<title>\|<\/title>\|<description>\|<\/description>//g' $HOME/1d_accuweather_rss/weather
sed -i -e 's/<img src="/\n/g' $HOME/1d_accuweather_rss/weather
sed -i '/^$/d' $HOME/1d_accuweather_rss/weather
sed -i -e 's/_31x31.*$//g' -e 's/^.*\/icons\///g' $HOME/1d_accuweather_rss/weather
sed -i -e '1s/.$//' -e '3s/.$//' -e '6s/.$//' $HOME/1d_accuweather_rss/weather
for (( i=2; i<=8; i+=3 ))
do
im=$(sed -n ${i}p $HOME/1d_accuweather_rss/weather)
sed -i $i"s/^.*$/$(test_image $im)/" $HOME/1d_accuweather_rss/weather
done
fi
everything above has been edited with you guys help, and is currently what is working minus the 3rd day in the forecast.
p.s. anyone interested in using the script above feel free. The setup is as follows -
create a Conky dir in your home dir
in the conky dir create a file called conkymain and copy and paste the first script into it
create a 1d_accuweather_rss dir in your home dir
in the 1d_accuweather_rss dir create a file called 1d, copy and paste the second script into it
run your conky with
Code:
conky -c ~/Conky/conkymain
Bookmarks