You are not logged in.

#2421 2019-05-24 15:55:17

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Long time no see my old friend, thanks for your kind words.


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

#2422 2019-05-24 20:07:48

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thank you guys smile The usual things on my side, works & family life tasks as usual. Mostly okay.

Awesome for keeping the spirit and conky legacy alive on the forum. I wish you all the best.

Nili


Tumbleweed (Server) | KDE Plasma (Wayland)

Offline

#2423 2019-06-12 09:00:38

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

chepioq wrote:

https://image.noelshack.com/minis/2019/14/2/1554220905-conky-meteo.png

Following my post #2339 I find a way to align vertical position with a script lua.

The conky:

conky.config = {
background = false,
use_xft = true,
font = 'DejaVuSansMono:size=8',
update_interval = 300.0,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 390,
minimum_height = 900,
gap_x = 130,
gap_y = 30,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 6144,
imlib_cache_size = 8192, 

default_outline_color = '000000',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '005fff',
color4 = 'ff4500',
lua_load = '/home/dominique/conky-meteo-dark_sky/date_position.lua', 
lua_draw_hook_pre = 'date_position',

}

conky.text = [[
${color2}${goto 90}${font DejaVuSansMono:bold:size=10}Prévisions semaine${font}
${image ~/conky-meteo-dark_sky/d1.png -p -1,35 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p -1,105 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p -1,175 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p -1,245 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p -1,315 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p -1,385 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p -1,455 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p -1,525 -s 53x32}
]]

And the script date_position.lua:

--[[Conky et lua pour afficher les heures de lever, coucher et zénith du soleil.
]]

require 'cairo'
require 'imlib2'


function conky_date_position()
    if conky_window == nil then return end

    local text_color={13,206,232}
    
     local text_d= conky_parse("${exec date '+%A %d %B'}")
     local text_d1= conky_parse("${exec date '+%A %d %B' --date '1 days'}")
     local text_d2= conky_parse("${exec date '+%A %d %B' --date '2 days'}")
     local text_d3= conky_parse("${exec date '+%A %d %B' --date '3 days'}")
     local text_d4= conky_parse("${exec date '+%A %d %B' --date '4 days'}")
     local text_d5= conky_parse("${exec date '+%A %d %B' --date '5 days'}")
     local text_d6= conky_parse("${exec date '+%A %d %B' --date '6 days'}")
     local text_d7= conky_parse("${exec date '+%A %d %B' --date '7 days'}")
     
     local text_p0= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p01= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p1= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p11= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p2= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p21= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p3= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p31= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p4= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p41= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p5= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p51= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p6= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p61= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p7= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p71= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     
     local text_th0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")   
     local text_th6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     
     local text_tm0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     
--Police à utiliser
     local font= "DejaVuSansMono-Bold"
     local font_size= 14

    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)

    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)


    cairo_move_to (cr, 100.0, 60.0)
    cairo_show_text (cr, text_d)

    cairo_move_to (cr, 100.0, 130.0)
    cairo_show_text (cr, text_d1)

    cairo_move_to (cr, 100.0, 200.0)
    cairo_show_text (cr, text_d2)

    cairo_move_to (cr, 100.0, 270.0)
    cairo_show_text (cr, text_d3)

    cairo_move_to (cr, 100.0, 340.0)
    cairo_show_text (cr, text_d4)

    cairo_move_to (cr, 100.0, 410.0)
    cairo_show_text (cr, text_d5)
    
    cairo_move_to (cr, 100.0, 480.0)
    cairo_show_text (cr, text_d6)   
    
    cairo_move_to (cr, 100.0, 550.0)
    cairo_show_text (cr, text_d7)
    
    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 font1= "DejaVuSansMono"
     local font1_size= 11
     
    local text_color={233,149,3}
    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)


    cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font1_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
    
    cairo_move_to (cr, 20.0, 80.0)
    cairo_show_text (cr, text_p0)
    cairo_move_to (cr, 20.0, 90.0)
    cairo_show_text (cr, text_p01)
    
    cairo_move_to (cr, 20.0, 150.0)
    cairo_show_text (cr, text_p1)
    cairo_move_to (cr, 20.0, 160.0)
    cairo_show_text (cr, text_p11)
    
    cairo_move_to (cr, 20.0, 220.0)
    cairo_show_text (cr, text_p2)
    cairo_move_to (cr, 20.0, 230.0)
    cairo_show_text (cr, text_p21)
    
    cairo_move_to (cr, 20.0, 290.0)
    cairo_show_text (cr, text_p3)
    cairo_move_to (cr, 20.0, 300.0)
    cairo_show_text (cr, text_p31)
    
    cairo_move_to (cr, 20.0, 360.0)
    cairo_show_text (cr, text_p4) 
        cairo_move_to (cr, 20.0, 370.0)
    cairo_show_text (cr, text_p41)

    cairo_move_to (cr, 20.0, 430.0)
    cairo_show_text (cr, text_p5)
    cairo_move_to (cr, 20.0, 440.0)
    cairo_show_text (cr, text_p51)
    
    cairo_move_to (cr, 20.0, 500.0)
    cairo_show_text (cr, text_p6)
    cairo_move_to (cr, 20.0, 510.0)
    cairo_show_text (cr, text_p61)
    
    cairo_move_to (cr, 20.0, 570.0)
    cairo_show_text (cr, text_p7)
    cairo_move_to (cr, 20.0, 580.0)
    cairo_show_text (cr, text_p71)
    
    
    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 font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={200,6,19}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 40.0, 110.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 110.0)
    cairo_show_text (cr, text_th0)
    
    cairo_move_to (cr, 40.0, 180.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 180.0)
    cairo_show_text (cr, text_th1)
    
    cairo_move_to (cr, 40.0, 250.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 250.0)
    cairo_show_text (cr, text_th2)
    
    cairo_move_to (cr, 40.0, 320.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 320.0)
    cairo_show_text (cr, text_th3)
    
    cairo_move_to (cr, 40.0, 390.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 390.0)
    cairo_show_text (cr, text_th4)    
    
    cairo_move_to (cr, 40.0, 460.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 460.0)
    cairo_show_text (cr, text_th5)
    
    cairo_move_to (cr, 40.0, 530.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 530.0)
    cairo_show_text (cr, text_th6)    
    
    cairo_move_to (cr, 40.0, 600.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 600.0)
    cairo_show_text (cr, text_th7)    
    
    
    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 font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={11,191,200}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 160.0, 110.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 110.0)
    cairo_show_text (cr, text_tm0)
    
    cairo_move_to (cr, 140.0, 180.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 210.0, 180.0)
    cairo_show_text (cr, text_tm1)
    
    cairo_move_to (cr, 160.0, 250.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 250.0)
    cairo_show_text (cr, text_tm2)
    
    cairo_move_to (cr, 160.0, 320.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 320.0)
    cairo_show_text (cr, text_tm3)
    
    cairo_move_to (cr, 160.0, 390.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 390.0)
    cairo_show_text (cr, text_tm4)    
    
    cairo_move_to (cr, 160.0, 460.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 460.0)
    cairo_show_text (cr, text_tm5)
    
    cairo_move_to (cr, 160.0, 530.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 530.0)
    cairo_show_text (cr, text_tm6)    
    
    cairo_move_to (cr, 160.0, 600.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 600.0)
    cairo_show_text (cr, text_tm7)    
    
    cairo_destroy(cr)
end

Hello Chepioq
Thank you for your work.
Does this conky update with the meteo script?
the display is correct but I'm not sure it updates every 300s

merci pour ton travail
est-que ce conky se met à jour avec le script meteo?
l'affichage est correct mais je ne suis pas sur qu'il fasse des mises à jour toutes les 300s

Offline

#2424 2019-06-12 16:50:58

chepioq
Member
Registered: 2015-11-29
Posts: 69

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

No it update with another conky (conky-meteo) witch use same data.

Offline

#2425 2019-06-13 12:08:04

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

ok... well I'm not sure if I've understood how it works..
I got that (but the datas are not correct):
3b1:

#!/bin/bash

wget -O $HOME/conky-meteo-dark_sky/weather.json https://api.darksky.net/forecast/--my-id-number--/'47.250549','8.623953'?'lang=fr&units=si'


Dark_Sky_icons () {
    case $1 in
         clear-day)
            echo 1
        ;;
         clear-night)
            echo 2
        ;;
         cloudy)
            echo 3
        ;;
         fog)
            echo 4
        ;;
         partly-cloudy-day)
            echo 5
        ;;
         partly-cloudy-night)
            echo 6
        ;;
         rain)
            echo 7
        ;;
         sleet)
            echo 8
        ;;
         snow)
            echo 9
        ;;
         wind)
            echo 10
        ;;
        esac
}

rm $HOME/conky-meteo-dark_sky/*.png
#Forecast feature: Forecast
jq --raw-output '.currently[]' $HOME/conky-meteo-dark_sky/weather.json > Conditions

cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(sed -n 3p $HOME/conky-meteo-dark_sky/Conditions)).png $HOME/conky-meteo-dark_sky/Now.png

jq --raw-output '.daily.data[].icon' $HOME/conky-meteo-dark_sky/weather.json > daily-icons

cat $HOME/conky-meteo-dark_sky/weather.json | jq '.daily.data' | sed 's/[",:,},{]//g' | awk '{$1=""}1' | sed 's/^[ \t]*//' |  sed '/./!d' > Forecasts

for (( i=1; i<=8; i+=1 ))
    do
        cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(sed -n ${i}p $HOME/conky-meteo-dark_sky/daily-icons)).png $HOME/conky-meteo-dark_sky/d$(( i )).png
   done

#Hourly feature, commented out by default, uncomment if you wish so

#for (( j=1; j<=24; j+=1 ))
#    do
#        cp $HOME/conky-meteo-dark_sky/Dark_Sky_icons/$(Dark_Sky_icons $(sed -n ${j}p $HOME/conky-meteo-dark_sky/hourly-icons)).png $HOME/conky-meteo-dark_sky/h$(( j )).png
#   done

    # icone direction vent 
wind_direction=$(cat $HOME/conky-meteo-dark_sky/weather.json | jq --raw-output '.currently.windBearing')
if [[ $wind_direction > 0 ]] && [[ $wind_direction < 12 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"01.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 34 ]] && [[ $wind_direction < 56 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"03.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 56 ]] && [[ $wind_direction < 78 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"04.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 78 ]] && [[ $wind_direction < 101 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"05.png" $HOME/conky-meteo-dark_sky/Wind.png 
elif [[ $wind_direction > 101 ]] && [[ $wind_direction < 124 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"06.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 124 ]] && [[ $wind_direction < 146 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"07.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 146 ]] && [[ $wind_direction < 169 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"08.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 169 ]] && [[ $wind_direction < 192 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"09.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 192 ]] && [[ $wind_direction < 214 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"10.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 214 ]] && [[ $wind_direction < 236 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"11.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 236 ]] && [[ $wind_direction < 259 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"12.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 259 ]] && [[ $wind_direction < 281 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"13.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 281 ]] && [[ $wind_direction < 304 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"14.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 304 ]] && [[ $wind_direction < 326 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"15.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 326 ]] && [[ $wind_direction < 349 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"16.png" $HOME/conky-meteo-dark_sky/Wind.png
elif [[ $wind_direction > 349 ]] && [[ $wind_direction < 360 ]]; then
    cp $HOME/conky-meteo-dark_sky/vent/"01.png" $HOME/conky-meteo-dark_sky/Wind.png

fi

conky-meteo-V2:

conky.config = {
background = false,
use_xft = true,
font = 'DejaVuSansMono:size=8',
update_interval = 300.0,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
--own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 390,
minimum_height = 900,
gap_x = 40,
gap_y = 40,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 6144,
imlib_cache_size = 8192, 

default_outline_color = '000000',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '005fff',
color4 = 'ff4500',
lua_load = '/home/raphix/conky-meteo-dark_sky/date_position.lua', 
lua_draw_hook_pre = 'date_position',

}

conky.text = [[
${execi 300 bash /home/raphix/conky-meteo-dark_sky/3b1}\
${color2}${goto 90}${font DejaVuSansMono:bold:size=10}Prévisions semaine${font}
${image ~/conky-meteo-dark_sky/d1.png -p -1,35 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p -1,105 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p -1,175 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p -1,245 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p -1,315 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p -1,385 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p -1,455 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p -1,525 -s 53x32}
]]

Offline

#2426 2019-06-14 04:42:51

chepioq
Member
Registered: 2015-11-29
Posts: 69

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Try to add

    os.execute ('/home/raphix/conky-meteo-dark_sky/3b1')

in the file date_position.lua:

require 'cairo'
require 'imlib2'

    os.execute ('/home/raphix/conky-meteo-dark_sky/3b1')

function conky_date_position()
    if conky_window == nil then return end

............................................

and remove "${execi 300 bash /home/raphix/conky-meteo-dark_sky/3b1}\" in your conky-meteo-V2

Offline

#2427 2019-06-14 08:20:57

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thanks for your help chepioq but I still have the same uncorect datas appearing...

Offline

#2428 2019-06-18 04:45:40

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Hi friends,

the page moongiant.com has a bug. Do you have that too?

Verbindungsaufbau zu www.moongiant.com (www.moongiant.com)|23.0.40.247|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 302 Moved Temporarily
Platz: https://www.moongiant.com/phase/today[folge]
--2019-06-18 06:30:25--  https://www.moongiant.com/phase/today
Verbindungsaufbau zu www.moongiant.com (www.moongiant.com)|23.0.40.247|:443... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 500 Internal Server Error
2019-06-18 06:30:25 FEHLER 500: Internal Server Error.

Offline

#2429 2019-06-18 04:54:03

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

^ No, it's all good here.
Just a temporary glitch I guess.

Offline

#2430 2019-06-18 20:37:32

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Open the script (moon_MoonGiant) and replace line #48

wget -O $HOME/4_Moon/raw "http://www.moongiant.com/phase/today"

with

wget -O $HOME/4_Moon/raw "http://www.moongiant.com/phase/today/"

ie. add a slash at the end of today.

The former url doesn't seem to work anymore whereas the slashed one seems to be ok; I'll watch it for a while (couple of days) and then I'll update 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

#2431 2019-06-19 07:48:01

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thank you, Teo, I'll try it out.   smile

Offline

#2432 2019-06-19 07:54:51

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

...and today both urls work OK; go figure  roll


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

#2433 2019-06-19 08:04:02

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

and I have now inserted the / and the data is there, the raw file is filled.

TeoBigusGeekus wrote:

...and today both urls work OK; go figure  roll

Teo, Got'es ways are unfathomable....  not with me now.   hmm

only with /
retested

Last edited by unklar (2019-06-19 08:07:27)

Offline

#2434 2019-06-23 09:33:01

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

smilies%20(204).gif

i learn to use scroll in conky

here the scroll part in my weather conky , work great

${voffset -20}${font Liberation Sans:size=7}
${goto  270}${scroll 30 ${execi 90 sed -n '5p' $HOME/1_accuweather/first_days}}\
${goto  420}${scroll 30 ${execi 90 sed -n '10p' $HOME/1_accuweather/first_days}}\
${goto  570}${scroll 30 ${execi 90 sed -n '15p' $HOME/1_accuweather/first_days}}\
${goto  730}${scroll 30 ${execi 90 sed -n '20p' $HOME/1_accuweather/first_days}}\
${goto  870}${scroll 30 ${execi 90 sed -n '25p' $HOME/1_accuweather/first_days}}\
${goto 1020}${scroll 30 ${execi 90 sed -n '5p'  $HOME/1_accuweather/last_days}}\
${goto 1170}${scroll 30 ${execi 90 sed -n '10p' $HOME/1_accuweather/last_days}}

but i have a little problem

my weather icons disappear for a few seconds then reappear .

is there anything to put in the config part ?

tanks


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2435 2019-06-24 16:36:59

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sorry for the delay loutch, can you post your entire conkyrc file please?


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

#2436 2019-06-24 18:30:47

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Hello

no problem real life is more important that any conky's


here conkyrc


conky.config = {
-- ------------------------- Windows Settings
	own_window = true,
	own_window_type = 'normal',
	own_window_transparent = false,
	own_window_hints = 'undecorated,sticky,below,skip_taskbar,skip_pager',
	own_window_argb_visual = true,
	own_window_argb_value = 0,

	double_buffer = true,
	background = true,

-- ------------------------- Position
	alignment = 'top_left',

	minimum_width = 295,
	minimum_height = 165,
	maximum_width = 1300,
	gap_x = 626,
	gap_y = 870,

-- ------------------------- Font
	use_xft = true,
	xftalpha = 0.8,
	override_utf8_locale = true,

	draw_shades = true,
	default_shade_color = 'black',

	draw_borders = false,
	draw_outline = false,

	font = 'Monofur:bold:size=8',

-- ------------------------ Colors
	default_color = 'DCDCDC',
	color0 = '87CF3E',
	color1 = 'DDDDDD',
	color2 = 'AAAAAA',
	color3 = '888888',
        color7 = '#6495ee',
        color9 = 'red',

-- ------------------------- Other #${execi 3600 bash $HOME/1_accuweather/alertes.sh}
	update_interval = 1,

--	template0 = [[${GOTO 50}${color\1}${top_mem name \2}${alignr}${top_mem mem \2}%]],${template0 0 1} ${template0 1 2}

	--top_name_verbose = false,
	no_buffers = true,
lua_load = '~/.conky/lua/image.lua',

};

conky.text = [[
${execi 1800 bash $HOME/1_accuweather/1_accuweather -f2015}${execi 3500 bash $HOME/2_Wunderground_API/2_wun}
${voffset 1}${goto 16}${font GE Inspira:size=14:}Sarreguemines : ${font} ${execi 90 sed -n '4p' $HOME/1_accuweather/curr_cond} 
${goto 16}Temp.: ${execi 90 sed -n '2p' $HOME/1_accuweather/curr_cond} °C   Res.: ${execi 90 sed -n '3p' $HOME/1_accuweather/curr_cond} °C 
${voffset -16}
${goto 200}${font GE Inspira:size=8}Vent : ${execi 90 sed -n '5p' $HOME/1_accuweather/curr_cond} 
${goto 200}Vitesse : ${execi 90 sed -n '6p' $HOME/1_accuweather/curr_cond}
${goto 200}Préssion : ${execi 90 sed -n '8p' $HOME/1_accuweather/curr_cond}
${goto 200}Indice UV : ${execi 90 sed -n '9p' $HOME/1_accuweather/curr_cond} $font
${goto 16}Phase : ${execi 600  sed -n '6p' $HOME/2_Wunderground_API/Moon_Sun}

${goto 16}${execi 600  sed -n '2p' $HOME/2_Wunderground_API/Alertes}
${goto 16}${execi 602  sed -n '1p' $HOME/2_Wunderground_API/Alertes | cut -c1-70}
${goto 16}${execi 602  sed -n '1p' $HOME/2_Wunderground_API/Alertes | cut -c71-120}
    ${voffset -140}
${goto  300}${color7}${if_match "${execi 90 sed -n '4p' $HOME/1_accuweather/first_days}" == "Min."}${else}${execi 90 sed -n '4p' $HOME/1_accuweather/first_days}°${endif}${color}/${color9}${execi 90 sed -n '3p' $HOME/1_accuweather/first_days}°\
${goto  450}${color7}${execi 90 sed -n '9p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '8p' $HOME/1_accuweather/first_days}°${color}\
${goto  600}${color7}${execi 90 sed -n '14p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '13p' $HOME/1_accuweather/first_days}°${color}\
${goto  750}${color7}${execi 90 sed -n '19p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '18p' $HOME/1_accuweather/first_days}°${color}\
${goto  900}${color7}${execi 90 sed -n '24p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '23p' $HOME/1_accuweather/first_days}°${color}\
${goto 1050}${color7}${execi 90 sed -n '4p' $HOME/1_accuweather/last_days}°${color}/${color9}${execi 90 sed -n '3p' $HOME/1_accuweather/last_days}°${color}\
${goto 1200}${color7}${execi 90 sed -n '9p' $HOME/1_accuweather/last_days}°${color}/${color9}${execi 90 sed -n '8p' $HOME/1_accuweather/last_days}°${color}

${voffset 30}
${goto  300}${execi 90 sed -n '1p' $HOME/1_accuweather/first_days}\
${goto  450}${execi 3600 echo `date --date="1 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="1 day" | awk '{print $2}'`}\
${goto  600}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $2}'`}\
${goto  750}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $2}'`}\
${goto  900}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $2}'`}\
${goto 1050}${execi 3600 echo `date --date="5 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="5 day" | awk '{print $2}'`}\
${goto 1200}${execi 3600 echo `date --date="6 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="6 day" | awk '{print $2}'`}

${voffset -20}${font Liberation Sans:size=7}
${goto  270}${scroll 30 ${execi 90 sed -n '5p' $HOME/1_accuweather/first_days}}\
${goto  420}${scroll 30 ${execi 90 sed -n '10p' $HOME/1_accuweather/first_days}}\
${goto  570}${scroll 30 ${execi 90 sed -n '15p' $HOME/1_accuweather/first_days}}\
${goto  730}${scroll 30 ${execi 90 sed -n '20p' $HOME/1_accuweather/first_days}}\
${goto  870}${scroll 30 ${execi 90 sed -n '25p' $HOME/1_accuweather/first_days}}\
${goto 1020}${scroll 30 ${execi 90 sed -n '5p'  $HOME/1_accuweather/last_days}}\
${goto 1170}${scroll 30 ${execi 90 sed -n '10p' $HOME/1_accuweather/last_days}}

${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_0.png 0 50 100 60}
${lua fDrawImage $HOME/1_accuweather/Wind1.png 150 50 45 45}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_1.png  280 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_2.png  430 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_3.png  580 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_4.png  730 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_5.png  880 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_6.png 1030 65 70 40}
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_7.png 1180 65 70 40}
${lua fDrawImage $HOME/2_Wunderground_API/Moon_phase.png 100 50 50 50}

${voffset -500}
]];

@+

Last edited by loutch (2019-06-24 18:31:40)


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2437 2019-06-24 20:51:55

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Sorry but why do you use lua to get the forecast images on your conky?
I can't test your configuration cause I don't use lua, but you could get the same result by just using the image conky command.


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

#2438 2019-06-25 06:47:17

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

I could understand the flashing of the pictures here on archlinux.
In my opinion you made the window of Conky too small.
Instead

	minimum_width = 295,
	minimum_height = 165,
	maximum_width = 1300,


you should use.

	minimum_width = 1300, minimum_height = 165,
	maximum_width = 1300,

Then it will not blink here.   smile

Offline

#2439 2019-06-25 08:07:50

loutch
Member
Registered: 2015-12-12
Posts: 848

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

smilies%20(204).gif

Oopss unklar do hast es super work great

@ Théo

I use the lua script for image because it looks better

here whitout lua

1561449959.png

with lua

1561450042.png


Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX

Offline

#2440 2019-06-25 09:38:09

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Dear God, are these the same images?
They do look awful without lua...
I've never witnessed that in my configuration, why is it happening?


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

Board footer

Powered by FluxBB