SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1326 2014-02-23 18:14:22

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

Last edited by TeoBigusGeekus (2014-02-23 18:14:34)


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

Be excellent to each other!

#1327 2014-02-23 19:48:19

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

01|Lunar phase
02|today is
03|Waning Crescent

Offline

#1328 2014-02-23 20:23:54

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

To get only the zodiac sign without the "zodiac sign" part, use this line in your conkyrc:

sed -n 10p $HOME/5_Moon/today | sed 's/^.*sign //'

To grab the illumination, use

sed -n '/Illumination/p' $HOME/5_Moon/today | sed 's/^.*: //'

Simirarly, for the moon's fraction

sed -n '/Fraction/p' $HOME/5_Moon/today | sed 's/^.*: //'

To print whether the moon is growing smaller or bigger

sed -n '/The moon is growing/p' $HOME/5_Moon/today | sed 's/^.*growing //' | sed 's/ .*$//'

and whether it's a young or old one

sed -n '/The moon is growing/p' $HOME/5_Moon/today | sed 's/^.*growing //' | sed 's/^.*(//' | sed 's/ .*$//'

Too much piping, I know tongue

Last edited by TeoBigusGeekus (2014-02-23 20:24:06)


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

#1329 2014-02-23 20:36:46

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

Last edited by Sector11 (2014-02-23 20:38:10)

Offline

#1330 2014-02-24 10:22:02

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Offline

#1331 2014-02-24 12:33:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

own_window_type override

Offline

#1332 2014-02-24 14:22:57

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Hey Sector11, thanks for the reply.

1. I am using the newest 1b1)Accuweather - Images - 1b1_12-2-14 (downloaded yesterday), but the exact same things happens with 1b2)Accuweather - ConkyWeather font - 1b2_12-2-14.

2. Both laptops run up to date Arch linux.
Laptop where it works runs Openbox+compton, and 10.2 mesa-git radeon drivers
Laptop where it doesn't work runs Gnome 3.8, with the same above drivers

The problem is not the black background (which I had to enable, because on transparent background entire conky was totally scrambled. Pity, but I saw no other choice.
The problem is, that the text is not aligned with the graphics. Take a look at the picture.

Conky was not modified in another way, except for those:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 355 500
maximum_width 357

override_utf8_locale yes

# Draw shades?
draw_shades yes

As for the own_window_type suggestion, I had to change it to desktop to even see conky, so that's is not override anyway.

Offline

#1333 2014-02-24 14:49:13

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

${image $HOME/1b1_accuweather_images/16.png -p 230,330 -s 90x54}

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

#1334 2014-02-24 15:19:32

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Last edited by lockheed (2014-02-24 15:26:03)

Offline

#1335 2014-02-24 16:06:24

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

lua_load /media/5/Conky/Teo_wun/LUA/draw-bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
${color5}↑: ${color9}${execi 600 sed -n '39p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}${alignr 5}\
${color5}T: ${color7}${execi 600 sed -n '67p' /media/5/Conky/Teo_wun/Conditions}°
${color5}↓: ${color7}${execi 600 sed -n '44p' /media/5/Conky/Teo_wun/Simple_Forecast}°${alignr 5}\
${color5}±: ${execi 600 sed -n '113p' /media/5/Conky/Teo_wun/Conditions}°

Offline

#1336 2014-02-24 17:52:51

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

# pkill -xf "conky -c /media/5/Conky/Teo_wun/T-wunClock.conky" &
# conky -c /media/5/Conky/Teo_wun/T-wunClock.conky &
# Thank you:
# TeoBigusGeekus - for his wonderful weather scripts
# - - This one is: 2b_Wunderground_API - dated 24 Feb 2014
# Chronograph LUA - Sector11 - tweaked with the help of mrpeachy
##### - See LUA for more (originally 4 clocks by  mrpeachy)
# mounted.lua - londonali1010, mrpeachy, dk75

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Teo Wun Clock

# 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

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

#minimum_size 420 420  ## width, height
#maximum_width 420     ## width

### For use with The-Clock.lua
minimum_size 300 0  ## width, height
maximum_width 300     ## width

gap_x 10 #15        ### left &right
gap_y 10        ### up & down

### alignment values or top_left, bottom_right, etc
# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment tr

####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=11
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# 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  #########################################################
###  Color Settings  #########################################################
draw_shades no  ## <<<--- yes --- To see it easier on light screens.
default_shade_color 000000
draw_outline no #### <<<--- yes --- Amplifies text if yes OJO with changing fonts
default_outline_color 000000

default_color DCDCDC #220 220 220	Gainsboro
#default_color C0C0C0 #192 192 192 Silver
#default_color B0E0E6 #176 224 230 PowderBlue
#default_color D8BFD8 #216 191 216 Thistle
color0 8FBC8F #DarkSeaGreen
#color1 C0C0C0 # Silver
#color1 D3D3D3 #LightGrey
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
#color3 87CEFA #E0FFFF #LightCyan
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
#color7 5F9EA0 #CadetBlue
#color8 FFFFE0 #LightYellow
color8 FFD700 #Gold
#color8 F0E68C #Khaki
color9 FFA07A #LightSalmon
#color9 CD5C5C #IndianRed
#color9 FF0000 #Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  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 256

# 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

# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes


imlib_cache_size 0

#   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

## default bar size
default_bar_size 200 20

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## draw-bg.lua - Above and After TEXT - requires a composite manager.
##
lua_load /media/5/Conky/Teo_wun/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
# ----------------------------------------------------------------------------
## OR Both above TEXT - No composite manager required.
#
#lua_load /media/5/Conky/TeoWeatherClock/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
### Teo Weather Clock ########################################################
lua_load /media/5/Conky/Teo_wun/LUA/Teo_Weather_Clock.lua
lua_draw_hook_post main
##############################  End LUA Settings  ###

update_interval 1
## USE THIS TEST Image:
##		${image /media/5/Conky/images/red+x.png -p
##TEXT
##${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
##${texeci 600 bash /media/5/Conky/Teo_wun/wunder}\
##${texeci 600 bash /media/5/Conky/Teo_wun/5_Moon/moon}\

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
${texeci 600 bash /media/5/Conky/Teo_wun/wunder}\
${texeci 600 bash /media/5/Conky/Teo_wun/5_Moon/moon}\
${color5}↑: ${color9}${execi 600 sed -n '39p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}${alignr 5}\
${color5}T: ${color7}${execi 600 sed -n '67p' /media/5/Conky/Teo_wun/Conditions}°
${color5}↓: ${color7}${execi 600 sed -n '44p' /media/5/Conky/Teo_wun/Simple_Forecast}°${alignr 5}\
${color5}±: ${execi 600 sed -n '113p' /media/5/Conky/Teo_wun/Conditions}°






${image /media/5/Conky/Teo_wun/5_Moon/current.png -p 60,60 -s 175x175}\
${image /media/5/Conky/Teo_wun/Now.png -p 93,113 -s 108x65}







${color5}Hum${alignr 5}D.P.${color}
${color7}${execi 600 sed -n '69p' /media/5/Conky/Teo_wun/Conditions}${alignr 5}${execi 600 sed -n '95p' /media/5/Conky/Teo_wun/Conditions}°${color}
${color5}Pressure${alignr 5}UV Index${color}
${color7}${execi 600 sed -n '85p' /media/5/Conky/Teo_wun/Conditions} | ${execi 600 sed -n '89p' /media/5/Conky/Teo_wun/Conditions}${alignr 15}${execi 600 sed -n '121p' /media/5/Conky/Teo_wun/Conditions}${color}
${font monofur:bold:size=14}${alignc}${execi 600 sed -n '63p' /media/5/Conky/Teo_wun/Conditions}${font}
${color5}Wind ${color7}${execi 600 sed -n '81p' /media/5/Conky/Teo_wun/Conditions} kph${goto 130}${color5}Gusts ${color7}${execi 600 sed -n '83p' /media/5/Conky/Teo_wun/Conditions} kph${alignr 5}${color5}←→ ${color7}${execi 600 sed -n '73p' /media/5/Conky/Teo_wun/Conditions}${color}
${alignc}${color1}The current moon phase is from
${alignc}${execpi 600 sed -n '5p' /media/5/Conky/Teo_wun/5_Moon/today} ${execpi 600 sed -n '6p' /media/5/Conky/Teo_wun/5_Moon/today}${execpi 600 sed -n '7p' /media/5/Conky/Teo_wun/5_Moon/today} ${execpi 600 sed -n '8p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
${font monofur:bold:size=10}${goto 12}${membar 0,15} ${execi 600 echo `date --date="0 day" | awk '{print $1" "$3" "$2}'`} ${membar 0,15}${color}\
		${goto 135}${color7}→  ${execpi 600 sed -n '10p' /media/5/Conky/Teo_wun/5_Moon/today | sed 's/^.*sign //'}
${image /media/5/Conky/Teo_wun/d1.png -p 0,379 -s 60x36}\
${image /media/5/Conky/Teo_wun/n1.png -p 60,379 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/current.png -p 125,375 -s 40x40}\
${color9}${execi 600 sed -n '39p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '102p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '3p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}Growing ${execpi 600 sed -n '/The moon is growing/p' /media/5/Conky/Teo_wun/5_Moon/today | sed 's/^.*growing //' | sed 's/ .*$//'}${color}
	${goto 52}${execi 600 sed -n '57p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '44p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
		${goto 180}${color7}${execpi 600 sed -n '/The moon is growing/p' /media/5/Conky/Teo_wun/5_Moon/today | sed 's/^.*growing //' | sed 's/^.*(//g' | sed 's/ .*$//'} moon${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '6p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d2.png -p 0,435 -s 60x36}\
${image /media/5/Conky/Teo_wun/n2.png -p 60,435 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/3.png -p 125,431 -s 40x40}\
${color9}${execi 600 sed -n '145p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '208p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '4p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '5p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '163p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '150p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '12p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d3.png -p 0,491 -s 60x36}\
${image /media/5/Conky/Teo_wun/n3.png -p 60,491 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/9.png -p 125,487 -s 40x40}\
${color9}${execi 600 sed -n '251p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '314p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '10p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '11p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '269p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '256p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '18p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d4.png -p 0,547 -s 60x36}\
${image /media/5/Conky/Teo_wun/n4.png -p 60,547 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/15.png -p 125,543 -s 40x40}\
${color9}${execi 600 sed -n '357p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '420p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '16p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '17p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '375p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '362p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '24p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d5.png -p 0,603 -s 60x36}\
${image /media/5/Conky/Teo_wun/n5.png -p 60,603 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/21.png -p 125,599 -s 40x40}\
${color9}${execi 600 sed -n '463p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '526p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '22p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '23p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '481p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '468p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '30p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d6.png -p 0,659 -s 60x36}\
${image /media/5/Conky/Teo_wun/n6.png -p 60,659 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/27.png -p 125,655 -s 40x40}\
${color9}${execi 600 sed -n '569p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '632p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '28p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '29p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '587p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '574p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '36p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d7.png -p 0,715 -s 60x36}\
${image /media/5/Conky/Teo_wun/n7.png -p 60,715 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/33.png -p 125,711 -s 40x40}\
${color9}${execi 600 sed -n '675p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '738p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '34p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '35p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '693p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '680p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 135}${color7}→  ${execpi 600 sed -n '42p' /media/5/Conky/Teo_wun/5_Moon/week}
${image /media/5/Conky/Teo_wun/d8.png -p 0,771 -s 60x36}\
${image /media/5/Conky/Teo_wun/n8.png -p 60,771 -s 60x36}\
${image /media/5/Conky/Teo_wun/5_Moon/39.png -p 125,767 -s 40x40}\
${color9}${execi 600 sed -n '781p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '844p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 180}${color7}${execpi 600 sed -n '40p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 180}${color7}${execpi 600 sed -n '41p' /media/5/Conky/Teo_wun/5_Moon/week}${color}
	${goto 52}${execi 600 sed -n '799p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '786p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 130}${color}↓ Current Moon Cycle ↓
${image /media/5/Conky/Teo_wun/d9.png -p 0,827 -s 60x36}\
${image /media/5/Conky/Teo_wun/n9.png -p 60,827 -s 60x36}\
${color9}${execi 600 sed -n '887p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
	${goto 52}${execi 600 sed -n '950p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 130}${color}New ${color7}→ ${execi 600 sed -n '18p' /media/5/Conky/Teo_wun/5_Moon/today} \
${execi 600 sed -n '19p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 130}${color7}~ ${execi 600 sed -n '20p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${execi 600 sed -n '905p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '892p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
		${goto 130}${color}1st ${color7}→ ${execi 600 sed -n '24p' /media/5/Conky/Teo_wun/5_Moon/today} \
${execi 600 sed -n '25p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
${goto 12}${membar 0,15} ${color4}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3" "$2}'`}${color} ${membar 0,15}\
		${goto 130}${color7}~ ${execi 600 sed -n '26p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
${image /media/5/Conky/Teo_wun/d10.png -p 0,883 -s 60x36}\
${image /media/5/Conky/Teo_wun/n10.png -p 60,883 -s 60x36}\
${color9}${execi 600 sed -n '993p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
		${goto 130}${color}Full ${color7}→ ${execi 600 sed -n '30p' /media/5/Conky/Teo_wun/5_Moon/today} \
${execi 600 sed -n '31p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${execi 600 sed -n '1056p' /media/5/Conky/Teo_wun/Simple_Forecast}%\
		${goto 130}${color7}~ ${execi 600 sed -n '32p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${color3}↓↓↓↓${color}\
		${goto 130}${color}Last ${color7}→ ${execi 600 sed -n '36p' /media/5/Conky/Teo_wun/5_Moon/today} \
${execi 600 sed -n '37p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
	${goto 52}${execi 600 sed -n '1011p' /media/5/Conky/Teo_wun/Simple_Forecast}\
		${goto 98}${color7}${execi 600 sed -n '998p' /media/5/Conky/Teo_wun/Simple_Forecast}°${color}\
		${goto 130}${color7}~ ${execi 600 sed -n '38p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
${goto 12}${membar 0,110}		${goto 130}${color}NEW ${color7}→ ${execi 600 sed -n '42p' /media/5/Conky/Teo_wun/5_Moon/today} \
${execi 600 sed -n '43p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
${goto 40}${membar 0,55}\
		${goto 130}${color7}~ ${execi 600 sed -n '44p' /media/5/Conky/Teo_wun/5_Moon/today}${color}
Angular diameter${goto 170}Distance from us
   ${color8} sun  ${execi 600 sed -n '51p' /media/5/Conky/Teo_wun/5_Moon/today}\
${goto 170}${execi 600 sed -n '55p' /media/5/Conky/Teo_wun/5_Moon/today}
   ${color1}moon  ${execi 600 sed -n '49p' /media/5/Conky/Teo_wun/5_Moon/today}\
${goto 170}${execi 600 sed -n '53p' /media/5/Conky/Teo_wun/5_Moon/today}
${color}${hr}

Last edited by Sector11 (2014-02-24 18:10:04)

Offline

#1337 2014-02-24 20:06:28

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

@S11
Another awesome layout mate - I have the feeling that this one will last for a long time, as it is based on 2b and 5.

@Lockheed
Can you please post your whole version of the script and your conkyrc as well?

Last edited by TeoBigusGeekus (2014-02-24 20:07:03)


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

#1338 2014-02-25 09:08:01

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

1b1

#!/bin/bash

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/pl/pl/tarnow/274457/weather-forecast/274457"
address="http://www.accuweather.com/en/ca/scarborough/m1h/weather-forecast/55049"

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

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"

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

kill -STOP $(pidof conky)
killall wget

wget --save-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/first_days_raw $addr1
wget --load-cookies $HOME/1b1_accuweather_images/cookie -O $HOME/1b1_accuweather_images/last_days_raw $addr2

#Current Conditions - curr_cond file
if [[ -s $HOME/1b1_accuweather_images/curr_cond_raw ]]; then

    egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|var d = '\''|var s = '\''|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |"start">|"finish">' $HOME/1b1_accuweather_images/curr_cond_raw > $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' -e 's/RealFeel/\n/g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*"#">//g' -e 's/^.*<strong class="temp"//g' -e 's/^>//g' -e 's/<span>&deg.*$//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/<\/a>.*$//g' -e 's/\/span> //g' -e 's/var d = //g' -e 's/var s = //g' -e 's/"temp">/\n/g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*"start">//g' -e 's/^.*"finish">//g' -e 's/<li>//g' -e 's/<strong>//g' -e 's/<<span.*$//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/<\/span>//g' -e 's/<\/strong><\/li>//g' -e 's/ "><\/div>//g' -e 's/'\''//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/"><\/div>//g' -e 's/^.*; //g' -e 's/&#.*$//g' -e 's/ i-alarm.*$//g' -e 's/;//g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/Humidity: //g' -e 's/Pressure: //g' -e 's/Cloud Cover: //g' -e 's/UV Index: //g' -e 's/Dew Point: //g' -e 's/Visibility: //g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/">//g' -e 's/\r//g' -e 's/ *$//g' -e 's/mb.*$/mb/g' $HOME/1b1_accuweather_images/curr_cond
    sed -i -e 's/-s\|-xl.*$//g' -e 's/in &.*$/in/g' $HOME/1b1_accuweather_images/curr_cond
    time=$(sed -n 1p $HOME/1b1_accuweather_images/curr_cond)
    if [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
        sed -i 3a- $HOME/1b1_accuweather_images/curr_cond
	fi
    line35=$(sed -n 35p $HOME/1b1_accuweather_images/curr_cond)
    sed -i '35d' $HOME/1b1_accuweather_images/curr_cond
    sed -i 35a$line35 $HOME/1b1_accuweather_images/curr_cond
	cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n 27p $HOME/1b1_accuweather_images/curr_cond).png $HOME/1b1_accuweather_images/cc.png
fi


#First 5days - first_days file 
if [[ -s $HOME/1b1_accuweather_images/first_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/1b1_accuweather_images/first_days_raw
    egrep -i '>Today<|<p>[a-z]|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/1b1_accuweather_images/first_days_raw > $HOME/1b1_accuweather_images/first_days

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

fi


#Last 5days - last_days file 
if [[ -s $HOME/1b1_accuweather_images/last_days_raw ]]; then

    sed -i '/<div class="column-1 clearfix">/,/<div id=\"feature-history\">/!d' $HOME/1b1_accuweather_images/last_days_raw
    egrep -i '>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|realfeel">RealFeel|realfeel">Precipitation' $HOME/1b1_accuweather_images/last_days_raw > $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/^[ \t]*//g' -e 's/^.*icon i-//g' -e 's/^.*"cond">//g' -e 's/>Lo</\n/g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/ "><\/div>//g' -e 's/"><\/div>//g' -e 's/^.*"temp">//g' -e 's/<span>&deg.*$//g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/^.*"#">//g' -e 's/\/span> //g' -e 's/^.*>Precipitation //g' -e 's/^.*; //g' $HOME/1b1_accuweather_images/last_days
    sed -i -e 's/&#.*$//g' -e 's/<.*$//g' -e 's/ i-alarm.*$//g' -e 's/\r//g' -e 's/ *$//g' $HOME/1b1_accuweather_images/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/1b1_accuweather_images/last_days
    sed -i 's/-s\|-l\|-xl.*$//g' $HOME/1b1_accuweather_images/last_days
    for (( i=2; i<=22; i+=5 ))
	  do
	      cp $HOME/1b1_accuweather_images/Forecast_Images/$(sed -n ${i}p $HOME/1b1_accuweather_images/last_days).png $HOME/1b1_accuweather_images/last_$i.png
	  done

fi

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

kill -CONT $(pidof conky)

.conkyrc_1b1_int

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
 
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 355 500
maximum_width 357

override_utf8_locale yes

# Draw shades?
draw_shades no
 
# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # 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 yes

# 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

TEXT
${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texecpi 500 bash $HOME/1b1_accuweather_images/1b1}
${image $HOME/1b1_accuweather_images/cc.png -p 0,60 -s 180x108}
${font Arial:size=10}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/messages}${font}${goto 200}${color ffe595}TEMP: $color${alignr}${execpi 600 sed -n '29p' $HOME/1b1_accuweather_images/curr_cond}°C (${execpi 600 sed -n '30p' $HOME/1b1_accuweather_images/curr_cond}°C)
${goto 200}${color ffe595}WIND: $color${alignr}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/curr_cond} ${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}HUM: $color${alignr}${execpi 600 sed -n '33p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '37p' $HOME/1b1_accuweather_images/curr_cond}°C
${goto 200}${color ffe595}PR: $color${alignr}${execpi 600 sed -n '34p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}VISIB: $color${alignr}${execpi 600 sed -n '38p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}CLOUD COVER: $color${alignr}${execpi 600 sed -n '35p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}UV INDEX: $color${alignr}${execpi 600 sed -n '36p' $HOME/1b1_accuweather_images/curr_cond} 
${goto 200}${color ffe595}S/M RISE: $color${alignr}${execpi 600 sed -n '39p' $HOME/1b1_accuweather_images/curr_cond}/${execpi 600 sed -n '41p' $HOME/1b1_accuweather_images/curr_cond}
${goto 200}${color ffe595}S/M SET: $color${alignr}${execpi 600 sed -n '40p' $HOME/1b1_accuweather_images/curr_cond}/${execpi 600 sed -n '42p' $HOME/1b1_accuweather_images/curr_cond}
${hr 1}
${goto 50}${font Arial:size=10}${color ffe595}TODAY$color$font${goto 230}${font Arial:size=10}${color ffe595}TONIGHT$color$font${image $HOME/1b1_accuweather_images/tod.png -p 0,235 -s 120x72}${image $HOME/1b1_accuweather_images/ton.png -p 190,235 -s 120x72}

${goto 145}${execpi 600 sed -n '26p' $HOME/1b1_accuweather_images/first_days}°C${goto 340}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/first_days}°C
${goto 140}(${execpi 600 sed -n '27p' $HOME/1b1_accuweather_images/first_days}°C)${goto 335}(${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/first_days}°C)


${font Arial:size=8}${execpi 600 sed -n '2p' $HOME/1b1_accuweather_images/messages}${goto 195}${execpi 600 sed -n '3p' $HOME/1b1_accuweather_images/messages}$font
Chance of Precip: ${execpi 600 sed -n '28p' $HOME/1b1_accuweather_images/first_days}${goto 195}Chance of Precip: $color${execpi 600 sed -n '33p' $HOME/1b1_accuweather_images/first_days}
${hr 1}
${font Arial:size=9}${goto 40}${color ffe595}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/first_days}${goto 145}${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/first_days}${goto 270}${execpi 600 sed -n '15p' $HOME/1b1_accuweather_images/first_days}$color${font}${image $HOME/1b1_accuweather_images/6.png -p 0,384 -s 90x54}

${font Arial:size=8}${goto 100}${execpi 600 sed -n '8p' $HOME/1b1_accuweather_images/first_days}°C${goto 210}${execpi 600 sed -n '13p' $HOME/1b1_accuweather_images/first_days}°C${goto 330}${execpi 600 sed -n '18p' $HOME/1b1_accuweather_images/first_days}°C
${goto 100}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/first_days}°C${goto 210}${execpi 600 sed -n '14p' $HOME/1b1_accuweather_images/first_days}°C${goto 330}${execpi 600 sed -n '19p' $HOME/1b1_accuweather_images/first_days}°C${image $HOME/1b1_accuweather_images/11.png -p 110,384 -s 90x54}${image $HOME/1b1_accuweather_images/16.png -p 230,384 -s 90x54}

${execpi 600 sed -n '4p' $HOME/1b1_accuweather_images/messages}${goto 135}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/messages}${goto 255}${execpi 600 sed -n '6p' $HOME/1b1_accuweather_images/messages}

${font Arial:size=9}${goto 40}${color ffe595}${execpi 600 sed -n '20p' $HOME/1b1_accuweather_images/first_days}${goto 145}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/last_days}${goto 270}${execpi 600 sed -n '6p' $HOME/1b1_accuweather_images/last_days}$color${font}${image $HOME/1b1_accuweather_images/21.png -p 0,490 -s 90x54}

${font Arial:size=8}${goto 100}${execpi 600 sed -n '23p' $HOME/1b1_accuweather_images/first_days}°C${goto 210}${execpi 600 sed -n '4p' $HOME/1b1_accuweather_images/last_days}°C${goto 330}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/last_days}°C
${font Arial:size=8}${goto 100}${execpi 600 sed -n '24p' $HOME/1b1_accuweather_images/first_days}°C${goto 210}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/last_days}°C${goto 330}${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/last_days}°C${image $HOME/1b1_accuweather_images/last_2.png -p 110,490 -s 90x54}${image $HOME/1b1_accuweather_images/last_7.png -p 230,490 -s 90x54}

${execpi 600 sed -n '7p' $HOME/1b1_accuweather_images/messages}${goto 135}${execpi 600 sed -n '8p' $HOME/1b1_accuweather_images/messages}${goto 255}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/messages}

${font Arial:size=9}${goto 40}${color ffe595}${execpi 600 sed -n '11p' $HOME/1b1_accuweather_images/last_days}${goto 145}${execpi 600 sed -n '16p' $HOME/1b1_accuweather_images/last_days}${goto 270}${execpi 600 sed -n '21p' $HOME/1b1_accuweather_images/last_days}$color${font}${image $HOME/1b1_accuweather_images/last_12.png -p 0,595 -s 90x54}

${font Arial:size=8}${goto 100}${execpi 600 sed -n '14p' $HOME/1b1_accuweather_images/last_days}°C${goto 210}${execpi 600 sed -n '19p' $HOME/1b1_accuweather_images/last_days}°C${goto 330}${execpi 600 sed -n '24p' $HOME/1b1_accuweather_images/last_days}°C
${font Arial:size=8}${goto 100}${execpi 600 sed -n '15p' $HOME/1b1_accuweather_images/last_days}°C${goto 210}${execpi 600 sed -n '20p' $HOME/1b1_accuweather_images/last_days}°C${goto 330}${execpi 600 sed -n '25p' $HOME/1b1_accuweather_images/last_days}°C${image $HOME/1b1_accuweather_images/last_17.png -p 110,595 -s 90x54}${image $HOME/1b1_accuweather_images/last_22.png -p 230,595 -s 90x54}

${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/messages}${goto 135}${execpi 600 sed -n '11p' $HOME/1b1_accuweather_images/messages}${goto 255}${execpi 600 sed -n '12p' $HOME/1b1_accuweather_images/messages}

I think that maybe the data file that is created by pulling the data from accuweather, is never being updated, even if the conky is restarted.

Last edited by lockheed (2014-02-25 09:10:05)

Offline

#1339 2014-02-25 13:00:17

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

Hmmm..., I can't see anything wrong with it...
Can you run in from a terminal

conky -c $HOME/1b1_accuweather_images/.conkyrc_1b1_int

and post any error messages you get?


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

#1340 2014-02-25 13:04:09

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

conky -c $HOME/1b1_accuweather_images/.conkyrc_1b1_int

Offline

#1341 2014-02-25 13:04:36

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/en/us/los-angeles-ca/90012/weather-forecast/347625"
#address="http://www.accuweather.com/en/ca/scarborough/m1h/weather-forecast/55049"
address="http://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"

Offline

#1342 2014-02-25 13:08:55

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Ok, I fond the problem. There was a typo: texecpi instead of execpi

However, I still have problem with scrambled screen on 75% of conky runs.

And then there is the next problem:

When I change
address="http://www.accuweather.com/en/ca/scarborough/m1h/weather-forecast/55049"
to
address="http://www.accuweather.com/pl/ca/scarborough/m1h/weather-forecast/55049"

then I no longer get any data, because apparently the data bit names in other languages differ and so the script can't see them.

Last edited by lockheed (2014-02-25 13:09:28)

Offline

#1343 2014-02-25 13:10:05

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

Conky: unknown variable texecpi

There's the culprit - it's so subtle, one can read it a 100 times without noticing it.
Change this line

${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texecpi 500 bash $HOME/1b1_accuweather_images/1b1}

to

${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texeci 500 bash $HOME/1b1_accuweather_images/1b1}

Notice the change from texecpi (non existent command) to texeci (valid conky command) - that's why the script was never run in your system.

EDIT: I've just seen your latest post - the script is only meant for English speaking users.
Some years ago I used to give the script in a few other languages, but the whole thing was very difficult to maintain...

Last edited by TeoBigusGeekus (2014-02-25 13:13:33)


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

#1344 2014-02-25 13:11:09

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

Conky: unknown variable texecpi

Last edited by Sector11 (2014-02-25 13:15:03)

Offline

#1345 2014-02-25 13:14:55

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

Last edited by TeoBigusGeekus (2014-02-25 13:16:10)


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

#1346 2014-02-25 13:16:03

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Offline

#1347 2014-02-25 13:20:32

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

Offline

#1348 2014-02-25 13:21:10

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 963

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

    egrep -i '"detail-tab-panel |>Today<\/a>|>Tonight<\/a>|>Early AM<\/a>|>Overnight<\/a>|>Mon<\/a>|>Tue<\/a>|>Wed<\/a>|>Thu<\/a>|>Fri<\/a>|>Sat<\/a>|>Sun<\/a>|icon i-|"cond"|"temp"|var d = '\''|var s = '\''|Humidity: |Pressure: |Cloud Cover: |UV Index: |Dew Point: |Precipitation(1 hr): |Visibility: |"start">|"finish">' $HOME/1b1_accuweather_images/curr_cond_raw > $HOME/1b1_accuweather_images/curr_cond

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

#1349 2014-02-25 13:45:14

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

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

 25 Feb 14 | 10:21:49 ~
    $ sho poedit
Package: poedit                          
State: installed
Automatically installed: no
Version: 1.5.4-1
Priority: optional
Section: text
Maintainer: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Architecture: amd64
Uncompressed Size: 3,508 k
Depends: libc6 (>= 2.2.5), libdb5.1++, libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.12.0), libgtk2.0-0 (>= 2.8.0),
         libgtkspell0 (>= 2.0.10), libstdc++6 (>= 4.1.1), libwxbase2.8-0 (>= 2.8.12.1), libwxgtk2.8-0 (>= 2.8.12.1),
         gettext
Description: gettext catalog editor
 Poedit is an editor for gettext catalogs (.po files). It aims to provide a convenient approach to editing catalogs. It
 features UTF-8 support, fuzzy and untranslated records highlighting, whitespace highlighting, references browser,
 header editing and can be used to create new catalogs or update existing catalogs from source code with a single
 click. It is built with wxWidgets toolkit.
Homepage: http://www.poedit.net/

 
 25 Feb 14 | 10:22:02 ~
    $ 

Last edited by Sector11 (2014-02-26 15:59:06)

Offline

Be excellent to each other!

#1350 2014-02-25 16:30:12

lockheed
Member
Registered: 2013-06-13
Posts: 40

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

Thanks guys for your help. It is a nice forum.

By the way, I fixed the transparency problem with this:

own_window yes
own_window_type normal
own_window_argb_visual yes
own_window_argb_value 255
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo