News:

Linux su Macbook Apple M1? Fedora Asahi Linux.

Menu principale
+-

+-Utente

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

La mostra dei Conky

Aperto da danialbi, Sabato 20 Novembre 2010, 00:13:51

Discussione precedente - Discussione successiva

daniodo

Nuovo conky meteo



questo il conkyrc:
# -- Conky settings -- #
    background no
    update_interval 1

    cpu_avg_samples 2
    net_avg_samples 2

    override_utf8_locale yes

    double_buffer yes
    no_buffers yes

    text_buffer_size 2048
    imlib_cache_size 0

    # -- Window specifications -- #

    own_window_class Conky
    own_window yes
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

    border_inner_margin 0
    border_outer_margin 0

    minimum_size 200
    maximum_width 380
   

    alignment tr
    gap_x 400
    gap_y 30

    # -- Graphics settings -- #
    draw_shades no
    draw_outline no
    draw_borders no
    draw_graph_borders yes

    # -- Text settings -- #
    use_xft yes
    xftfont ZeKton:size=10:style=bold
    xftalpha 0.4

    uppercase no

    default_color 8b8b8b

TEXT
${color 729FCF}${font ZeKton:size=13:style=bold}Meteo  ${execi 1800 conkyForecast --location=ITXX0089 -u --datatype=CN}  ${voffset 5}$hr
${voffset -28}${font}${color white}${goto 120}${execi 1800 conkyForecast --location=ITXX0089 -u --datatype=HT}  -  ${execi 1800 conkyForecast --location=ITXX0089 --datatype=CT}
${voffset 8}Visibilità: ${execi 1800 conkyForecast --location=ITXX0089 --datatype=VI}${alignr}${execi 1800 conkyForecast --location=ITXX0089 --datatype=MP}
Umidità:    ${execi 1800 conkyForecast --location=ITXX0089 --datatype=HM}
Alba: ${execi 1800 conkyForecast --location=ITXX0089 --datatype=SR}
Tramonto: ${execi 1800 conkyForecast --location=ITXX0089 --datatype=SS}
Irradiaz.:  ${execi 1800 conkyForecast --location=ITXX0089 --datatype=UI} / ${execi 1800 conkyForecast --location=ITXX0089 --datatype=UT}${goto 290}${execi 1800 conkyForecast --datatype=WD}
${execi 1800 conkyForecast --location=ITXX0089 --datatype=BR}, ${execi 1800 conkyForecast --location=ITXX0089 --datatype=BD}${goto 290}${execi 1800 conkyForecast --datatype=WS}
${voffset -5}${color 729FCF}$hr
${voffset -3}${color yellow}${alignc}Prossimi giorni
${voffset -5}${color 729FCF}$hr
${font ZeKton:size=11:style=bold}${color white}${goto 10}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=1}${goto 65}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=2}${goto 120}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=3}${goto 175}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=4}${goto 230}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=5}${goto 285}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=6}${goto 340}${execi 600 conkyForecast --location=ITXX0089 --datatype=DW --shortweekday --startday=7}
${voffset 45}${font ZeKton:size=10:style=bold}${color white}${goto 10}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=1}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=1}${color white}${goto 65}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=2}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=2}${color white}${goto 120}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=3}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=3}${color white}${goto 175}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=4}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=4}${color white}${goto 230}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=5}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=5}${color white}${goto 285}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=6}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=6}${color white}${goto 340}${execi 600 conkyForecast --location=ITXX0089 --datatype=HT -u --startday=7}/${color 707070}${execi 600 conkyForecast --location=ITXX0089 --datatype=LT -u --startday=7}
${color green}${execpi 600 conkyForecast --location=ITXX0089 --template=~/.vreme.template}


e questo il relativo .vreme/template:
${image [--datatype=WI] -p 140,10 -s 113x113}                   # Tempo attuale
${image [--datatype=WI --startday=1] -p 5,175 -s 43x43}       # Previsioni 1° giorno
${image [--datatype=WI --startday=2] -p 60,175 -s 43x43}      # Previsioni 2° giorno
${image [--datatype=WI --startday=3] -p 115,175 -s 43x43}     # Previsioni 3° giorno
${image [--datatype=WI --startday=4] -p 170,175 -s 43x43}     # Previsioni 4° giorno
${image [--datatype=WI --startday=5] -p 225,175 -s 43x43}     # Previsioni 5° giorno
${image [--datatype=WI --startday=6] -p 280,175 -s 43x43}     # Previsioni 6° giorno
${image [--datatype=WI --startday=7] -p 335,175 -s 43x43}     # Previsioni 7° giorno
${image [--datatype=MI] -p 300,42 -s 45x45}                   # Fase lunare
${voffset -152}${goto 335}${font ConkyWindNESW:style=Bold:size=38}${execi 600 conkyForecast --datatype=BS} # Direzione vento
La causa della maggior parte dei problemi di un computer si trova tra la tastiera e lo schienale della sedia.
Gnomint su Aspire TimelineX 4820TG-I5-Ati Mobility Radeon HD5470 512Mb / Mint10 Gnome 64 bit su Aspire 6930G-Core 2 Duo T9400-NVidia GeForce 9600M GT 512Mb

drugo

Grazie daniodo e ken, si in effetti non ha molto senso monitorare l'intero HDD, comunque adesso se voglio so la procedura ;D
PS: Siccome "fidarsi è bene, non fidarsi è meglio", quando seguite una guida in internet, prendete la buona abitudine di fare copia e incolla prima in un editor di testo, controllando così che non ci siano codici strani, poi  nel terminale; vi eviterete spiacevoli sorprese!
PPS: Un'amicizia è sempre un'amicizia anche se virtuale!

ken

...e bravo daniodo  :clap: come sempre al solito

drugo

Grazie midnite, mi mancava questa dicitura:
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
:ok:
PS: Siccome "fidarsi è bene, non fidarsi è meglio", quando seguite una guida in internet, prendete la buona abitudine di fare copia e incolla prima in un editor di testo, controllando così che non ci siano codici strani, poi  nel terminale; vi eviterete spiacevoli sorprese!
PPS: Un'amicizia è sempre un'amicizia anche se virtuale!

ch3m

Citazione di: daniodo il Domenica 29 Gennaio 2012, 11:25:22
Allora, si è possibile monitorare l'intero hard disk, ma si è costretti a montare TUTTE le partizioni che lo compongono in modo da consentire al conky di vederle e fare le dovute addizioni.

era quello che volevo intendere ma non sapevo come si faceva! ;D Grazie della dritta!

Dopo 2 giorni di sbattimento per il real feel nel meteo (cosa essenziale qui in Dk) ho finalmente trovato una soluzione ma non con i dati metar visto che li non c'è  :boh:

il risultato è questo:


si basa sui dati accuweather

qui il relativo file conkyrc:
# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
# Settings
##############################################
background no
use_xft yes
xftfont Liberation Sans:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
## no compositor
own_window_type normal
own_window_argb_visual no

## xcompmgr
own_window_type normal
own_window_argb_visual yes

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 300 300
maximum_width 300
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
#default_color 1a1a1a
default_color ffffff
default_shade_color 000000
default_outline_color 828282
alignment top_right
gap_x 10
gap_y 10
short_units yes
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
##############################################
#  Output
##############################################
TEXT
$alignr
${font wwDigital:size=80}${alignr}${time %H:%M}${font}

${font wwDigital:size=12}${alignr 5}${time %A, %d %B %Y}${font}

${font wwDigital:size=25} ${alignr}Copenhagen, DK
#${font wwDigital:size=12}${alignr}${color ffe595}WEATHER ${font}${texeci 500 bash /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/acc_int_cwfont}
${font wwDigital:size=12}${alignr}${execpi 600 sed -n '1p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${font}
${goto 150}${font conkyweather:size=80}${execi 600  sed -n '27p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}

${font wwDigital:size=12}
${goto 100}${color ffe595}TEMP: $color${alignr}${execpi 600 sed -n '29p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C (${execpi 600 sed -n '30p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C)
${goto 100}${color ffe595}WIND: $color${alignr}${execpi 600 sed -n '31p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond} ${execpi 600 sed -n '32p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}HUM: $color${alignr}${execpi 600 sed -n '33p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '37p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C
${goto 100}${color ffe595}PR: $color${alignr}${execpi 600 sed -n '34p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}VISIB: $color${alignr}${execpi 600 sed -n '38p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}CLOUD COVER: $color${alignr}${execpi 600 sed -n '35p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}UV INDEX: $color${alignr}${execpi 600 sed -n '36p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}S/M RISE: $color${alignr}${execpi 600 sed -n '39p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}/${execpi 600 sed -n '41p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 100}${color ffe595}S/M SET: $color${alignr}${execpi 600 sed -n '40p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}/${execpi 600 sed -n '42p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}
${font}

${font wwDigital:size=12}${alignr}${color grey}CPU 1:$color ${cpu cpu0}%  ${color grey}CPU 2:$color ${cpu cpu1}%
${font wwDigital:size=12}${alignr}${color grey}CPU Temperature:$color ${hwmon temp 1}°C
${font wwDigital:size=12}${alignr -7}${color grey}RAM Usage:$color $mem/$memmax - $memperc%
${alignr}${membar 5, 220}
${alignr}${font wwDigital:size=12}${color grey}Libero: $color ${fs_free}  ${color grey}Totale: $color ${fs_size}
${alignr}${fs_bar 5, 220}



e lo script necessario:
#!/bin/bash

#function: test_image_day
test_image_day () {
    case $1 in
         su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         ic)
           echo c
         ;;
         h)
           echo c
         ;;
         mc)
           echo d
         ;;
         c)
           echo e
         ;;
         d)
           echo e
         ;;
         f)
           echo 0
         ;;
         s)
           echo h
         ;;
         mcs)
           echo g
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         mct)
           echo k
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         mcfl)
           echo o
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         mcsn)
           echo o
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         w)
           echo 6
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         pct)
           echo K
         ;;
        esac
}

#function: test_image_night
test_image_night () {
    case $1 in
su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         c)
           echo f
         ;;
         d)
           echo f
         ;;
         f)
           echo f
         ;;
         s)
           echo h
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         w)
           echo 6
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         ic)
           echo B
         ;;
         h)
           echo B
         ;;
         mc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         mcs)
           echo G
         ;;
         pct)
           echo K
         ;;
         mct)
           echo K
         ;;
         mcfl)
           echo O
         ;;
         mcsn)
           echo O
         ;;
        esac
}


#put your Accuweather address here
address="http://www.accuweather.com/en/dk/copenhagen/123094/weather-forecast/123094"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
addr2="$addr1"?day=6

kill -STOP $(pidof conky)
killall wget

wget --save-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw $curr_addr
wget --load-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw $addr1
wget --load-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw $addr2

#Current Conditions - curr_cond file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw ]]; then

    egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|var d = '\''|var s = '\''|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |am<\/span>|pm<\/span>' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' -e 's/RealFeel/\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/^.*"#">//g' -e 's/^.*<strong class="temp"//g' -e 's/^>//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/<\/a>.*$//g' -e 's/\/span> //g' -e 's/var d = //g' -e 's/var s = //g' -e 's/"temp">/\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/^.*"start">//g' -e 's/^.*"finish">//g' -e 's/<li>//g' -e 's/<strong>//g' -e 's/<<span.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/<\/span>//g' -e 's/<\/strong><\/li>//g' -e 's/ "><\/div>//g' -e 's/'\''//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/"><\/div>//g' -e 's/^.*; //g' -e 's/&#.*$//g' -e 's/ i-alarm.*$//g' -e 's/;//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/Humidity: //g' -e 's/Pressure: //g' -e 's/Cloud Cover: //g' -e 's/UV Index: //g' -e 's/Dew Point: //g' -e 's/Visibility: //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/">//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
    time=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 3a- /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
fi
    time=$(sed -n 26p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
image=$(sed -n 27p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
    if [[ $time == day ]]; then
    sed -i 27s/$image/$(test_image_day $image)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
elif [[ $time == night ]]; then
    sed -i 27s/$image/$(test_image_night $image)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
fi

fi


#First 5days - first_days file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw ]]; then

    egrep -i '>Today<|<p>[a-z]|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    sed -i -e 's/<p>//g' -e 's/<\/p>//g' -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
sed -i -e 's/Today/TODAY/' -e 's/Mon/MONDAY/' -e 's/Tue/TUESDAY/' -e 's/Wed/WEDNESDAY/' -e 's/Thu/THURSDAY/' -e 's/Fri/FRIDAY/' -e 's/Sat/SATURDAY/' -e 's/Sun/SUNDAY/' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    time=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 2a- /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
fi
L1=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
    if [[ $L1 == TODAY ]]; then
        sed -i 1d /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
fi
    for (( i=6; i<=21; i+=5 ))
  do
      image_raw=$(sed -n "${i}"p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
      sed -i ${i}s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
  done
    image_raw=$(sed -n 25p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
sed -i 25s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
    image_raw=$(sed -n 30p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
sed -i 30s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days

fi


#Last 5days - last_days file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw ]]; then

    egrep -i '>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
    sed -i -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
sed -i -e 's/Mon/MONDAY/' -e 's/Tue/TUESDAY/' -e 's/Wed/WEDNESDAY/' -e 's/Thu/THURSDAY/' -e 's/Fri/FRIDAY/' -e 's/Sat/SATURDAY/' -e 's/Sun/SUNDAY/' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
    for (( i=2; i<=22; i+=5 ))
  do
      image_raw=$(sed -n "${i}"p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days)
      sed -i ${i}s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
  done

fi

#messages file
sed -n 28p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond | cut -c -20 > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
sed -n 29p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
sed -n 34p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
for (( i=7; i<=22; i+=5 ))
  do
      sed -n ${i}p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
  done
for (( i=3; i<=23; i+=5 ))
  do
      sed -n ${i}p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
  done

kill -CONT $(pidof conky)

"Ma guardate l'idrogeno tacere nel mare guardate l'ossigeno al suo fianco dormire soltanto una legge che io riesco a capire ha potuto sposarli senza farli scoppiare.." F. de Andrè


daniodo

Ottimo!  :ok:

Non conoscevo Accuweather e dallo script sembra che si possano visualizzare info per le previsioni meteo dei 5 giorni successivi (e 5 precedenti?!).

Dai, sviluppa un altro pò, tanto ormai ti sei "beccato" anche tu la conkymania..... brutta malattia, brutta brutta!  ;D
La causa della maggior parte dei problemi di un computer si trova tra la tastiera e lo schienale della sedia.
Gnomint su Aspire TimelineX 4820TG-I5-Ati Mobility Radeon HD5470 512Mb / Mint10 Gnome 64 bit su Aspire 6930G-Core 2 Duo T9400-NVidia GeForce 9600M GT 512Mb

ch3m

modificato leggermente così da vedere le previsioni striminzite per i prossimi 3 giorni.
Ho cambiato anche lo script in modo tale che indichi i giorni della settimana con le prime 3 lettere.

qui il file conky:

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic/59/my-conky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic/2047/conky-help/
#
# Enjoy! :)
##############################################
# Settings
##############################################
background no
use_xft yes
xftfont Liberation Sans:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
## no compositor
own_window_type normal
own_window_argb_visual no

## xcompmgr
own_window_type normal
own_window_argb_visual yes

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 300 300
maximum_width 300
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
#default_color 1a1a1a
default_color ffffff
default_shade_color 000000
default_outline_color 828282
alignment top_right
gap_x 10
gap_y 10
short_units yes
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
##############################################
#  Output
##############################################
TEXT
$alignr
${font wwDigital:size=84}${alignr}${time %H:%M}${font}

${font wwDigital:size=15}${alignr 5}${time %A, %d %B %Y}${font}
${font wwDigital:size=25} ${alignr}Copenhagen, DK${font}

${font wwDigital:size=10}${goto 55}${execpi 600 sed -n '1p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${font}${goto 150}${font wwDigital:size=11}${color ffe595}TEMP: $color${alignr}${execpi 600 sed -n '29p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C (${execpi 600 sed -n '30p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C)
${goto 55}${font conkyweather:size=65}${execi 600  sed -n '27p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}
${font wwDigital:size=11}${voffset -85}${goto 150}${color ffe595}WIND: $color${alignr}${execpi 600 sed -n '31p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond} ${execpi 600 sed -n '32p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 150}${color ffe595}HUM: $color${alignr}${execpi 600 sed -n '33p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
#${goto 150}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '37p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}°C
${goto 150}${color ffe595}PR: $color${alignr}${execpi 600 sed -n '34p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
#${goto 150}${color ffe595}VISIB: $color${alignr}${execpi 600 sed -n '38p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 150}${color ffe595}CLOUD COVER: $color${alignr}${execpi 600 sed -n '35p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 150}${color ffe595}UV INDEX: $color${alignr}${execpi 600 sed -n '36p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}
${goto 60}${color ffe595}DAYLIGHT (h): $color${alignr}${execpi 600 sed -n '39p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond} - ${execpi 600 sed -n '40p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond}${font}

#3 days weather
${font wwDigital:size=11}${goto 80}${color ffe595}${execpi 600 sed -n '5p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${goto 170}${execpi 600 sed -n '10p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${goto 260}${execpi 600 sed -n '15p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}$color${font}
${goto 70}${font conkyweather:size=45}${execi 600  sed -n '6p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}${goto 155}${voffset -40}${font conkyweather:size=45}${execi 600  sed -n '11p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}${goto 245}${voffset -50}${font conkyweather:size=45}${execi 600  sed -n '16p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}
${voffset -5}${font wwDigital:size=10}${goto 70}${execpi 600 sed -n '8p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C/${execpi 600 sed -n '9p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 158}${execpi 600 sed -n '13p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C/${execpi 600 sed -n '14p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 240}${execpi 600 sed -n '18p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C/${execpi 600 sed -n '19p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C

#system
${font wwDigital:size=12}${goto 120}${color ffe595}CPU 1:$color ${cpu cpu0}% ${alignr} ${color ffe595}CPU 2:$color ${cpu cpu1}%
${font wwDigital:size=12}${goto 120}${color ffe595}CPU Temperature:${alignr}$color ${hwmon temp 1}°C
${font wwDigital:size=12}${alignr -7}${color ffe595}RAM Usage:$color $mem/$memmax - $memperc%
${alignr}${membar 5, 240}
${alignr}${font wwDigital:size=12}${color ffe595}Libero: $color ${fs_free}  ${color ffe595}Totale: $color ${fs_size}
${alignr}${fs_bar 5, 240}

e infine lo script:
#!/bin/bash

#function: test_image_day
test_image_day () {
   case $1 in
        su)
          echo a
        ;;
        msu)
          echo b
        ;;
        psu)
          echo c
        ;;
        ic)
          echo c
        ;;
        h)
          echo c
        ;;
        mc)
          echo d
        ;;
        c)
          echo e
        ;;
        d)
          echo e
        ;;
        f)
          echo 0
        ;;
        s)
          echo h
        ;;
        mcs)
          echo g
        ;;
        psus)
          echo g
        ;;
        t)
          echo l
        ;;
        mct)
          echo k
        ;;
        psut)
          echo k
        ;;
        r)
          echo i
        ;;
        fl)
          echo p
        ;;
        mcfl)
          echo o
        ;;
        psfl)
          echo o
        ;;
        sn)
          echo r
        ;;
        mcsn)
          echo o
        ;;
        i)
          echo E
        ;;
        sl)
          echo u
        ;;
        fr)
          echo i
        ;;
        rsn)
          echo v
        ;;
        w)
          echo 6
        ;;
        ho)
          echo 5
        ;;
        co)
          echo E
        ;;
        cl)
          echo A
        ;;
        mcl)
          echo B
        ;;
        pc)
          echo C
        ;;
        pcs)
          echo G
        ;;
        pct)
          echo K
        ;;
       esac
}

#function: test_image_night
test_image_night () {
   case $1 in
su)
          echo a
        ;;
        msu)
          echo b
        ;;
        psu)
          echo c
        ;;
        c)
          echo f
        ;;
        d)
          echo f
        ;;
        f)
          echo f
        ;;
        s)
          echo h
        ;;
        psus)
          echo g
        ;;
        t)
          echo l
        ;;
        psut)
          echo k
        ;;
        r)
          echo i
        ;;
        fl)
          echo p
        ;;
        psfl)
          echo o
        ;;
        sn)
          echo r
        ;;
        i)
          echo E
        ;;
        sl)
          echo u
        ;;
        fr)
          echo i
        ;;
        rsn)
          echo v
        ;;
        ho)
          echo 5
        ;;
        co)
          echo E
        ;;
        cl)
          echo A
        ;;
        w)
          echo 6
        ;;
        mcl)
          echo B
        ;;
        pc)
          echo C
        ;;
        ic)
          echo B
        ;;
        h)
          echo B
        ;;
        mc)
          echo C
        ;;
        pcs)
          echo G
        ;;
        mcs)
          echo G
        ;;
        pct)
          echo K
        ;;
        mct)
          echo K
        ;;
        mcfl)
          echo O
        ;;
        mcsn)
          echo O
        ;;
       esac
}


#put your Accuweather address here
address="http://www.accuweather.com/en/dk/copenhagen/123094/weather-forecast/123094"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
addr2="$addr1"?day=6

kill -STOP $(pidof conky)
killall wget

wget --save-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw $curr_addr
wget --load-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw $addr1
wget --load-cookies /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/cookie -O /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw $addr2

#Current Conditions - curr_cond file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw ]]; then

   egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|var d = '\''|var s = '\''|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |am<\/span>|pm<\/span>' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' -e 's/RealFeel/\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/^.*"#">//g' -e 's/^.*<strong class="temp"//g' -e 's/^>//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/<\/a>.*$//g' -e 's/\/span> //g' -e 's/var d = //g' -e 's/var s = //g' -e 's/"temp">/\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/^.*"start">//g' -e 's/^.*"finish">//g' -e 's/<li>//g' -e 's/<strong>//g' -e 's/<<span.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/<\/span>//g' -e 's/<\/strong><\/li>//g' -e 's/ "><\/div>//g' -e 's/'\''//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/"><\/div>//g' -e 's/^.*; //g' -e 's/&#.*$//g' -e 's/ i-alarm.*$//g' -e 's/;//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/Humidity: //g' -e 's/Pressure: //g' -e 's/Cloud Cover: //g' -e 's/UV Index: //g' -e 's/Dew Point: //g' -e 's/Visibility: //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   sed -i -e 's/^.*detail-tab-panel //g' -e 's/">//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
   time=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
   if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
       sed -i 3a- /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
fi
   time=$(sed -n 26p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
image=$(sed -n 27p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
   if [[ $time == day ]]; then
   sed -i 27s/$image/$(test_image_day $image)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
elif [[ $time == night ]]; then
   sed -i 27s/$image/$(test_image_night $image)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond
fi

fi


#First 5days - first_days file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw ]]; then

   egrep -i '>Today<|<p>[a-z]|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   sed -i -e 's/<p>//g' -e 's/<\/p>//g' -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
sed -i -e 's/Today/TODAY/' -e 's/Mon/MON/' -e 's/Tue/TUE/' -e 's/Wed/WED/' -e 's/Thu/THU/' -e 's/Fri/FRI/' -e 's/Sat/SAT/' -e 's/Sun/SUN/' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   time=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond)
   if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
       sed -i 2a- /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
fi
L1=$(sed -n 1p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
   if [[ $L1 == TODAY ]]; then
       sed -i 1d /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
fi
   for (( i=6; i<=21; i+=5 ))
 do
     image_raw=$(sed -n "${i}"p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
     sed -i ${i}s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
 done
   image_raw=$(sed -n 25p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
sed -i 25s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days
   image_raw=$(sed -n 30p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days)
sed -i 30s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days

fi


#Last 5days - last_days file
if [[ -s /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw ]]; then

   egrep -i '>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days_raw > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
   sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
   sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
   sed -i -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
   sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
sed -i -e 's/Mon/MONDAY/' -e 's/Tue/TUESDAY/' -e 's/Wed/WEDNESDAY/' -e 's/Thu/THURSDAY/' -e 's/Fri/FRIDAY/' -e 's/Sat/SATURDAY/' -e 's/Sun/SUNDAY/' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
   for (( i=2; i<=22; i+=5 ))
 do
     image_raw=$(sed -n "${i}"p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days)
     sed -i ${i}s/$image_raw/$(test_image_day $image_raw)/ /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days
 done

fi

#messages file
sed -n 28p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/curr_cond | cut -c -20 > /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
sed -n 29p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
sed -n 34p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
for (( i=7; i<=22; i+=5 ))
 do
     sed -n ${i}p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
 done
for (( i=3; i<=23; i+=5 ))
 do
     sed -n ${i}p /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days | cut -c -20 >> /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages
 done

kill -CONT $(pidof conky)

"Ma guardate l'idrogeno tacere nel mare guardate l'ossigeno al suo fianco dormire soltanto una legge che io riesco a capire ha potuto sposarli senza farli scoppiare.." F. de Andrè


ch3m

Non mi stava tutto su un post  :boh:

se volete tutti e 5 i giorni basta che modifichiate il file .conkyrc la parte da cambiare è quella relativa a "3 days weather" con questo:

${font Arial:size=9}${goto 40}${color ffe595}${execpi 600 sed -n '5p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${goto 145}${execpi 600 sed -n '10p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${goto 270}${execpi 600 sed -n '15p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}$color${font}
${goto 30}${font conkyweather:size=50}${execi 600  sed -n '6p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '11p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '16p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}
${voffset -40}${font Arial:size=8}${goto 100}${execpi 600 sed -n '8p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 210}${execpi 600 sed -n '13p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 330}${execpi 600 sed -n '18p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C
${goto 100}${execpi 600 sed -n '9p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 210}${execpi 600 sed -n '14p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 330}${execpi 600 sed -n '19p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C

${execpi 600 sed -n '4p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '5p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '6p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}

${font Arial:size=9}${goto 40}${color ffe595}${execpi 600 sed -n '20p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${goto 145}${execpi 600 sed -n '1p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}${goto 270}${execpi 600 sed -n '6p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}$color${font}
${goto 30}${font conkyweather:size=50}${execi 600  sed -n '21p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}${font}${goto 140}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '2p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}${font}${goto 260}${voffset -50}${font conkyweather:size=50}${execi 600  sed -n '7p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}${font}
${voffset -40}${font Arial:size=8}${goto 100}${execpi 600 sed -n '23p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 210}${execpi 600 sed -n '4p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}°C${goto 330}${execpi 600 sed -n '9p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}°C
${font Arial:size=8}${goto 100}${execpi 600 sed -n '24p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/first_days}°C${goto 210}${execpi 600 sed -n '5p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}°C${goto 330}${execpi 600 sed -n '10p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/last_days}°C

${execpi 600 sed -n '7p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 135}${execpi 600 sed -n '8p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}${goto 255}${execpi 600 sed -n '9p' /home/desktop/Accuweather_Conky_Int_ConkyWeatherFont/messages}


Dovete un po settare i valori dato che non li ho modificati! Good Work!

PS: Mannaggia anche il Conky-addict oggi dovevo finire un report! :bonk:
"Ma guardate l'idrogeno tacere nel mare guardate l'ossigeno al suo fianco dormire soltanto una legge che io riesco a capire ha potuto sposarli senza farli scoppiare.." F. de Andrè


daniodo

Sta venendo carino! Personalmente cambierei i fonts che hai utilizzato, però sono gusti.
Il risultato è comunque gradevole  :clap:
La causa della maggior parte dei problemi di un computer si trova tra la tastiera e lo schienale della sedia.
Gnomint su Aspire TimelineX 4820TG-I5-Ati Mobility Radeon HD5470 512Mb / Mint10 Gnome 64 bit su Aspire 6930G-Core 2 Duo T9400-NVidia GeForce 9600M GT 512Mb

drugo

Alcune modifiche:



alignment top_right
gap_x 12
gap_y 35
background no
use_xft yes
xftfont Liberation Sans:size=9

#xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 220 5
maximum_width 250
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color green
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no

TEXT
${font wwDigital:size=30}${color orange}${time %H:%M}
${font :size=13}${color}${time %A}
${color orange}${font :size=12}${time %d %b. %Y}
${font :size=12}
${color orange}SYSTEM ${color white}${hr 1}

${color orange}Kernel: $alignr${color}$kernel
${color orange}Uptime: $alignr${color}$uptime
${color orange}Temp: ${alignr}${color}${acpitemp} C

${color orange}CPU1 ${alignr}${color}${cpu cpu1}%
${cpubar 4 cpu1}
${color orange}CPU2 ${alignr}${color}${cpu cpu2}%
${cpubar 4 cpu2}

${color orange}Ram ${alignr}${color}${mem} / $memmax ($memperc%)
${membar 4}
${color orange}Swap ${alignr}${color}${swap} / $swapmax ($swapperc%)
${swapbar 4}

${color orange}TOP CPU $alignr CPU% MEM%
${color orange}${top name 1}$alignr${color}${top cpu 1}     ${top mem 1}
${color orange}${top name 2}$alignr${color}${top cpu 2}     ${top mem 2}
${color orange}${top name 3}$alignr${color}${top cpu 3}     ${top mem 3}

${color orange}MAX CPU$alignr CPU% MEM%
${top_mem name 1}$alignr${color}${top_mem cpu 1}     ${top_mem mem 1}


${color orange}FILESYSTEM ${color}${hr 1}

${color orange}Root: ${alignr}${color}${fs_free /} / ${fs_size /}
${fs_bar 4 /}
${color orange}Home: ${alignr}${color}${fs_free /home} / ${fs_size /home}
${fs_bar 4 /home}


Sto diventando matto con i caratteri: non me li accetta, anche se cambio font rimane uguale  :bonk: :bonk:  :boh: poi dove c'è scritto "temp:  0 C" ho sicuramente sbagliato qualcosa perché non perso che sia esatta (la temperatura del processore)! ci sono altre temperature che sarebbe bene tenete sott'occhio? (tipo HDD) ecc... ecc...

Mi date una mano?
Grazie!

PS: Siccome "fidarsi è bene, non fidarsi è meglio", quando seguite una guida in internet, prendete la buona abitudine di fare copia e incolla prima in un editor di testo, controllando così che non ci siano codici strani, poi  nel terminale; vi eviterete spiacevoli sorprese!
PPS: Un'amicizia è sempre un'amicizia anche se virtuale!

daniodo

Per i caratteri devi installarli nell'apposita cartella .fonts all'interno della tua home. Poi con questo comando li installi definitivamente nel sistema

sudo fc-cache -f -v


Per quanto riguarda le temperature devi aver preventivamente installato il pacchetto lm-sensors.
Poi ti rimando a questo wiki in cui è dettagliato il tutto, vedi se può esserti utile http://wiki.ubuntu-it.org/AmministrazioneSistema/LmSensors
La causa della maggior parte dei problemi di un computer si trova tra la tastiera e lo schienale della sedia.
Gnomint su Aspire TimelineX 4820TG-I5-Ati Mobility Radeon HD5470 512Mb / Mint10 Gnome 64 bit su Aspire 6930G-Core 2 Duo T9400-NVidia GeForce 9600M GT 512Mb

ken

Ti rispondo intanto per quanto riguarda il font.
Per essere accettato deve essere un font inserito nella cartella .fonts oppure in /usr/share/fonts
( se il font non esiste scaricalo dalla rete aggiungilo in una delle cartelle menzionate e dai da terminale sudo fc-cache -fv
Ho visto anche che in alcune righe manca il font anche se è inserita la size.
Per quanto riguarda la temperatura la questione è più complicata in quanto per rilevare la temperatura acpi devi avere installato anche lm-sensors...non solo..... non tutti i pc supportano quel controllo....io ho risolto in maniera diversa ma sinceramente non ricordo come,  :boh:  devo fare un giro di ricerche.

Edit: preceduto da daniodo, scus....  :imba:

daniodo

@Ken: Beh, almeno non abbiamo detto boiate  ;D
La causa della maggior parte dei problemi di un computer si trova tra la tastiera e lo schienale della sedia.
Gnomint su Aspire TimelineX 4820TG-I5-Ati Mobility Radeon HD5470 512Mb / Mint10 Gnome 64 bit su Aspire 6930G-Core 2 Duo T9400-NVidia GeForce 9600M GT 512Mb

ken

Allora per quanto riguarda la temperatura della cpu ho risolto così
Temperatura Cpu:${execi 20  sensors | grep 'temp1' | cut -c14-21}°C
per rilevare la temperatura di un dual core invece
${execi 30 sensors | grep 'Core 0' | cut -c15-16}°C
${execi 30 sensors | grep 'Core 1' | cut -c15-16}°C

drugo

Grazie di nuovo ken e daniodo!

Ora mi prendo un po' di tempo da conky, sto impazzendo con i font (ancora non vanno e prova che ti riprova ho distrutto tutto il lavoro che avevo fatto  :palm:)

@ken: riguardo alle temperature, ho trovato anche questi:

MB ${alignr}${execi 300 sensors | grep temp1 | cut -c15-16 ;}°C
CPU1 ${alignr}${execi 300 sensors | grep Core\ 0 | cut -c15-16 ;}°C
CPU2 ${alignr}${execi 300 sensors | grep Core\ 1 | cut -c15-16 ;}°C
HD ${alignr}${execi 300 nc localhost 7634 | cut -c33-34 ;}°C


come vedi la prima è +o- come la tua :)

Quindi ora pausa per un po'!
PS: Siccome "fidarsi è bene, non fidarsi è meglio", quando seguite una guida in internet, prendete la buona abitudine di fare copia e incolla prima in un editor di testo, controllando così che non ci siano codici strani, poi  nel terminale; vi eviterete spiacevoli sorprese!
PPS: Un'amicizia è sempre un'amicizia anche se virtuale!

Powered by EzPortal