You are not logged in.

#1521 2017-03-29 02:41:25

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

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

Yeah, I didn't read that. tongue

Ok, can you tell me how I would do a horizontal 5 day forecast? Today + 4 days out.

Also out of curiosity, are there grey scale versions of the high res png's? I think they'd work great with my conky. If not, no worries.

Finally, thanks for taking the time to create all these weather scripts and keep them updated. I'm sure it's a ton of work but it helps the community out a lot. So if no one ever said thank you, thank you.


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

#1522 2017-03-29 06:28:05

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

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

1) Create a copy of the Forecast_Images_2015 folder and name it Forecast_Images_2015_Gray
2) Run the following script inside the folder (provided you have imagemagick installed):

#!/bin/bash

for i in *.png
do 
	fn=$(basename "$i") 
	echo $i
	n=${fn%.*} 
	convert -colorspace Gray "$n".png "$n".png
done

All the 2015 images are now grayscale. If you don't want to install imagemagick, you can manually convert the images with gimp, one by one. If you don't want to install gimp, bugger off tongue
3)Open the main script, ie. 1_accuweather and replace all instances of Forecast_Images_2015 to Forecast_Images_2015_Gray.
4)Run the following conkyrc

conky.config = {
-- Create own window instead of using desktop (required in nautilus)
	own_window = true,
	own_window_type = 'override',
	own_window_transparent = true,
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',

-- Use double buffering (reduces flicker, may not work for everyone)
	double_buffer = true,

-- fiddle with window
	use_spacer = 'yes',
	use_xft = true,

-- Update interval in seconds
	update_interval = 3,

-- Minimum size of text area
	minimum_width = 600, minimum_height = 500,
	maximum_width = 600,

	override_utf8_locale = true,

-- Draw shades?
	draw_shades = true,

-- Text stuff
	draw_outline = true,-- amplifies text if yes
	draw_borders = false,
--font freesans -12
	font = 'Arial:size=9',
	uppercase = false,-- set to yes if you want all text to be in uppercase

-- Stippled borders?
	stippled_borders = 3,

-- border margins
	border_margin = '9',

-- border width
	border_width = 10,

-- Default colors and also border colors, grey90 == #e5e5e5
	default_color = '#cbcbcb',

	own_window_colour = 'brown',
	own_window_transparent = true,

-- Text alignment, other possible values are commented
--alignment top_left
	alignment = 'top_right',
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text
	gap_x = 10,
	gap_y = 30,

	imlib_cache_size = 0,
-- stuff after 'TEXT' will be formatted on screen

};

conky.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

]];

Convert to 1.9 first if you wish.
DtsDeZvt.png


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

#1523 2017-03-29 06:37:16

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

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

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.
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...

EDIT: I'm a moron, see here.

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


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

#1524 2017-03-29 06:49:28

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

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

You sir are the man.

Thank you very much.


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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/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


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/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.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/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


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

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

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/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


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1537 2017-04-07 04:14:04

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,008

Re: Conky weather+moon scripts (Accuw/WUndergr/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!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

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

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

Re: Conky weather+moon scripts (Accuw/WUndergr/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

Board footer

Powered by FluxBB