You are not logged in.

#1526 2017-03-29 06:50:50

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,147

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

Thanks for your kind words buddy!


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

#1527 2017-03-29 07:38:18

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,147

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

Candidate for 12.png (showers):
1LDVnMkt.png

Candidates for 11.png (fog):
mczSQECt.png
or
j7iELR7t.png

EDIT: I'm a moron, see here.

Last edited by TeoBigusGeekus (2017-04-03 21:17:51)


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

#1528 2017-03-29 09:00:07

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 545

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

Converted Teo's horizontal 5-day forecast to Conky 1.9 for those of you who haven't updated (like me) yet.

# Weekly forecast in horizontal format by TeoBigusGeekus
background no
use_xft yes
xftfont Ubuntu:size=9
xftalpha 0.8
update_interval 1
total_run_times 0
own_window yes
#own_window_type override # If enabled a box will appear around the conky. Useful for setting alignment of objects. Disable after testing is complete.
own_window_transparent yes
own_window_hints undecorates,skip_taskbar,skip_pager,below,sticky
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
stippled_borders 0
border_inner_margin 0
border_outer_margin 0
default_color 000000

minimum_size 600 500
maximum_width 600
gap_x 25
gap_y 25
alignment top_left
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
short_units yes
text_buffer_size 2048
use_spacer none
override_utf8_locale yes

# Text settings #
use_xft yes
xftalpha 0
xftfont TheNautiGal:bold:size=10
override_utf8_locale yes

# Color scheme #
default_color white
color1 white
color2 E8E1E6
color3 F5F24C

own_window_argb_visual no
own_window_argb_value 175
# own_window_colour 000000
# stuff after 'TEXT' will be formatted on screen



TEXT
${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}${goto 145}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}${goto 270}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}${goto 395}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}${goto 520}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}$color$font${image $HOME/1_accuweather/forecast_2015/forecast_1.png -p 0,35 -s 90x54}${image $HOME/1_accuweather/forecast_2015/forecast_2.png -p 110,35 -s 90x54}${image $HOME/1_accuweather/forecast_2015/forecast_3.png -p 230,35 -s 90x54}${image $HOME/1_accuweather/forecast_2015/forecast_4.png -p 350,35 -s 90x54}${image $HOME/1_accuweather/forecast_2015/forecast_5.png -p 470,35 -s 90x54}

${goto 100}${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°${goto 210}${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°${goto 330}${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°${goto 450}${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°${goto 570}${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°
${goto 100}/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°${goto 210}/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°${goto 330}/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°${goto 450}/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°${goto 570}/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°

${font Arial:size=8}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 375}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 495}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c1-20}
${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 375}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 495}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c21-40}$font

Enjoy


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#1529 2017-04-03 21:15:40

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,147

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

TeoBigusGeekus wrote:

On an unrelated note, using the 2015 images for the first time since October, I've just noticed something that I completely missed back then.
I thought that the new, 2016, images are the same with the 2015 ones, but it seems that there are two new images, 11 and 12.png, that didn't exist before and were introduced with the new ones.
http://i.imgur.com/Qkemf49t.png

Graphic design contest:
What should their 2015 equivalents be? 
Any ideas out there?
I'll leave it out for a few days for a possible discussion and/or proposals...

Sorry, false alarm, there are in fact icons for the 11 and 12.pngs in the Forecast_2015 folder.
Just a common brain fart...


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

#1530 2017-04-06 00:00:47

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

Aaaaaa yes ... we all have them ...  big_smile {spraying air freshener .... ya never know}

NOTE:  Conky v1.9 code
And on a different front: Temetka's 80s Sunsent - Sector11 Style.
Thank you Temetka!
2017-04-05_202933_Scrot11.th.png
One needs to have 1) Accuweather - 1_21-10-16  and 4) Moon phases' script - 4_23-10-16 installed and running for this script to work.  Or add the bash lines that runs those scripts to the code.
Also the 80s sunset image I posted here.

# pkill -xf "conky -c /media/5/conky/Temetka/Temetka_80s_s11.conky" &

# Inspired by: Temetka https://forums.bunsenlabs.org/viewtopic.php?pid=47838#p47838

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager  #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Temetka's 80's Sunsent
## ARGB can be used for real transparencyown_window_hints
#own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 80

minimum_size 300 0  ### width | height
maximum_width 300

gap_x 15    # l|r
gap_y 15    # u|d

alignment tl
## ---------- End Window Settings
## ---------- Font Settings
use_xft yes
#xftfont Liberation Mono:bold:size=11
#xftfont Fantasque Sans Mono:bold:size=12
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10
xftfont Fira Mono:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
#########################  End Font Settings  ###
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
###  Borders Section  ###########################
draw_borders no
# Stippled borders?
stippled_borders 5
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 2
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#######################  End Borders Section  ###
###  Miscellaneous Section  #####################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
# text_buffer_size 6144

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
# pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

update_interval 1
#################  End Miscellaneous Section  ###

TEXT
${image /home/sector11/images/80s_Sunset.png -p 66,0 -s 160x160}\
${font Kenyan Coffee:size=45}${color3}${alignc}${time %H:%M}${color}${font}
${font Shimes One PERSONAL USE:size=80}${color6}${alignc}${time %A}${font}
${font Kenyan Coffee:size=25}${color3}${alignc}${time %d %b %y}${color}${font}
${color3}Booted @${color} ${exec who -b | cut -c23-}${alignr}${color3}Up:${color} ${exec w | awk '/ up /{gsub(/,$/,"",$3);print $3}'}
${color1}${swapbar 0}${color}
${color5}${alignc}TEMPS
${goto 20}${color3}CPU${color} ${platform f71882fg.2560 temp 2}°\
${goto 93}${color3}M|B${color} ${execpi 5 sensors k10temp-pci-00c3 | grep 'temp1' | awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°\
${goto 165}${color3}SDA${color} ${hddtemp /dev/sda}°\
${goto 240}${color3}GPU${color} ${nvidia temp}°
${color1}${swapbar 0}${color}
${alignc}${color5}AMD Athlon II X3 450 ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}${color}${endif}${endif}%
${alignc}${color3}CPU     ${color0}%${color}     MHz
${goto 96}${color3}1${color0}     \
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${alignr 75}${color}${freq 1}
${goto 96}${color3}2${color0}     \
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${alignr 75}${color}${freq 2}
${goto 96}${color3}3${color0}     \
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${alignr 75}${color}${freq 3}
${alignc}${color5}CPU Fan${color} ${platform f71882fg.2560 fan 1} ${color3}RPM
${color1}${swapbar 0}${color}
${alignc}${color3}Memory${color}  Using:${color3} ${mem} of ${memmax}
${color1}${swapbar 0}${color}
 S.T.${goto 118}Currently:${alignr}Temp\

${image $HOME/1_accuweather/forecast_2016/forecast_0.png -p 23,435 -s 250x252}\
${font Fira Mono:size=30}±${execi 300 sed -n '3p' ~/1_accuweather/curr_cond}\
${alignr}${execi 300 sed -n '2p' ~/1_accuweather/curr_cond}${font}


 UVI: ${execi 300 sed -n '9p' ~/1_accuweather/curr_cond}/11\
 ${alignr}${execi 300 sed -n '8p' ~/1_accuweather/curr_cond}:Bar


Wind: ${execi 300 sed -n '5p' ~/1_accuweather/curr_cond} ${execi 300 sed -n '6p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '7p' ~/1_accuweather/curr_cond} :Hum


 Cld: ${execi 300 sed -n '10p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '13p' ~/1_accuweather/curr_cond} :Vis


${image /media/5/Conky/4_Moon/0.png -p 100,725}
${alignc}${swapbar 0,50} Current Moon & Forecast ${swapbar 0,50}
${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_1.png -p 10,720 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_2.png -p 240,720 -s 45x45}\
${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"} \
${else}${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}${endif}\
${alignr 55}${execi 300 sed -n '8p' ~/1_accuweather/first_days}

${goto 60}${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}\
${alignrhttps://forums.bunsenlabs.org/edit.php?id=48496#}${execi 300 sed -n '9p' ~/1_accuweather/first_days}
${color5}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_3.png -p 10,785 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_4.png -p 240,785 -s 45x45}\
${execi 300 sed -n '13p' ~/1_accuweather/first_days}\
${alignr 55}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

${goto 60}${execi 300 sed -n '14p' ~/1_accuweather/first_days}\
${alignr}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

NOTE:  Conky v1.9 code


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1531 2017-04-06 04:42:12

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

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

Hello my friend.
I made a little conky for moon.
It show moon age, monset and moon rise and the name phase.

For the data I use data from my conky meteo :  https://forums.bunsenlabs.org/viewtopic … 598#p43598 post 1478.
xXx1.jpg

The conky-lune

conky.config = {
background = false,
use_xft = true,
font = 'URW Chancery L:size=12:bold',
update_interval = 3600.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 = 'bottom_middle',
minimum_width = 250,
minimum_height = 200,
gap_x = 280,
gap_y = 20,
no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 1024,
color1 = '323200',
color2 = 'ffff7f',
lua_load = '/home/dominique/.conkyrc/conky-1.10/conky-lune/draw_image.lua',
lua_draw_hook_pre = 'main'
}

conky.text = [[
${voffset 50}

${color2}${voffset 25}${goto 30}Lever ${goto 174}Coucher
${color2}${alignc}${voffset -50}${exec sed -n '6p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}
${color2}${voffset -75}${color2}${goto 95}Age Lune
${voffset 80}${goto 30}${exec sed -n '26p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}:${exec sed -n '28p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}
${voffset -20}${goto 180}${exec sed -n '31p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}:${exec sed -n '33p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}
${color2}${voffset -100}${goto 120}${exec sed -n '4p' $HOME/.conkyrc/conky-1.10/conky-meteo/conky-aubagne-2/Moon_Sun}
]]

The script get_image.sh

#!/bin/bash

cd /home/dominique/.conkyrc/conky-1.10/conky-lune
wget http://static.die.net/moon/576.jpg -O 576.jpg --user-agent="Mozilla/5.0"
convert 576.jpg \( +clone -fx 'p{0,0}' \)           -compose Difference  -composite            -modulate 100,0  +matte  difference.png
convert difference.png  -threshold 1%  threshold_mask.png
convert 576.jpg  threshold_mask.png           +matte -compose CopyOpacity -composite           576.png
convert -resize 80x80 576.png 576-2.png
convert 576-2.png -define png:color-type=6 576-1.png
convert 576-1.png -fill CadetBlue2 -tint 110 lune1.png
convert 576-1.png -fill orange2 -tint 110 lune2.png
composite -gravity center Garlab.png lune1.png lune1-1.png
composite -gravity center Garlab-h.png lune2.png lune2-1.png

draw_image.lua

--[[ SQUARE_TO_ROUND WIDGET inspired by Wlourf (07 April 2010, version 1.0.1)
http://u-scripts.blogspot.com/

This widget display a rounded image on your conky from a square image only.

Parameters are
filename        --nom de l'image carrée en entrée
xc,yc           --coordonnées du centre de l'image ronde par rapport au coin en haut à gauche de la fenêtre conky
radius           --rayon du cercle final
radius_crop       --dans l'image carrée, pourcentage du cercle à extraire par rapport au côté du carré(1-100)

]]

require 'cairo'
require 'imlib2'

os.execute ('/home/dominique/.conkyrc/conky-1.10/conky-lune/get_image.sh')

function crop_square_to_round(filename,xc,yc,radius)
    local surface = cairo_image_surface_create_from_png(filename)
    local img_w = cairo_image_surface_get_width (surface);
    
    local cw,ch = conky_window.width, conky_window.height
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
    local cr=cairo_create(cs)
    cairo_translate(cr,xc-img_w/2,yc-img_w/2)
    cairo_scale(cr, 0.9, 0.9)    
    cairo_arc (cr, img_w/2,img_w/2, radius, 0, 2*math.pi)
    cairo_clip (cr)
    cairo_new_path (cr)    
    cairo_set_source_surface (cr, surface, 0, 0)

    cairo_paint (cr)
    cairo_destroy(cr)
    cairo_surface_destroy (cs)
    cairo_surface_destroy (surface)
    
end

function display_round(filename,xc,yc,radius,radius_crop)
    if conky_window == nil then return end

    --if tonumber(conky_parse('${updates}')) <2  then return end
    local filepng = filename
    
    crop_square_to_round(filepng,xc,yc,radius)
    io.close()
end


--[[END OF SQUARE TO ROUND WIDGET]]

function conky_main(filename)
    if conky_window == nil then return end
    display_round('/home/dominique/.conkyrc/conky-1.10/conky-lune/576-1.png',
                128,60,50,  --xc,yc,radius
                100          --radius_crop (1-100)
    )
    display_round('/home/dominique/.conkyrc/conky-1.10/conky-lune/lune1-1.png',
                50,155,50,  --xc,yc,radius
                100           --radius_crop (1-100)
    )
    display_round('/home/dominique/.conkyrc/conky-1.10/conky-lune/lune2-1.png',
                200,155,50,  --xc,yc,radius
                100           --radius_crop (1-100)
    )    
      
end

the Garlab.png and Garlab-h.png
772361Garlab.png 472759Garlabh.png

Offline

#1532 2017-04-06 05:26:28

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 545

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

Nicely done S11 and chepioq!

They both look great.


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#1533 2017-04-06 17:10:12

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,147

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

Nice work chepioq!

@S11
That makes me wanna cut my hair like this and listen to some glam/hair rock. 
If I had enough hair that is... tongue

Last edited by TeoBigusGeekus (2017-04-06 17:10:23)


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

#1534 2017-04-06 17:51:01

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

chepioq wrote:

Hello my friend.
I made a little conky for moon.

Very nice ... love the idea of the "rocks" for the moon base.  Well done.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1535 2017-04-06 18:02:04

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

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

Sector11 wrote:

Very nice ... love the idea of the "rocks" for the moon base.  Well done.

The "rock" is a hill near my town (aubagne in France) named "Colline du Garlaban"

Offline

#1536 2017-04-06 18:06:09

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

TeoBigusGeekus wrote:

@S11
That makes me wanna cut my hair like this and listen to some glam/hair rock. 
If I had enough hair that is... tongue

Yea, well, first we grow it then we cut/style/trim it.  OH WAIT!  We lost it, we can't grow it.
Shucks!  neutral  ← me incognito.

Still needs colour tweaks - this is today's view with a different wallpaper, easier to see:
2017-04-06_144750_Scrot11.th.png
Colour is a matter of personal preference anyway.  CPU usage is what it is because this is one of 16 conkys currently running.

Oh and think of it this way:  At least we don't have bad hair days!   big_smile


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1537 2017-04-06 18:44:43

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

chepioq wrote:
Sector11 wrote:

Very nice ... love the idea of the "rocks" for the moon base.  Well done.

The "rock" is a hill near my town (aubagne in France) named "Colline du Garlaban"

This little rock?  That one impressive mountain top and one great conky base. wink


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1538 2017-04-07 04:14:04

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

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

Sector11 wrote:

This little rock?  That one impressive mountain top and one great conky base. wink

Yes that is this "little rock", it's not a mountain, just an hill, which culminates at 724 meters.

Offline

#1539 2017-04-07 16:46:10

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

Ah well, we'll change that than:

This little rock?  That one impressive hill top and one great conky base.  wink

IE:  Creative thinking in action!


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1540 2017-05-04 12:06:23

ector1935
Member
Registered: 2017-05-03
Posts: 162

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

Hello,
My name is hector, i am writing from italy,i tried the conky posted by @Sector11 but i noticed that the weather is not updated,does anyone know what i have to do to have the previsions in real time?
According to accuweather I should have other previsions
  http://www.accuweather.com/it/it/gorlag … 7856?day=1
Instead I find myself with these prevision,see photos
https://scrot.moe/image/1ooCAs

I scribbled the scripts put on the first page of the post, issued in my home, if you need more information, just ask.
thank you
hector

Offline

#1541 2017-05-04 12:34:35

unklar
Member
Registered: 2015-10-31
Posts: 945

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

The link to the picture is not ok  sad

In the script did you insert the line?

http://www.accuweather.com/en/it/gorlago/2277856/weather-forecast/2277856

which Conky configuration file you use?

Offline

#1542 2017-05-04 12:44:21

ector1935
Member
Registered: 2017-05-03
Posts: 162

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

thank,link image
http://imgur.com/a/jV47x
conky-V 1.9
linee the script is on my /home/minchionne/1_accuweather/

.conkyrc4

# pkill -xf "conky -c /media/5/conky/Temetka/Temetka_80s_s11.conky" &

# Inspired by: Temetka https://forums.bunsenlabs.org/viewtopic.php?pid=47838#p47838

## ---------- Begin Window Settings
update_interval 1.0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager  #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Temetka's 80's Sunsent
## ARGB can be used for real transparencyown_window_hints
#own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 80

minimum_size 300 0  ### width | height
maximum_width 300

gap_x 15    # l|r
gap_y 15    # u|d

alignment tl
## ---------- End Window Settings
## ---------- Font Settings
use_xft yes
#xftfont Liberation Mono:bold:size=11
#xftfont Fantasque Sans Mono:bold:size=12
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10
xftfont Fira Mono:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
#########################  End Font Settings  ###
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
###  Borders Section  ###########################
draw_borders no
# Stippled borders?
stippled_borders 5
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 2
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#######################  End Borders Section  ###
###  Miscellaneous Section  #####################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
# text_buffer_size 6144

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
# pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

update_interval 1
#################  End Miscellaneous Section  ###

TEXT
${image /home/minchionne/1_accuweather/80s_Sunset.png -p 66,0 -s 170x170}\
${font Kenyan Coffee:size=50}${color3}${alignc}${time %H:%M}${color}${font}
${font Shimes One PERSONAL USE:size=70}${color6}${alignc}${time %A}${font}
${font Kenyan Coffee:size=20}${color3}${alignc}${time %d %b %y}${color}${font}
${color3}Booted @${color} ${exec who -b | cut -c23-}${alignr}${color3}Up:${color} ${exec w | awk '/ up /{gsub(/,$/,"",$3);print $3}'}
${color1}${swapbar 0}${color}
${color5}${alignc}TEMPS
${goto 20}${color3}CPU${color} ${acpitemp}°\
${goto 93}${color3}M|B${color} ${execpi 5 sensors acpitz-virtual-0 | grep 'temp1' | awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°\
${goto 165}${color3}SDA${color} ${hddtemp /dev/sda}°\
${goto 240}${color3}GPU${color}${hwmon 1 temp 1}° 
${color1}${swapbar 0}${color}
${alignc}${color5}Intel Core i7-3630QM ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}${color}${endif}${endif}%
${alignc}${color3}CPU     ${color0}%${color}     MHz
${goto 96}${color3}1${color0}     \
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${alignr 75}${color}${freq 1}
${goto 96}${color3}2${color0}     \
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${alignr 75}${color}${freq 2}
${goto 96}${color3}3${color0}     \
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${alignr 75}${color}${freq 3}

#${alignc}${color5}CPU Fan${color} ${platform f71882fg.2560 fan 1} ${color3}RPM
${color1}${swapbar 0}${color}
${alignc}${color3}Memory${color}  Using:${color3} ${mem} of ${memmax}
${color1}${swapbar 0}${color}
 S.T.${goto 118}Currently:${alignr}Temp\

${image $HOME/1_accuweather/forecast_2016/forecast_0.png -p 23,435 -s 250x252}\
${font Fira Mono:size=30}±${execi 300 sed -n '3p' ~/1_accuweather/curr_cond}\
${alignr}${execi 300 sed -n '2p' ~/1_accuweather/curr_cond}${font}


 UVI: ${execi 300 sed -n '9p' ~/1_accuweather/curr_cond}/11\
 ${alignr}${execi 300 sed -n '8p' ~/1_accuweather/curr_cond}:Bar


Wind: ${execi 300 sed -n '5p' ~/1_accuweather/curr_cond} ${execi 300 sed -n '6p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '7p' ~/1_accuweather/curr_cond} :Hum


 Cld: ${execi 300 sed -n '10p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '13p' ~/1_accuweather/curr_cond} :Vis


${image ~/4_Moon/0.png -p 100,725}
${alignc}${swapbar 0,50} Current Moon & Forecast ${swapbar 0,50}
${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`} ${color}
${image $HOME/1_accuweather/forecast_2016/forecast_1.png -p 10,720 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_2.png -p 240,720 -s 45x45}\
${if_match "${execpi 300 sed -n '4p' /home/minchionne/1_accuweather/first_days}" == "Lo"} \
${else}${execpi 300 sed -n '3p' /home/minchionne/1_accuweather/first_days}${endif}\
${alignr 55}${execi 300 sed -n '8p' ~/1_accuweather/first_days}

${goto 60}${if_match "${execpi 300 sed -n '4p' /home/minchionne/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '3p' /home/minchionne/1_accuweather/first_days}\
${alignr https://forums.bunsenlabs.org/edit.php?id=48496#} ${execi 300 sed -n '9p' ~/1_accuweather/first_days}
${color5}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_3.png -p 10,785 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_4.png -p 240,785 -s 45x45}\
${execi 300 sed -n '13p' ~/1_accuweather/first_days}\
${alignr 55}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

${goto 60}${execi 300 sed -n '14p' ~/1_accuweather/first_days}\
${alignr}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

my 1_accuweather

#!/bin/bash


#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b 
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
		   echo -
		 ;;   
        esac
} 


############################
# Check the user arguments #
############################

if (( $# < 1 || $# > 4 )); then
	echo "Invalid arguments!"
	exit
fi

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0

for i in $*
	do 
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
		esac
	done
	
if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


#Put your Accuweather address here
#address="http://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
#address="http://www.accuweather.com/en/jp/tokyo/226396/weather-forecast/226396"
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/it/it/bergamo/214040/weather-forecast/214040"
 address=http://www.accuweather.com/it/it/gorlago/2277856/weather-forecast/2277856
last_number=$(echo $address|sed 's/^.*\///')


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then
	
	#function: convert_time
	convert_time () 
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		echo $time_24
	}
	
	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo -
	         ;;
	         S)
	           echo 1 
	         ;;
	         SSW)
	           echo 2 
	         ;;
	         SW)
	           echo 3 
	         ;;
	         WSW)
	           echo 4 
	         ;;
	         W)
	           echo 5 
	         ;;
	         WNW)
	           echo 6 
	         ;;
	         NW)
	           echo 7 
	         ;;
	         NNW)
	           echo 8 
	         ;;
	         N)
	           echo 9 
	         ;;
	         NNE)
	           echo : 
	         ;;
	         NE)
	           echo ; 
	         ;;
	         ENE)
	           echo \< 
	         ;;
	         E)
	           echo = 
	         ;;
	         ESE)
	           echo \> 
	         ;;
	         SE)
	           echo ? 
	         ;;
	         SSE)
	           echo @ 
	         ;;
	    esac
	}
	
	kill -STOP $(pidof conky)
	
	curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
	wget -O $HOME/1_accuweather/curr_cond_raw "$curr_addr"
	
	addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	wget -O $HOME/1_accuweather/first_days_raw "$addr1"
	
	addr2="$addr1"?day=6
	wget -O $HOME/1_accuweather/last_days_raw "$addr2"
	
	if [[ $forecast2015 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2016/forecast_*.png
	fi
	
	#current conditions
	if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
	    sed -i '/detail-now/,/Astronomy <span class/!d' $HOME/1_accuweather/curr_cond_raw
	    egrep -i '"cond"|icon i-|large-temp|small-temp|wind-point|"wind"|Humidity|Pressure|UV Index|Cloud Cover|Ceiling|Dew Point|Visibility|Duration|Sunrise:|Sunset:|Moonrise:|Moonset:' $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
	    sed -i -e 's/^.*<strong>//g' -e 's/^.*<span>//g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*<\/em> //g' -e 's/^.*"cond">//g' -e 's/^.*wind-point //g' $HOME/1_accuweather/curr_cond
	    sed -i -e 's/">.*$//g' -e 's/&deg.*$//g' -e 's/<\/span>.*$//g' -e 's/&#.*$//g' -e 's/ &darr.*$//g' -e 's/ &uarr.*$//g' -e 's/<\/strong>.*$//g' $HOME/1_accuweather/curr_cond
	    sed -i '1s/-.*$//' $HOME/1_accuweather/curr_cond
	    image=$(sed -n 1p $HOME/1_accuweather/curr_cond)
	    echo $(test_image $image) >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 14p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 15p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 18p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 19p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		wind=$(sed -n 5p $HOME/1_accuweather/curr_cond)
		echo $(test_wind $wind) >> $HOME/1_accuweather/curr_cond
        if (( $(sed -n 14p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 15p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 18p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 19p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' $HOME/1_accuweather/curr_cond
		fi
	    if [[ $forecast2015 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/wind_0.png
		fi
	fi
	
	#First 5 days
	if [[ -s $HOME/1_accuweather/first_days_raw ]]; then
	
	    sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/first_days_raw
	    egrep -i 'href="#"|icon i-|"large-temp"|"small-temp"|temp-label|"cond"' $HOME/1_accuweather/first_days_raw > $HOME/1_accuweather/first_days
	    sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' -e 's/^.*"temp-label tonight selected">//g' $HOME/1_accuweather/first_days
	    sed -i -e 's/&deg.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/first_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/' -e 's/Today$/TODAY/' -e 's/Tonight$/TONIGHT/' -e 's/Early AM/EARLY AM/' $HOME/1_accuweather/first_days
	    for (( i=2; i<=22; i+=5 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/first_days)
	          echo $(test_image $image) >> $HOME/1_accuweather/first_days
		  done
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=2; i<=22; i+=5 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
	
	#Next 5 days
	if [[ -s $HOME/1_accuweather/last_days_raw ]]; then
		
		sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/last_days_raw
	    egrep -i 'href="#"|icon i-|large-temp|small-temp|temp-label|"cond"' $HOME/1_accuweather/last_days_raw > $HOME/1_accuweather/last_days
	    sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' $HOME/1_accuweather/last_days
	    sed -i -e 's/&deg.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/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/1_accuweather/last_days
	    for (( i=2; i<=22; i+=5 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/last_days)
	          echo $(test_image $image) >> $HOME/1_accuweather/last_days
		  done
		if [[ $forecast0 == 0 ]]; then
			j=6
			for (( i=2; i<=22; i+=5 ))
			  do
			    if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
	
	if [[ $hourly0 != 1 && $hourly2015 != 1 && $hourly2016 != 1 ]]; then
		kill -CONT $(pidof conky)
	fi

fi


#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: First 8h
	
	if [[ $forecast0 != 1 && $forecast2015 != 1 && $forecast2016 != 1 ]]; then
		kill -STOP $(pidof conky)
	fi
	
	if [[ $hourly2015 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2015/hourly_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2016/hourly_*.png
	fi	
	
	hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
	wget -O $HOME/1_accuweather/hourly_raw1 "$hourly_addr1"
	
	if [[ -s $HOME/1_accuweather/hourly_raw1 ]]; then
		sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw1
		egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw1 > $HOME/1_accuweather/hourly1
		sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly1
		sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly1
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly1
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly1)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly1
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	fi
	
	#Hourly: Next 8h
	hourly_addr2=$(sed -n 1p $HOME/1_accuweather/hourly1)
	wget -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"
	
	if [[ -s $HOME/1_accuweather/hourly_raw2 ]]; then
		sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw2
		egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw2 > $HOME/1_accuweather/hourly2
		sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly2
		sed -i 1d $HOME/1_accuweather/hourly2
		sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly2
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly2
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly2)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly2
		  done
		if [[ $hourly0 == 0 ]]; then
			j=9
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	fi
	
	
	# Full info, next 16h - altogether16 file
	rm $HOME/1_accuweather/altogether16 altogether16_2015 altogether16_2016
	
	#TIME
	echo "\${color ffe595}TIME\${goto 100}" > $HOME/1_accuweather/altogether16
	sed -i "1s/$/$(sed -n 2p $HOME/1_accuweather/hourly1):$(sed -n 3p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
	jump_to=160
	for (( i=5; i<=17; i+=2 ))
		do
			time=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	sed -i "1s/$/\${goto 580}$(sed -n 2p $HOME/1_accuweather/hourly2):$(sed -n 3p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
	jump_to=640
	for (( i=5; i<=17; i+=2 ))
		do
			time=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	sed -i '1s/$/\n\n\n/' $HOME/1_accuweather/altogether16
	
	#FORECAST
	echo "\${color ffe595}FORECAST\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	sed -i '5s/$/\n/' $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#TEMPERATURE
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "TEMPER.\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=29; i<=36; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=29; i<=36; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#REAL FEEL
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "REAL FEEL\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=38; i<=45; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done	
	for (( i=38; i<=45; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done	
		
	#WIND
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "WIND\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=47; i<=54; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=47; i<=54; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#RAIN
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "RAIN\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=64; i<=71; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=64; i<=71; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#SNOW
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "SNOW\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=73; i<=80; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=73; i<=80; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#ICE
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "ICE\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=82; i<=89; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=82; i<=89; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#UV INDEX
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "UV INDEX\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=99; i<=106; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=99; i<=106; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#CLOUD COVER
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "CLOUD COV.\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=108; i<=115; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=108; i<=115; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#HUMIDITY
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "HUMIDITY\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=117; i<=124; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=117; i<=124; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#DEW POINT
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "DEW POINT\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=126; i<=133; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=126; i<=133; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2016
		fi
		rm $HOME/1_accuweather/altogether16
		for (( i=1; i<=16; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2016
				fi			
				((jump_to+=60))
			done
	fi
	
	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/1_accuweather/altogether16
		jump_to=95
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		sed -i '4s/$/\${font}/' $HOME/1_accuweather/altogether16
		sed -i '2,3d' $HOME/1_accuweather/altogether16
	fi
	
	kill -CONT $(pidof conky)
fi	

Last edited by ector1935 (2017-05-04 12:47:30)

Offline

#1543 2017-05-04 12:55:47

unklar
Member
Registered: 2015-10-31
Posts: 945

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

^You must place the address in quotation marks.   wink

Offline

#1544 2017-05-04 13:10:51

ector1935
Member
Registered: 2017-05-03
Posts: 162

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

thank @unklar
It's from this morning that we bang my head
sig
edit
in the conky terminal,i have this error:

conky: one or more $endif's are missing

I have to fix it or I can use it like that?

Last edited by ector1935 (2017-05-04 13:12:51)

Offline

#1545 2017-05-04 14:43:40

unklar
Member
Registered: 2015-10-31
Posts: 945

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

here is the questionable range

${alignc}${color5}Intel Core i7-3630QM ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}%${color}${endif}${endif}  <--
${alignc}${color3}CPU     ${color0}%${color}     MHz
${goto 96}${color3}1${color0}\
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${alignr 75}${color}${freq 1}
${goto 96}${color3}2${color0}\
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${alignr 75}${color}${freq 2}
${goto 96}${color3}3${color0}\
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${alignr 75}${color}${freq 3} 

these $ {endif} appear superfluous

line 179
${else}${execpi 300 sed -n '3p' /home/minchionne/1_accuweather/first_days}${endif}\

Where I find the original conkyrc4?

You have an i7
Sector11 has a 3 core processor

Offline

#1546 2017-05-04 15:17:34

ector1935
Member
Registered: 2017-05-03
Posts: 162

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

I took it from this page, I just called it .conkyrc4
yes i have i7
thank

=== Mod Edit ===
Included Link in a proper manner.

Highlight page » Click on URL » Post + add the post number + OK ...and that's it.
2017-05-04_123937_Scrot11.png
for the @moderator
If I click on the link I go to another page, is it correct ??
I'm not going to post 1531
sorry for the inconvenience

Last edited by ector1935 (2017-05-04 17:10:57)

Offline

#1547 2017-05-04 17:29:24

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

@ector1935

I made a mistake posting that conky as it is, since it does NOT call the two bash scripts needed to get the proper information.  I will fix that... mean time....

This is what it should look like under TEXT:

TEXT
${execi 900 bash $HOME/1_accuweather/1_accuweather -f2016}\
${execi 900 bash  $HOME/4_Moon/moon}\
${image /path/to/the/image/80s_Sunset.png -p 66,0 -s 160x160}\

Currently you are using my code:
- as unklar stated, I have a triple core AMD - ${cpu cpu0} is a total or Average of the CPU Chip.
- in that conky there are 10 ${if_match} statements, you need 10 ${endif} statements - you have: 9

So Change this  (an error on my part - sorry):

${goto 60}${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}\
${alignr}${execi 300 sed -n '9p' ~/1_accuweather/first_days}

to

${goto 60}${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}${endif}\
${alignr}${execi 300 sed -n '9p' ~/1_accuweather/first_days}

OK, your chip: Intel Core i7-3630QM:
Number of Cores 4
Number of Threads 8

If you using it as 4 cores; use this code:

${alignc}${color5}Intel Core i7-3630QM ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}${color}${endif}${endif}%
${alignc}${color3}CPU     ${color0}%${color}     MHz
${goto 96}${color3}1${color0}     \
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${alignr 75}${color}${freq 1}
${goto 96}${color3}2${color0}     \
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${alignr 75}${color}${freq 2}
${goto 96}${color3}3${color0}     \
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${alignr 75}${color}${freq 3}
${if_match ${cpu cpu4} < 10}  ${cpu cpu4}\
${else}${if_match ${cpu cpu4} < 100} ${cpu cpu4}\
${else}${color9}${cpu cpu4}${color}${endif}${endif}\
${alignr 75}${color}${freq 4}

If you are using it as 8 cores (showing the threads) this might look nice.
2017-05-04_135945_Scrot11.th.png

Here's the complete conky as the images needed moving as well:

# pkill -xf "conky -c /media/5/conky/Temetka/Temetka_80s_s11_8core.conky" &
# Inspired by: Temetka https://forums.bunsenlabs.org/viewtopic.php?pid=47838#p47838

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager  #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title Temetka's 80's Sunsent
## ARGB can be used for real transparencyown_window_hints
#own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 80

minimum_size 300 0  ### width | height
maximum_width 300

gap_x 15    # l|r
gap_y 15    # u|d

alignment tr
## ---------- End Window Settings
## ---------- Font Settings
use_xft yes
xftfont Fira Mono:bold:size=10
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
#########################  End Font Settings  ###
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
###  Borders Section  ###########################
draw_borders no
# Stippled borders?
stippled_borders 5
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 2
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#######################  End Borders Section  ###
###  Miscellaneous Section  #####################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
# text_buffer_size 6144

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
# pad_percents 2

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

update_interval 1
#################  End Miscellaneous Section  ###

## ${execi 900 bash $HOME/1_accuweather/1_accuweather -f2016}\
## ${execi 900 bash /media/5/Conky/4_Moon/moon}\

TEXT
${execi 900 bash $HOME/1_accuweather/1_accuweather -f2016}\
${execi 900 bash /media/5/Conky/4_Moon/moon}\
${image /media/5/Conky/images/80s_Sunset.png -p 66,0 -s 160x160}\
${font Kenyan Coffee:size=45}${color3}${alignc}${time %H:%M}${color}${font}
${font Shimes One PERSONAL USE:size=80}${color6}${alignc}${time %A}${font}
${font Kenyan Coffee:size=25}${color3}${alignc}${time %d %b %y}${color}${font}
${color3}Booted @${color} ${pre_exec who -b | cut -c23-}${alignr}${color3}Up:${color} ${exec w | awk '/ up /{gsub(/,$/,"",$3);print $3}'}
${color1}${swapbar 0}${color}
${color5}${alignc}TEMPS
${goto 20}${color3}CPU${color} ${platform f71882fg.2560 temp 2}°\
${goto 93}${color3}M|B${color} ${execpi 5 sensors k10temp-pci-00c3 | grep 'temp1' | awk -F'+' '{print $2}' | awk -F'.' '{print $1}'}°\
${goto 165}${color3}SDA${color} ${hddtemp /dev/sda}°\
${goto 240}${color3}GPU${color} ${nvidia temp}°
${color1}${swapbar 0}${color}
${alignc}${color5}Intel Core i7-3630QM ${color3}Avg${color} ${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${color}${cpu cpu0}${color}${endif}${endif}%
 ${color3}CPU   ${color0}%${color}    MHz${alignr 5}${color3}CPU   ${color0}%${color}    MHz
${goto 25}${color3}1${color0}   \
${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${color9}${cpu cpu1}${color}${endif}${endif}\
${goto 100}${color}${freq 1}${goto 200}${color3}5${goto 230}${color0}${if_match ${cpu cpu5} < 10}  ${cpu cpu5}\
${else}${if_match ${cpu cpu5} < 100} ${cpu cpu5}\
${else}${color9}${cpu cpu5}${color}${endif}${endif}\
${alignr 2}${color}${freq 5}
${goto 25}${color3}2${color0}   \
${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100} ${cpu cpu2}\
${else}${color9}${cpu cpu2}${color}${endif}${endif}\
${goto 100}${color}${freq 2}${goto 200}${color3}6${goto 230}${color0}${if_match ${cpu cpu6} < 10}  ${cpu cpu6}\
${else}${if_match ${cpu cpu6} < 100} ${cpu cpu6}\
${else}${color9}${cpu cpu6}${color}${endif}${endif}\
${alignr 2}${color}${freq 6}
${goto 25}${color3}3${color0}   \
${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${color9}${cpu cpu3}${color}${endif}${endif}\
${goto 100}${color}${freq 3}${goto 200}${color3}7${goto 230}${color0}${if_match ${cpu cpu7} < 10}  ${cpu cpu7}\
${else}${if_match ${cpu cpu7} < 100} ${cpu cpu7}\
${else}${color9}${cpu cpu7}${color}${endif}${endif}\
${alignr 2}${color}${freq 7}
${goto 25}${color3}4${color0}   \
${if_match ${cpu cpu4} < 10}  ${cpu cpu4}\
${else}${if_match ${cpu cpu4} < 100} ${cpu cpu4}\
${else}${color9}${cpu cpu4}${color}${endif}${endif}\
${goto 100}${color}${freq 4}${goto 200}${color0}8${goto 230}${color0}${if_match ${cpu cpu8} < 10}  ${cpu cpu8}\
${else}${if_match ${cpu cpu8} < 100} ${cpu cpu8}\
${else}${color9}${cpu cpu8}${color}${endif}${endif}\
${alignr 2}${color}${freq 8}
${alignc}${color5}CPU Fan${color} ${platform f71882fg.2560 fan 1} ${color3}RPM
${color1}${swapbar 0}${color}
${alignc}${color3}Memory${color}  Using:${color3} ${mem} of ${memmax}
${color1}${swapbar 0}${color}
 S.T.${goto 118}Currently:${alignr}Temp\

${image $HOME/1_accuweather/forecast_2016/forecast_0.png -p 23,455 -s 250x252}\
${font Fira Mono:size=30}±${execi 300 sed -n '3p' ~/1_accuweather/curr_cond}\
${alignr}${execi 300 sed -n '2p' ~/1_accuweather/curr_cond}${font}


 UVI: ${execi 300 sed -n '9p' ~/1_accuweather/curr_cond}/11\
 ${alignr}${execi 300 sed -n '8p' ~/1_accuweather/curr_cond}:Bar


Wind: ${execi 300 sed -n '5p' ~/1_accuweather/curr_cond} ${execi 300 sed -n '6p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '7p' ~/1_accuweather/curr_cond} :Hum


 Cld: ${execi 300 sed -n '10p' ~/1_accuweather/curr_cond}\
 ${alignr}${execi 300 sed -n '13p' ~/1_accuweather/curr_cond} :Vis


${image /media/5/Conky/4_Moon/0.png -p 100,735}
${alignc}${swapbar 0,50} Current Moon & Forecast ${swapbar 0,50}
${color5}${execi 3600 echo `date --date="0 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_1.png -p 10,735 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_2.png -p 240,735 -s 45x45}\
${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"} \
${else}${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}${endif}\
${alignr 55}${execi 300 sed -n '8p' ~/1_accuweather/first_days}

${goto 60}${if_match "${execpi 300 sed -n '4p' /home/sector11/1_accuweather/first_days}" == "Lo"}\
${execpi 300 sed -n '3p' /home/sector11/1_accuweather/first_days}${endif}\
${alignr}${execi 300 sed -n '9p' ~/1_accuweather/first_days}
${color5}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}${color}
${image $HOME/1_accuweather/forecast_2016/forecast_3.png -p 10,805 -s 45x45}\
${image $HOME/1_accuweather/forecast_2016/forecast_4.png -p 240,805 -s 45x45}\
${execi 300 sed -n '13p' ~/1_accuweather/first_days}\
${alignr 55}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

${goto 60}${execi 300 sed -n '14p' ~/1_accuweather/first_days}\
${alignr}${execi 300 sed -n '18p' ~/1_accuweather/first_days}

WARNING
- ALL snsors information is from Sector11's AMD x3 - adjust accordingly
- No idea if Intel reports frequency for 4 cores or 8 threads - If only the first 4 cores:

CPU   %    MHz   CPU   %
 1   100   800    5   100
 2   100   800    6   100
 3   100   800    7   100
 4   100   800    8   100

would work for me.


Intel and AMD CPU reporting:

              Intel     AMD
conky         Core      CPU
${cpu cpu1}    0         1
${cpu cpu2}    1         2
${cpu cpu3}    2         3
${cpu cpu4}    3         4
${cpu cpu5}    4         5
${cpu cpu6}    5         6
${cpu cpu7}    6         7
${cpu cpu8}    7         8

${cpu cpu0}    Total/Average of above

BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#1548 2017-05-04 17:57:28

unklar
Member
Registered: 2015-10-31
Posts: 945

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

^^ ... and I've been looking for my glasses all the time.   devil

THANK YOU! Sector11

Offline

#1549 2017-05-04 19:19:43

ector1935
Member
Registered: 2017-05-03
Posts: 162

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

Thanks sector11, you made me a great favor, it now seems to work with 4 core and 8 treads.
Thank you very much for your work!
Here's my conky

2017-05-04-211630_348x847_scrot.th.png

Offline

#1550 2017-05-04 19:29:32

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,632

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

unklar wrote:

^^ ... and I've been looking for my glasses all the time.   devil

THANK YOU! Sector11

HAHAHAHAHAHA - First place I always look is: The Mirror! (You'd be surprised)

You're welcome my friend.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

Board footer

Powered by FluxBB