SEARCH

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

You are not logged in.

#826 2013-04-23 22:06:05

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

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

morfik wrote:

Conkys are loaded, but sometimes there are no values in one of them.

Yeap. That's exactly how it would behave: the script doesn't have the time to finish collecting info and conky displays the (empty) values.
The only thing you could do about it is to take away the execution of the scripts from the conkyrc files and have them executed separately with a cron job.

morfik wrote:

As to the #4 script, it looks better, but one day is missing

Don't worry about it. The script displays either 9 or 10 days forecast, depending on the time of the day. Later tonight a 10nth day will appear.

morfik wrote:

BTW: where is the moon? Is it the only one entry with value "Waxing Gibbous"? I thought it would be an image or something. smile

That's it I'm afraid, unless you could give me all weather.com's moon conditions (ie. full, half, waxing gibbous, etc.)
I tried to find them reading the page's source but nothing came out.


Sector11 wrote:
TeoBigusGeekus wrote:

Looking forward for any feedback.

Consider them being played with.  big_smile

Thanks mate!

Last edited by TeoBigusGeekus (2013-04-23 22:07:36)


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!

#827 2013-04-23 22:39:17

morfik
Member
Registered: 2013-04-21
Posts: 25

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

I don't see any, but on accuweather.com there is a pretty nice moon info, I mean Full, Last, New and First dates + images. Maybe could you add this moon feature to the 1b1 script? Anyway, I will stay with those two script (1c, 1b1), but it would be really nice to see some of the moon info there.

EDIT:

What about removing

killall wget

from both scripts?

I restarted 10 times all conkys and all are perfectly loaded. What is the purpose of that piece in the code?

Last edited by morfik (2013-04-23 22:51:49)

Offline

#828 2013-04-24 06:31:57

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

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

From the 1rst page:

All the scripts (I think, check it out yourselves) use the command
killall wget
at the beginning of the script. The command, which kills all instances of wget, is a reminiscent of an older version of the scripts that used curl instead of wget.
Curl had the annoying habit of leaving unfinished, zombie processes after its every call; therefore I added a "killall curl" at the beginning of every script.
Later, I changed curl with wget, so the command became "killall wget"; not that wget behaves like curl, in terms of zombie processes, but better save than sorry...
If you use wget for downloading, these scripts are gonna kill it; you can either remove the command from the scripts or use curl instead.

You can safely remove this command, it's just added for extra security.

As for the moon, where in the accuweather page is there moon info?
Can you give me a link?


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

#829 2013-04-24 11:14:50

morfik
Member
Registered: 2013-04-21
Posts: 25

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

I thought you know where it is smile
It's for my location -- http://www.accuweather.com/en/pl/zyrard … her/264812

Offline

#830 2013-04-24 13:52:54

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)

I see them as working perfect - as you showed.

IMHO: Package them now - but what do I know.
Some new person sees post #1 grabs the files and doesn't know about this fix and it's OOPS!

acnN8NLM.jpg

Now it's time to play - new layouts and have some conky fun again.

Last edited by Sector11 (2013-04-24 16:54:50)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#831 2013-04-24 16:54:02

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)

Hey Teo .... remember this one!  It now has the 23 Apr 2013 weather.com International script running it.

Teo_weather_Sector11.jpg

WARNING:  Check the file paths for this conky: /media/5/Conky/TeoWeatherClock/

Will post code for the conky on the right, delete everything under

${color}${alignc}Updated: ${execpi 600 sed -n '1p' /media/5/Conky/TeoWeatherClock/updated}

and above TEXT comment out:

## lua_load /media/5/Conky/LUA/mounted.lua

Now remove the first part of the line under TEXT shown stuck out:

TEXT
${lua get_mounted_data 3}${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\

to get the conky on the left.

Teo_Clock_2.conky

# killall conky && conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock_2.conky &
#
# Thank you:
# TeoBigusGeekus - for his wonderful weather scripts
# - - This one is: Conky_WeatherCom_metric - dated 23 Apr 2013
# Chronograph LUA - Sector11 - See LUA for more (originally 4 clocks by  mrpeachy)
# v9000 LUA weather - mrpeachy
# background - londonali1010, mrpeachy, dk75
# mounted.lua - mrpeachy

###  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 Weather 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 910  ## 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  #########################################################
draw_shades no #yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 C2CCFF # Not a clue - a blue #778899 #119 136 153	LightSlateGray
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 B22222 #178  34  34	FireBrick
#####################################################  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/TeoWeatherClock/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/TeoWeatherClock/LUA/Teo_Weather_Clock.lua
lua_draw_hook_post main
### mount.lua ################################################################
lua_load /media/5/Conky/LUA/mounted.lua
### mount.lua ### INSTRUCTIONS ##############################################
#load script
#lua_load ~/path_to/mounted.lua
# first lua command below text:
# ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
# to get output:
# ${lua mount partition_number data_type}, where partition number is a number
# data_type can be
# total - shows total number of partitions mounted, requires a partition_number
#       - - also, use 1, could be used in an if_match
# fsys - shows filesystem
# size - shows space used in appropriate units
# free - shows free space in appropriate units
# use% - shows % used
# mount - shows mountpoint
################################################################ mount.lua ###
##############################  End LUA Settings  ###
# The all important - How often conky refreshes.
update_interval 1

TEXT
${lua get_mounted_data 3}${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
${texeci 600 bash /media/5/Conky/TeoWeatherClock/weath_com_metric}\
${color5}↑: ${color2}${execpi 600 sed -n '3p' /media/5/Conky/TeoWeatherClock/10days/raw_10}°${alignr 5}\
${color5}T: ${color7}${execpi 600 sed -n '3p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}°
${color5}↓: ${color7}${execpi 600 sed -n '4p' /media/5/Conky/TeoWeatherClock/10days/raw_10}°${alignr 5}\
${color5}±: ${execpi 600 sed -n '5p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}°






${image /media/5/Conky/TeoWeatherClock/now.png -p 111,111 -s 70x70}








${color5}Hum${alignr 5}D.P.${color}
${color7}${execpi 600 sed -n '8p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}${alignr 5}${execpi 600 sed -n '9p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}°${color}
${color5}Pressure${alignr 5}UV Index${color}
${color7}${execpi 600 sed -n '11p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}${alignr 5}${execpi 600 sed -n '12p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}${color}
${font monofur:bold:size=14}${alignc}${execpi 600 sed -n '4p' /media/5/Conky/TeoWeatherClock/RightNow/raw_rn}${font}
${font monofur:bold:size=10}${color5}${execpi 600 sed -n '1p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 84}${execpi 600 sed -n '8p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 145}${execpi 600 sed -n '15p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 207}${execpi 600 sed -n '22p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 267}${execpi 600 sed -n '29p' /media/5/Conky/TeoWeatherClock/10days/raw_10}${color}
${image /media/5/Conky/TeoWeatherClock/10_2.png -p 0,346 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_9.png -p 62,346 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_16.png -p 124,346 -s 50x50}
${image /media/5/Conky/TeoWeatherClock/10_23.png -p 186,346 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_30.png -p 248,346 -s 50x50}

${color2}${execpi 600 sed -n '3p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '4p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 68}${color2}${execpi 600 sed -n '10p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '11p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 130}${color2}${execpi 600 sed -n '17p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '18p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 192}${color2}${execpi 600 sed -n '24p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '25p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 254}${color2}${execpi 600 sed -n '31p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '32p' /media/5/Conky/TeoWeatherClock/10days/raw_10}
${color5}${goto 20}${execpi 600 sed -n '36p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 84}${execpi 600 sed -n '43p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 145}${execpi 600 sed -n '50p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 207}${execpi 600 sed -n '57p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 267}${execpi 600 sed -n '64p' /media/5/Conky/TeoWeatherClock/10days/raw_10}${endif}${color}
${image /media/5/Conky/TeoWeatherClock/10_37.png -p 0,415 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_44.png -p 62,415 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_51.png -p 124,415 -s 50x50}\
${image /media/5/Conky/TeoWeatherClock/10_58.png -p 186,415 -s 50x50}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${image /media/5/Conky/TeoWeatherClock/10_58.png -p 248,415 -s 50x50}${endif}


${color2}${execpi 600 sed -n '3p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '4p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 68}${color2}${execpi 600 sed -n '10p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '11p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 130}${color2}${execpi 600 sed -n '17p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '18p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${goto 192}${color2}${execpi 600 sed -n '24p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '25p' /media/5/Conky/TeoWeatherClock/10days/raw_10}\
${if_existing /home/sector11/Conky_WeatherCom_metric/10days/10days_OK}${goto 254}${color2}${execpi 600 sed -n '31p' /media/5/Conky/TeoWeatherClock/10days/raw_10} ${color7}${execpi 600 sed -n '32p' /media/5/Conky/TeoWeatherClock/10days/raw_10}${endif}
${color}${alignc}Updated: ${execpi 600 sed -n '1p' /media/5/Conky/TeoWeatherClock/updated}
 ${color1}${hr}
 ${color3}With ${color}${nodename} ${color3}for the past: ${color}${uptime_short}
 ${color3}Kernel: ${color}${kernel}
 ${color3}CPU ${color7}1: ${color}${if_match ${cpu cpu1} < 10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100} ${cpu cpu1}\
${else}${cpu cpu1}\
${endif}${endif} %\
 ${color7}2: ${color}${if_match ${cpu cpu2} < 10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}0${cpu cpu2}\
${else}${cpu cpu2}\
${endif}${endif} %\
 ${color7}3: ${color}${if_match ${cpu cpu3} < 10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100} ${cpu cpu3}\
${else}${cpu cpu3}\
${endif}${endif} %\
 ${color7}Avg: ${color}${if_match ${cpu cpu0} < 10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100} ${cpu cpu0}\
${else}${cpu cpu0}\
${endif}${endif} %
 ${color3}CPU: ${color}${platform f71882fg.2560 temp 1}°${goto 90}${color3}SDA: ${color}${execi 15 hddtemp -n /dev/sda}°${goto 167}${color3}GPU: ${color}${nvidia temp}°${goto 245}${color3}MB: ${color}${platform f71882fg.2560 temp 2}°
 ${color3}RAM: ${color}${mem} / ${memmax} / ${memperc}% ${alignr 5}${color3}Swap: ${color}${swap} ${color}/ ${color}${swapmax}
 ${color3}eth-0 ${color7}Down: ${color}${downspeedf eth0}${goto 200}${color7}Up:  ${color}${upspeedf eth0}
 ${color1}${hr}
 ${font monofur:bold:size=12}${color1}1 CAD =${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/CAD/rss.xml | grep "Argentine Peso" | cut -c 40-47}\
${alignr 5}${color1}1 ARS =${color7} ${execi 1800 wget --timeout=1.0 --tries=1 -O - http://themoneyconverter.com/rss-feed/ARS/rss.xml | grep "Canadian Dollar" | cut -c 39-45}
 ${color1}${stippled_hr 5 1}
${goto 15}${diskiograph 50,285 FF0000 0000FF -t -l}${goto 15}${color0}${cpubar cpu4 50,285}${color}\
${voffset -35}${goto 80}SDA: R: ${diskio_read /dev/sda}
${goto 80}     W: ${diskio_write /dev/sda}

${goto 70}${color LightSlateGray}${fs_bar /}${goto 70}${color0}${cpubar cpu4}${color}
${voffset -28} /Root:   ${fs_size /}${goto 220}${fs_used_perc /}%
${goto 70}${color LightSlateGray}${fs_bar /home}${goto 70}${color0}${cpubar cpu4}${color}
${voffset -28} /Home:   ${fs_size /home}${goto 220}${fs_used_perc /home}%
${goto 70}${color LightSlateGray}${fs_bar /media/5}${goto 70}${color0}${cpubar cpu4}${color}
${voffset -28}  /M/5:   ${fs_size /media/5}${goto 220}${fs_used_perc /media/5}%

 ${color1}${hr}
 ${color6}FSYS${color} = ${lua mount 1 total}${goto 90}${color8}SIZE${goto 130}${color7}FREE${goto 170}${color1}USED${goto 210}${color}MOUNT
${voffset -5} ${color1}${stippled_hr 5 1}
${font monofur:bold:size=10} ${color6}${lua mount 1 fsys 9}${goto 90}${color8}${lua mount 1 size}${goto 130}${color7}${lua mount 1 free}${goto 170}${color1}${lua mount 1 use%}${goto 210}${color}${lua mount 1 mount}
 ${color6}${lua mount 5 fsys 9}${goto 90}${color8}${lua mount 5 size}${goto 130}${color7}${lua mount 5 free}${goto 170}${color1}${lua mount 5 use%}${goto 210}${color}${lua mount 5 mount}
 ${color6}${lua mount 2 fsys 9}${goto 90}${color8}${lua mount 2 size}${goto 130}${color7}${lua mount 2 free}${goto 170}${color1}${lua mount 2 use%}${goto 210}${color}${lua mount 2 mount}
 ${color6}${lua mount 4 fsys 9}${goto 90}${color8}${lua mount 4 size}${goto 130}${color7}${lua mount 4 free}${goto 170}${color1}${lua mount 4 use%}${goto 210}${color}${lua mount 4 mount}
 ${color6}${lua mount 3 fsys 9}${goto 90}${color8}${lua mount 3 size}${goto 130}${color7}${lua mount 3 free}${goto 170}${color1}${lua mount 3 use%}${goto 210}${color}${lua mount 3 mount}
+${color6}${lua mount 6 fsys 9}${goto 90}${color8}${lua mount 6 size}${goto 130}${color7}${lua mount 6 free}${goto 170}${color1}${lua mount 6 use%}${goto 210}${color}${lua mount 6 mount}
+${color6}${lua mount 7 fsys 9}${goto 90}${color8}${lua mount 7 size}${goto 130}${color7}${lua mount 7 free}${goto 170}${color1}${lua mount 7 use%}${goto 210}${color}${lua mount 7 mount}
+${color6}${lua mount 8 fsys 9}${goto 90}${color8}${lua mount 8 size}${goto 130}${color7}${lua mount 8 free}${goto 170}${color1}${lua mount 8 use%}${goto 210}${color}${lua mount 8 mount}
 ${color1}${hr}

/media/5/Conky/TeoWeatherClock/LUA/Teo_Weather_Clock.lua  ( check your path )

--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
 21 Jun 2012 - Chronograph modifications by Sector11
 22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
 12 Nov 2012 - memory leak plugged - mrpeachy
 14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
 26 Nov 2012 - The Clock - Sector11 (small version)

use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT

 -- INDEX use search|find with: -- ### sonething ###

 -- ### CLOCK POSITION - AND DEFAULTS ###
 -- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
 --     See lines 39 to 41 for overall size changes
 -- ### START DIAL B ### Day Names Dial ###
 --     See Lines 77 - 79 and 145 for changes
 -- ### START DIAL C ### Month Names Dial ###
 --     See Lines 143 -145 and 192 for changes
 -- ### START DIAL D ### Day Numbers Dial ###
 --     See Lines 226 & 257 for  changes
 -- ### START CLOCK A ###
 --     See Lines  &  and 456 & 483 changes
 -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
 -- CLOCK A HOUR HAND
 -- CLOCK A MINUTE HAND SETUP
 -- CLOCK A SECOND HAND SETUP
 -- PART SECOND HAND Lines: 503 519, 531

NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
       over the other dials.
]]

require 'cairo'
 -- ### CLOCK POSITION - AND DEFAULTS ##########################################
local init={
center_x=153, --from 135 = +40
center_y=153, --from 135
radius=140,
lang="English", -- English French Greek Spanish
hour=12, -- 12 | 24
second=true, --true | false - Seconds: dots and numbers IF 12HR
line=true, -- true | false - Part Second Hand
handday=false, -- DAY NAME hand - true or false
--handdaynum=false, -- DAY NUMBER hand - true or false
handmonth=false, -- MONTH NAME hand - true or false
color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
alpha=1 --alpha for day, day number and month IF NO SECOND HAND
}

 -- ONLY NEED ONE COPY OF THIS FUNCTION
function rgb_to_r_g_b(col,alp)
  return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)

function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)

 -- ### CLOCK 12|24 HR SELECTOR ############################
local clock_type_A=init.hour
 -- ############################ CLOCK 12|24 HR SELECTOR ###

 -- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
--local clock_border_width=0
 -- set color and alpha for clock border
--local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
 -- gap from clock border to minute marks
local b_to_m=0
 -- #################### SET BORDER OPTIONS FOR "CLOCKS" ###

 -- ### START DIAL B ### Day Names Dial ####################
 -- DIAL POSITION
local center_x=init.center_x
local center_y=init.center_y
local radius=42
 -- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
 -- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end

local day_number=tonumber(os.date("%w"))
if init.handday == true then
  for i=1,7 do
 -- work out points
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,7 do -- working out points
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active day names
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
 -- INNER POINTS POSITION, radius smaller than text circle
  local radius=27
  for i=1,7 do
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
 -- ######################################### END DIAL B ###

 -- ### START DIAL C ### Month Names Dial ##################
 -- DIAL POSITION
local center_x=init.center_x --(+85)
local center_y=init.center_y
local radius=73
 -- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
 -- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end

local this_month=tonumber(os.date("%m"))
if init.handmonth == true then
  for i=1,12 do
 -- OUTER POINTS POSTION FOR -- ### START DIAL C ## TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,1) -- active month colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active month names
    end
 -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
 -- INNER POINTS POSITION, radius smaller than text circle
  local radius=58
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
	 else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active month names
    end
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
 -- ######################################### END DIAL C ###

 -- ### START DIAL D ### Day Numbers Dial ##################
 -- GET NUMBER OF DAYS IN CURRENT MONTH
 -- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
  febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
  febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
 -- MONTH TABLE to get number of days
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
 -- TEXT positioning DAY #'s
local center_x=init.center_x
local center_y=init.center_y
local radius=105
cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
local this_day=tonumber(os.date("%d"))
  for i=1,number_days do
 -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
    text=string.format("%02d",i) --formats numbers to double digits
    elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
    text=string.format("%02d",i) --formats numbers to double digits
    else
    text=""
    end --odd even matching
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
	if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,1) -- active colour
	else
	cairo_set_source_rgba (cr,1,1,1,0.35) -- dim inactive numbers
	end
     cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
     cairo_show_text (cr, text)
     cairo_stroke (cr)
  end
 -- INNER POINTS POSITION, radius smaller than text circle
  local radius=90
  for i=1,number_days do
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
	if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,1) -- active colour
	else
	cairo_set_source_rgba (cr,1,1,1,0.35) -- dim the points
	end
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
 -- ######################################### END DIAL D ###

 -- ### START CLOCK A ######################################
 -- SET MARKS ###
 -- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
 -- set mark length
local m_length_A=0 -- doesn't work but can't delete
 -- set mark width
local m_width_A=0 -- doesn't work but can't delete
 -- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
 -- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete

 -- SETUP HOUR HANDS ###
 -- CLOCK A HOUR HAND
hh_length_A=90
 -- set hour hand width
hh_width_A=4
 -- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
 -- set hour hand color
 -- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work

 -- SETUP MINUTE HANDS ###
 -- CLOCK A MINUTE HAND SETUP
 -- set length of minute hand
mh_length_A=123
 -- set minute hand width
mh_width_A=2
 -- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
 -- set minute hand color
--mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work

 -- SETUP SECOND HAND ###
 -- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
 -- set length of seconds hand -- yes I know it is commented out!
--sh_length_A=150
 -- set hour hand width
--sh_width_A=2
 -- set hour hand line cap
--sh_cap=CAIRO_LINE_CAP_ROUND
 -- set seconds hand color
--shr,shg,shb,sha=1,0,0,1 -- fully opaque red

 -- PART SECOND HAND
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
  local arc=(math.pi/180)*((360/60)*seconds)
  --calculate point 1
  local radius1=120
  local x1=0+radius1*math.sin(arc)
  local y1=0-radius1*math.cos(arc)
  --calculate point 2
  local radius2=130
  local x2=0+radius2*math.sin(arc)
  local y2=0-radius2*math.cos(arc)
  --draw line connecting points
  cairo_move_to (cr, center_x+x1,center_y+y1)
  cairo_line_to (cr, center_x+x2, center_y+y2)
  cairo_set_source_rgba (cr,255/255,0/255,0/255,1) -- PART SECOND HAND
  cairo_stroke (cr)
end

 -- CLOCK A ### 12 HR TIME ###
 -- CLOCK SETTINGS
clock_radius=0 --does not work
clock_centerx=init.center_x -- centre of Clock hands
clock_centery=init.center_y -- centre of Clock hands
 -- DRAWING CODE
 -- DRAW MARKS
 -- stuff that can be moved outside of the loop, needs only be set once
 -- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
 -- set line cap type
cairo_set_line_cap  (cr, m_cap)
 -- set line width
cairo_set_line_width (cr,m_width_A)
 -- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
 -- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
 -- drawing code using the value of i to calculate degrees
 -- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
 -- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
 -- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
 -- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
 -- draw the line
cairo_stroke (cr)
end -- of for loop
 -- HOUR MARKS -- ???????????????????????????????????????????????????????????????
 -- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
 -- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
 -- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
 -- convert minutes to seconds
m_to_s=minutes*60
 -- get current seconds
seconds=tonumber(os.date("%S"))
 -- DRAW HOUR HAND ###
 -- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
 -- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
 -- set radius to calculate hand points
radius=hh_length_A
 -- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
 -- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
 -- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
 -- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Hour Hand ================
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
 -- DRAW MINUTE HAND
 -- get minutes and seconds just as seconds
msecs=m_to_s+seconds
 -- calculate degrees for each second
msec_degs=msecs*0.1
 -- set radius to calculate hand points
radius=mh_length_A
 -- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
 -- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
 -- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
 -- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Minute Hand ==============
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
 -- ### CLOCK A ###
local center_x=init.center_x -- Centre of the HR / Min Numbers
local center_y=init.center_y -- Centre of the HR / Min Numbers
local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
cairo_select_font_face (cr, "DS-Digital", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 22)
cairo_set_source_rgba (cr,1,1,1,1.0) -- HR Clock numbers
 -- TABLE OF TEXT -- in order
if init.hour == 12 then
  text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
  for i=1,12 do
 -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_set_source_rgba (cr,1,1,1,1.0) -- colour of HR Numbers
    cairo_stroke (cr)
  end
 -- INNER POINTS POSITION, radius smaller than text circle
  local radius=124 -- 12 HR Clock
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0.50)
    cairo_stroke (cr)
  end
end
if init.hour == 24 then
  text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
  for i=1,24 do
 -- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
 -- INNER POINTS POSITION, radius smaller than text circle
  local radius=124 -- 24 HR Clock
  for i=1,24 do
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0.4)
    cairo_stroke (cr)
  end
end

 -- ############################################################################
 -- POSITION FOR TEXT HOUR NUMBERS
  if init.hour == 12 and init.second == true then
    text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
 -- INNER POINTS POSITION, radius smaller than text circle
    cairo_set_source_rgba (cr,1,1,1,0.07) -- does not work -- settings moved
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    for i=1,60 do
      local radius=124 -- dots for seconds Clock A (12 dial)
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      if seconds == i-1 then
        cairo_set_source_rgba (cr,255/255,0/255,0/255,0.07) -- does not work - settings moved
      else
        if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
          cairo_set_source_rgba (cr,0,1,1,1) -- active colour
        else
          cairo_set_source_rgba (cr,0,1,1,0.0) -- dots for seconds A Clock
        end
      end
      cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
      cairo_stroke (cr)
    end
    radius=radius-3
    cairo_set_font_size (cr, 10)
    for i=1,60 do
 -- OUTTER POINTS POSTION FOR TEXT
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
 -- CALCULATE CENTRE OF TEXT
      local text=text_days[i]--gets text from table
      if seconds == tonumber(text) then
      cairo_set_source_rgba (cr,0,1,1,1.0) -- active colour
      else
        cairo_set_source_rgba (cr,1,1,1,0.15) -- seconds numbers
      end
      cairo_text_extents(cr,text,extents)
      local width=extents.width
      local height=extents.height
      cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
      cairo_show_text (cr, text)
      cairo_stroke (cr)
    end
  end
 -- ############################################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end -- end main function
--[[ mrpeachy wrote:

    the numbers are drawn using a for loop somewhere, like this

    for i=1,12 do
    calculate position of number
    move_to(x,y)
    show_text(i)
    end

    change it to something like this

    for i=1,12 do
    calculate position of number
      if i==month_number then
      move_to(x,y)
      show_text(month_number)
      else
      move_to(x,y)
      show_text(i)
      end
    end ]]

/media/5/Conky/TeoWeatherClock/LUA/draw-bg.lua ( again check your path )

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf        or "mono"
local tfontsize=caltab.tfs    or 12
local tc=caltab.tc        or 0xffffff
local ta=caltab.ta        or 1
local bfont=caltab.bf        or "mono"
local bfontsize=caltab.bfs    or 12
local bc=caltab.bc        or 0xffffff
local ba=caltab.ba        or 1
local hfont=caltab.hf        or "mono"
local hfontsize=caltab.hfs    or 12
local hc=caltab.hc        or 0xff0000
local ha=caltab.ha        or 1
local spacer=caltab.sp        or " "
local gaph=caltab.gh        or 20
local gapt=caltab.gt        or 15
local gapl=caltab.gv        or 15
local sday=caltab.sd        or 0
local hstyle=caltab.hstyle    or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function#######################################################

/media/5/Conky/LUA/mounted.lua ( again check your path )

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
	for line in file:lines() do
		if string.find(line,"/dev/")~=nil then
		local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
		table.insert(fsys,fs)
		local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(size,sz)
		local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(used,us)
		local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(avail,av)
		local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
		table.insert(uperc,up)
		local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
		table.insert(mount,mn)
		end
	end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
	if c~=0 then
	data=string.sub(data,1,c) or ""
	end
else
data="check data type"
end
return data
end--end main function

That should do it!

Last edited by Sector11 (2013-09-06 16:44:12)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#832 2013-04-24 19:00:34

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

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

morfik wrote:

I thought you know where it is smile
It's for my location -- http://www.accuweather.com/en/pl/zyrard … her/264812

Oh, that one.
Downloading a whole new page in the script just to gather moon info is a bit redundant I think. The script already downloads 3 pages.
If Accuweather put it in one of the downloaded ones, then I'll see what I can do.

@Sector11
Awesome job mate! I'll update the front page link.


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

#833 2013-04-24 20:02:34

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)

TeoBigusGeekus wrote:
morfik wrote:

I thought you know where it is smile
It's for my location -- http://www.accuweather.com/en/pl/zyrard … her/264812

Oh, that one.
Downloading a whole new page in the script just to gather moon info is a bit redundant I think. The script already downloads 3 pages.
If Accuweather put it in one of the downloaded ones, then I'll see what I can do.

Interesting, it only shows the 4 main phases and the date they are on - not what it is right now.  As an example, conkyForecast shows 24 different images for moon phases.  Mind you they are "progressive" from full to new to full again.

Interesting on that page is:
sunrise - hours the sun is up - sunset
moonrise - hours moon is visible - moonset

... don't mind me, I'm just me typing out loud as opposed to thinking out loud.

I may have to have another look at that script because it does various "neighbourhoods" right here in Capital Federal.

Mine:
http://www.accuweather.com/en/ar/genera … st/1228994
http://www.accuweather.com/en/ar/genera … er/1228994

TeoBigusGeekus wrote:

@Sector11
Awesome job mate! I'll update the front page link.

It was easy, already done from an older version of the script, but that "Chronograph" clock has to be my favourite of all the ones I have.  The fact it was "made" for your script is a side benefit.  big_smile

Have to dig some others out of mothballs and light them up as well.  They have to be around here someplace.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#834 2013-04-24 20:32:29

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

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

ANNOUNCEMENT
Weather.com merged the Right Now and Today-Tonight pages and significantly simplified their page layout. Script 4 rebundled.


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

#835 2013-04-24 20:34:43

morfik
Member
Registered: 2013-04-21
Posts: 25

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

Sector11 wrote:

As an example, conkyForecast shows 24 different images for moon phases.

I know, that's why I'm missing for it. But having the four values, I can estimate which phase the moon is in, I mean, how it looks like. And it also have information about the new moon and other phases, and this is what I need. smile I think I have to look for something else that could replace moon phases, but I really don't know what that would be.

Offline

#836 2013-04-24 21:30:37

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)

@ Teo - just grabbed the latest.  Thank you.

@ morfik - while conkyForecast has all those images it only shows the "moon phase image" and "moon phase text" for "today".
Did you manage to get conkyForecast to "estimate" the days ahead?

If you already have cF why not a simple template to call up the moon phase and text for today into Teo's script?

${image [--datatype=MI] -p xx,xx -s xxXxx}
[--datatype=MP]

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#837 2013-04-24 23:30:04

morfik
Member
Registered: 2013-04-21
Posts: 25

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

It actually works!

087b5edd546624d3c949f477e0b38ce2aa.png

Thanks. smile

Offline

#838 2013-04-25 02:48:10

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)

And there we have it, another satisfied customer!   cool

And that combo gives you more than either script does ... merging weather scripts is something I've been doing for a few months now.

I blame Arclance, in a very good way, he did it with his conky and started me thinking that way.

Last edited by Sector11 (2013-04-25 02:54:31)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#839 2013-04-25 08:00:56

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

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

Brilliant job Sector11!!!

@morfik
What's the rush with the moon phase? Are you an astronomer or a werewolf?  lol


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

#840 2013-04-25 09:29:02

morfik
Member
Registered: 2013-04-21
Posts: 25

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

I don't know, I just need to know what the current phase is. smile

Offline

#841 2013-04-25 13:21:21

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)

TeoBigusGeekus wrote:

Brilliant job Sector11!!!

@morfik
What's the rush with the moon phase? Are you an astronomer or a werewolf?  lol

Like I said, don't blame me ... Arclance got me pointed in that direction.  As he explained he went to various sites because no one site has everything and it stands to reason, no one script does everything everyone wants, mix-n-match works just fine.

lol  lol  astronomer or a werewolf  lol  lol love it!

Another thing morfik can do is use "conkyForecast-SunsetSunriseCountdown.py" to get a countdown running since he's running cF.  That's a MUST for the countdown as it does NOT go in the net but calculates from the data that cF collected.  It comes packaged with cF so he has it unless he has a really OLD version of cF

Then he'd know when to start and stop howling  at the moon.  big_smile  (Just kidding you morfik - it's something I like to see as well)

TEXT
${execpi 1800 conkyForecast --refetch --template=/media/5/Conky/templates/srss.template}

srss.template

${image [--datatype=MI] -p 0,0 -s 80x80}

            [--datatype=MP]



${color}Sunrise ${color5}[--datatype=SR] ${color}< ${if_match "${execpi 1 conkyForecast-SunsetSunriseCountdown -t}"=="Sunrise"}${color1}${execpi 1 conkyForecast-SunsetSunriseCountdown}${else}${color5}${execpi 1 conkyForecast-SunsetSunriseCountdown}${endif} ${color}> Sunset: ${color1}[--datatype=SS]${color}

Colour matches ${color5}07:25${color} if the sun is up
Otherwise it matches ${color1}18:17${color}

In one line, no if_match statements:

${execpi 1 conkyForecast-SunsetSunriseCountdown -t} in ${execpi 1 conkyForecast-SunsetSunriseCountdown}


This will change to "Sunset in:"
at the proper time:

${color}Sunrise: ${color5}[--datatype=SR]${color}${goto 160}${execpi 1 conkyForecast-SunsetSunriseCountdown -t} in:
${color}Sunset:  ${color1}[--datatype=SS]${color}${goto 160}${execpi 1 conkyForecast-SunsetSunriseCountdown}

962dd7250820685.jpg

Think we should tell him?  ]:D

EDIT:  DUH!!!!! That should be:

This will change to "Sunrise in:"
at the proper time:

Last edited by Sector11 (2013-04-25 13:23:06)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#842 2013-04-26 13:37:28

ichase
#! CrunchBanger
Registered: 2011-03-16
Posts: 146

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

Teo, S11, Hope all is well.  In reading the thread, I wanted to switch from the accuweather script to the weather.com script because.........It gives more info  big_smile
Everything works great but the personal issue I have is it does not fit on my screen.  I have tried and tried getting the screen resolution on the laptop above 1366x768 (actually wanted it at 1280x1024) but have had no luck what so ever with that.  Actually started a thread on the Arch Linux forums trying to get help with xrandr in Arch.
As you can see in the screenie:
6af652251023920.jpg

How hard would it be, to move the 10 day forcast beside the Right Now / Today/Tonight? section of the weather output?

Not a big deal, if it would take a lot of changing of the code, the accuweather script fits just fine.
c14b06251024977.jpg

Offline

#843 2013-04-26 13:53:37

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)

ichase wrote:

How hard would it be, to move the 10 day forcast beside the Right Now / Today/Tonight? section of the weather output?

Easy - using goto statements - I'll see what I can do....
Back later today or tomorrow.  Busy day today.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#844 2013-04-26 18:45:00

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)

I cheated like crazy ... but I love the results.

I took

/home/sector11/Conky_WeatherCom/.conkyrc_weather_com

and saved it as

/home/sector11/Conky_WeatherCom/conkyrc_weather_com

That left the hidden file as is ... I then changed 8 instances of /home/teo/ to $HOME/ and put

${texeci 600 bash $HOME/Conky_WeatherCom/weath_com}

as the first command after TEXT and changed it to "top_right"

Now, here's where I cheated ... it was a "say I wonder .. what if ..." moment - that worked!

I saved conkyrc_weather_com to two files:

/home/sector11/Conky_WeatherCom/conkyrc_horiz
/home/sector11/Conky_WeatherCom/conkyrc_horiz_2

in /home/sector11/Conky_WeatherCom/conkyrc_horiz I stripped out including the line:

${font Arial:size=12}${color ffe595}10 DAYS FORECAST ${font}(Upd: ${execpi 600 sed -n '2p' $HOME/Conky_WeatherCom/updated})${hr 2}

to the end of the file.  That left "Right Now", "TODAY-TONIGHT" and set it to "top_left"

With /home/sector11/Conky_WeatherCom/conkyrc_horiz_2 I stripped out everything bteween TEXT and that same line and set it to "top_left" and changed gap_x and gap_y to put it beside the top portion.

Next I had to reposition the images (under construction):
admmTpui.jpg
Notice how during development the "extra" Sunday is in there.

The completed conkys:
addJMEjl.jpg

Other than the changes mentioned above - the conkys are Teo's work.

~/Conky_WeatherCom/conkyrc_horiz

# killall conky && conky -c $HOME/Conky_WeatherCom/conkyrc_horiz &
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour brown

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 355 500
maximum_width 355

override_utf8_locale yes

# Draw shades?
draw_shades yes

# 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_inner_margin 9
border_outer_margin 0

# border width
border_width 10

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


# 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
text_buffer_size 2048
# stuff after 'TEXT' will be formatted on screen

TEXT
${texeci 600 bash $HOME/Conky_WeatherCom/weath_com}${font Arial:size=12}${color ffe595}RIGHT NOW${font}(Upd: ${execpi 600 sed -n '1p' $HOME/Conky_WeatherCom/updated}) ${hr 2}
${font Arial:size=10}${execpi 600 sed -n '8p' $HOME/Conky_WeatherCom/Today/raw_td}${font}${goto 170}${color ffe595}TEMP: ${color}${alignr}${execpi 600 sed -n '4p' $HOME/Conky_WeatherCom/Today/raw_td}°F (${execpi 600 sed -n '5p' $HOME/Conky_WeatherCom/Today/raw_td}°F)${image $HOME/Conky_WeatherCom/now.png -p 0,30 -s 120x120}
${goto 170}${color ffe595}PAST 24-hr PRECIP: ${color}${alignr}${execpi 600 sed -n '12p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}WIND: ${color}${alignr}${execpi 600 sed -n '18p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}HUMIDITY: ${color}${alignr}${execpi 600 sed -n '24p' $HOME/Conky_WeatherCom/Today/raw_td}°F
${goto 170}${color ffe595}UV INDEX: ${color}${alignr}${execpi 600 sed -n '30p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}PRESSURE: ${color}${alignr}${execpi 600 sed -n '40p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}DEW POINT: ${color}${alignr}${execpi 600 sed -n '42p' $HOME/Conky_WeatherCom/Today/raw_td}°F
${goto 170}${color ffe595}VISIBILITY: ${color}${alignr}${execpi 600 sed -n '44p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}SUN: ${color}${alignr}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/Today/raw_td}/${execpi 600 sed -n '46p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}MOON: ${color}${alignr}${execpi 600 sed -n '47p' $HOME/Conky_WeatherCom/Today/raw_td}/${execpi 600 sed -n '48p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color ffe595}MOONPHASE: ${color}${alignr}${execpi 600 sed -n '49p' $HOME/Conky_WeatherCom/Today/raw_td}
${color ffe595}NEXT 6h: ${color}${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c1-50}
${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c51-110}

${font Arial:size=12}${color ffe595}TODAY - TONIGHT ${font}(Upd: ${execpi 600 sed -n '1p' $HOME/Conky_WeatherCom/updated}) ${hr 2}
${font Arial:size=11}${color ffe595}${goto 75}Today${goto 240}Tonight${image $HOME/Conky_WeatherCom/TD.png -p 25,240 -s 100x100}${image $HOME/Conky_WeatherCom/TN.png -p 190,240 -s 100x100}${font}${color}


${goto 155}${execpi 600 sed -n '6p' $HOME/Conky_WeatherCom/Today/raw_td}°F${goto 320}${execpi 600 sed -n '7p' $HOME/Conky_WeatherCom/Today/raw_td}°F



${execpi 600 sed -n '9p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 200}${execpi 600 sed -n '10p' $HOME/Conky_WeatherCom/Today/raw_td}
${color ffe595}${execpi 600 sed -n '13p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '14p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 200}${color ffe595}${execpi 600 sed -n '15p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '16p' $HOME/Conky_WeatherCom/Today/raw_td}
${color ffe595}${execpi 600 sed -n '19p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '20p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 200}${color ffe595}WIND ${color}${execpi 600 sed -n '22p' $HOME/Conky_WeatherCom/Today/raw_td}
${color ffe595}${execpi 600 sed -n '25p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '26p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 200}${color ffe595}HUMIDITY ${color}${execpi 600 sed -n '28p' $HOME/Conky_WeatherCom/Today/raw_td}
${color ffe595}${execpi 600 sed -n '31p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '32p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 200}${color ffe595}UV-INDEX ${color}-
${execpi 600 sed -n '36p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c1-30}${goto 200}${execpi 600 sed -n '38p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c1-30}
${execpi 600 sed -n '36p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c31-60}${goto 200}${execpi 600 sed -n '38p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c31-60}
${execpi 600 sed -n '36p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c61-90}${goto 200}${execpi 600 sed -n '38p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c61-90}

~/Conky_WeatherCom/conkyrc_horiz_2

# killall conky && conky -c $HOME/Conky_WeatherCom/conkyrc_horiz_2 &
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour brown

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 355
maximum_width 355

override_utf8_locale yes

# Draw shades?
draw_shades yes

# 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_inner_margin 9
border_outer_margin 0

# border width
border_width 10

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


# 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 385
gap_y 30

imlib_cache_size 0
text_buffer_size 2048
# stuff after 'TEXT' will be formatted on screen

TEXT
${font Arial:size=12}${color ffe595}10 DAYS FORECAST ${font}(Upd: ${execpi 600 sed -n '2p' $HOME/Conky_WeatherCom/updated})${hr 2}
${font Arial:size=11}${color ffe595}${goto 65}${execpi 600 sed -n '1p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 175}${execpi 600 sed -n '8p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 285}${execpi 600 sed -n '15p' $HOME/Conky_WeatherCom/10days/raw_10}${color}\
${image $HOME/Conky_WeatherCom/10_2.png -p 20,30 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_9.png -p 130,30 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_16.png -p 240,30 -s 70x70}

${goto 115}${execpi 600 sed -n '3p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 225}${execpi 600 sed -n '10p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 335}${execpi 600 sed -n '17p' $HOME/Conky_WeatherCom/10days/raw_10}${font}
${goto 116}${execpi 600 sed -n '4p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 226}${execpi 600 sed -n '11p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 336}${execpi 600 sed -n '18p' $HOME/Conky_WeatherCom/10days/raw_10}

${execpi 600 sed -n '5p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}${goto 135}${execpi 600 sed -n '12p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}${goto 260}${execpi 600 sed -n '19p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}
${color ffe595}PRECIP:${color}${execpi 600 sed -n '6p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 135}${color ffe595}PRECIP:${color}${execpi 600 sed -n '13p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 260}${color ffe595}PRECIP:${color}${execpi 600 sed -n '20p' $HOME/Conky_WeatherCom/10days/raw_10}
${color ffe595}WIND:${color}${execpi 600 sed -n '7p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 135}${color ffe595}WIND:${color}${execpi 600 sed -n '14p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 260}${color ffe595}WIND:${color}${execpi 600 sed -n '21p' $HOME/Conky_WeatherCom/10days/raw_10}
${color ffe595}${hr 1}
${font Arial:size=11}${goto 65}${execpi 600 sed -n '22p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 175}${execpi 600 sed -n '29p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 285}${execpi 600 sed -n '36p' $HOME/Conky_WeatherCom/10days/raw_10}${color}\
${image $HOME/Conky_WeatherCom/10_23.png -p 20,162 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_30.png -p 130,162 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_37.png -p 240,162 -s 70x70}

${goto 115}${execpi 600 sed -n '24p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 225}${execpi 600 sed -n '31p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 335}${execpi 600 sed -n '38p' $HOME/Conky_WeatherCom/10days/raw_10}${font}
${goto 116}${execpi 600 sed -n '25p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 226}${execpi 600 sed -n '32p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 336}${execpi 600 sed -n '39p' $HOME/Conky_WeatherCom/10days/raw_10}

${execpi 600 sed -n '26p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}${goto 135}${execpi 600 sed -n '33p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}${goto 260}${execpi 600 sed -n '40p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-18}
${color ffe595}PRECIP:${color}${execpi 600 sed -n '27p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 135}${color ffe595}PRECIP:${color}${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 260}${color ffe595}PRECIP:${color}${execpi 600 sed -n '41p' $HOME/Conky_WeatherCom/10days/raw_10}
${color ffe595}WIND:${color}${execpi 600 sed -n '28p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 135}${color ffe595}WIND:${color}${execpi 600 sed -n '35p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 260}${color ffe595}WIND:${color}${execpi 600 sed -n '42p' $HOME/Conky_WeatherCom/10days/raw_10}
${color ffe595}${hr 1}
${font Arial:size=11}${goto 50}${execpi 600 sed -n '43p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 135}${execpi 600 sed -n '50p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 220}${execpi 600 sed -n '57p' $HOME/Conky_WeatherCom/10days/raw_10}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 305}${execpi 600 sed -n '64p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}${color}\
${image $HOME/Conky_WeatherCom/10_44.png -p 0,297 -s 55x55}\
${image $HOME/Conky_WeatherCom/10_51.png -p 85,297 -s 55x55}\
${image $HOME/Conky_WeatherCom/10_58.png -p 170,297 -s 55x55}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}\
${image $HOME/Conky_WeatherCom/10_65.png -p 255,297 -s 55x55}${endif}${font}

${goto 75}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 160}${execpi 600 sed -n '52p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 245}${execpi 600 sed -n '59p' $HOME/Conky_WeatherCom/10days/raw_10}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 330}${execpi 600 sed -n '66p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}
${goto 76}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 160}${execpi 600 sed -n '53p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 245}${execpi 600 sed -n '60p' $HOME/Conky_WeatherCom/10days/raw_10}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 330}${execpi 600 sed -n '67p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}

${execpi 600 sed -n '47p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-12}${goto 95}${execpi 600 sed -n '54p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-12}${goto 180}${execpi 600 sed -n '61p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-12}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${execpi 600 sed -n '68p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c1-12}${endif}
${execpi 600 sed -n '47p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c13-24}${goto 95}${execpi 600 sed -n '54p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c13-24}${goto 180}${execpi 600 sed -n '61p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c13-24}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${execpi 600 sed -n '68p' $HOME/Conky_WeatherCom/10days/raw_10|cut -c13-24}${endif}
${color ffe595}PR:${color}${execpi 600 sed -n '48p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 95}${color ffe595}PR:${color}${execpi 600 sed -n '55p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 180}${color ffe595}PR:${color}${execpi 600 sed -n '62p' $HOME/Conky_WeatherCom/10days/raw_10}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${color ffe595}PR:${color}${execpi 600 sed -n '69p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}
${color ffe595}W:${color}${execpi 600 sed -n '49p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 95}${color ffe595}W:${color}${execpi 600 sed -n '56p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 180}${color ffe595}W:${color}${execpi 600 sed -n '63p' $HOME/Conky_WeatherCom/10days/raw_10}${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${color ffe595}W:${color}${execpi 600 sed -n '70p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}
NOTE:

Only /home/sector11/Conky_WeatherCom/conkyrc_horiz has the command:

TEXT
${texeci 600 bash $HOME/Conky_WeatherCom/weath_com}${font Arial:size=12}${color ffe5... blah blah

which means conkyrc_horiz_2 does NOT collect data from the internet, it uses the data collected by conkyrc_horiz

So I strongly recommend a bash script to start them start, something like:

#!/bin/bash
conky -c ~/Conky_WeatherCom/conkyrc_horiz &
conky -p 5 -c ~/Conky_WeatherCom/conkyrc_horiz_2 &
exit

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#845 2013-04-26 20:32:49

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

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

Another job perfectly done Sector11!


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

#846 2013-04-26 20:56:28

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)

TeoBigusGeekus wrote:

Another job perfectly done Sector11!

Thank you, I'm working on v2 - my fonts, my style (same layout though) because ..... I can.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#847 2013-04-26 22:24:28

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)

OK here is v2 of Teo's Conky_WeatherCom I call: conkyrc_horiz & conkyrc_horiz_2

adj4lCjb.jpg

The differences, in part:
1. slightly modified form; colour, font size - layout is identical to v1
2. font: Monofur
3. no current condition text - a picture says a thousand words.
4. code above TEXT is mine

conkyrc_horiz

# killall conky && conky -c $HOME/Conky_WeatherCom/conkyrc_horiz &
###  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,sticky,below,skip_taskbar,skip_pager
#own_window_colour 000000
own_window_class Conky
own_window_title Teo Weather.com USA horiz_conky

# 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 # Options: yes or no

### 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 255

minimum_size 355 450  ## width, height
maximum_width 355     ## width

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

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur: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 # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

## default_color cbcbcb
default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 778899 #119 136 153	LightSlateGray
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 B22222 #178  34  34	FireBrick ##FF0000 #255   0   0	Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 9
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders 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 right

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

# 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

#   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

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
#######################################################  End LUA Settings  ###

update_interval 1

TEXT
${texeci 600 bash $HOME/Conky_WeatherCom/weath_com}${font Monofur:bold:size=12}${color}Current${font}${alignr}${color5}${cpubar cpu0 1,25} ${color}${execpi 600 sed -n '1p' $HOME/Conky_WeatherCom/updated} ${color5}${cpubar cpu0 1,25}
${goto 170}${font Monofur:bold:size=14}${color5}Temp ${color}${execpi 600 sed -n '4p' $HOME/Conky_WeatherCom/Today/raw_td}${alignr 20}${color5}Feels${color4} ${execpi 600 sed -n '5p' $HOME/Conky_WeatherCom/Today/raw_td}\
${image $HOME/Conky_WeatherCom/now.png -p 0,30 -s 120x120}${font}
${goto 170}${color5}Past 24hr Rain${color}${alignr}${execpi 600 sed -n '12p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Wind${color}${alignr}${execpi 600 sed -n '18p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Humidity${color}${alignr}${execpi 600 sed -n '24p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}UV Index${color}${alignr}${execpi 600 sed -n '30p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Barometer${color}${alignr}${execpi 600 sed -n '40p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Dew Point${color}${alignr}${execpi 600 sed -n '42p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Visibility${color}${alignr}${execpi 600 sed -n '44p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Sun${color}${alignr}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/Today/raw_td} / ${execpi 600 sed -n '46p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Moon${color}${alignr}${execpi 600 sed -n '47p' $HOME/Conky_WeatherCom/Today/raw_td}
${goto 170}${color5}Moonphase${color}${alignr}${execpi 600 sed -n '48p' $HOME/Conky_WeatherCom/Today/raw_td}
${color5}Next 6h: ${color}${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c1-50}
${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/Today/raw_td|cut -c51-110}

${font Monofur:bold:size=12}${color}Today${font} ${color5}${hr 2}
${font Monofur:bold:size=11}${color5}${goto 75}Day${goto 240}Night\
${image $HOME/Conky_WeatherCom/TD.png -p 25,240 -s 100x100}\
${image $HOME/Conky_WeatherCom/TN.png -p 190,240 -s 100x100}${font}${color}


${goto 155}${font Monofur:bold:size=14}${execpi 600 sed -n '6p' $HOME/Conky_WeatherCom/Today/raw_td}${goto 320}${execpi 600 sed -n '7p' $HOME/Conky_WeatherCom/Today/raw_td}${font}




${color5}${execpi 600 sed -n '13p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '14p' $HOME/Conky_WeatherCom/Today/raw_td}\
	${goto 200}${color5}${execpi 600 sed -n '15p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '16p' $HOME/Conky_WeatherCom/Today/raw_td}
${color5}${execpi 600 sed -n '19p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '20p' $HOME/Conky_WeatherCom/Today/raw_td}\
	${goto 200}${color5}WIND ${color}${execpi 600 sed -n '22p' $HOME/Conky_WeatherCom/Today/raw_td}
${color5}${execpi 600 sed -n '25p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '26p' $HOME/Conky_WeatherCom/Today/raw_td}\
	${goto 200}${color5}HUMIDITY ${color}${execpi 600 sed -n '28p' $HOME/Conky_WeatherCom/Today/raw_td}
${color5}${execpi 600 sed -n '31p' $HOME/Conky_WeatherCom/Today/raw_td|tr 'a-z' 'A-Z'} ${color}${execpi 600 sed -n '32p' $HOME/Conky_WeatherCom/Today/raw_td}\
	${goto 200}${color5}UV-INDEX ${color}-

conkyrc_horiz_2

# killall conky && conky -c $HOME/Conky_WeatherCom/conkyrc_horiz_2 &
###  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,sticky,below,skip_taskbar,skip_pager
#own_window_colour 000000
own_window_class Conky
own_window_title Teo Weather.com USA horiz_conky_2

# 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 # Options: yes or no

### 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 255

minimum_size 355 450  ## width, height
maximum_width 355     ## width

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

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur: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 # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

## default_color cbcbcb
default_color DCDCDC #220 220 220	Gainsboro
color0 8FBC8F #143 188 143	DarkSeaGreen
color1 778899 #119 136 153	LightSlateGray
color2 FF8C00 #255 140   0	DarkOrange
color3 7FFF00 #127 255   0	Chartreuse
color4 FFA07A #255 160 122	LightSalmon
color5 FFDEAD #255 222 173	NavajoWhite
color6 00BFFF #  0 191 255	DeepSkyBlue
color7 00FFFF #  0 255 255	Cyan
color8 FFFF00 #255 255   0	Yellow
color9 B22222 #178  34  34	FireBrick ##FF0000 #255   0   0	Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 9
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders 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 right

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

# 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

#   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

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
#######################################################  End LUA Settings  ###

update_interval 3


TEXT
${font Monofur:bold:size=12}10 Day Forecast${font} ${color5}${hr 2}
${goto 65}${font Monofur:bold:size=11}${color5}${execpi 600 sed -n '1p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 175}${execpi 600 sed -n '8p' $HOME/Conky_WeatherCom/10days/raw_10}${goto 285}${execpi 600 sed -n '15p' $HOME/Conky_WeatherCom/10days/raw_10}${font}${color}\
${image $HOME/Conky_WeatherCom/10_2.png -p 20,30 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_9.png -p 130,30 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_16.png -p 240,30 -s 70x70}

${goto 115}${font Monofur:bold:size=14}${color4}${execpi 600 sed -n '3p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 225}${execpi 600 sed -n '10p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 335}${execpi 600 sed -n '17p' $HOME/Conky_WeatherCom/10days/raw_10}${color}${font}
${goto 118}${execpi 600 sed -n '4p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 228}${execpi 600 sed -n '11p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 338}${execpi 600 sed -n '18p' $HOME/Conky_WeatherCom/10days/raw_10}


${color5}Rain? ${color}${execpi 600 sed -n '6p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 135}${color5}Rain? ${color}${execpi 600 sed -n '13p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 260}${color5}Rain? ${color}${execpi 600 sed -n '20p' $HOME/Conky_WeatherCom/10days/raw_10}
${color5}Wind ${color}${execpi 600 sed -n '7p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 135}${color5}Wind ${color}${execpi 600 sed -n '14p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 260}${color5}Wind ${color}${execpi 600 sed -n '21p' $HOME/Conky_WeatherCom/10days/raw_10}
${color5}${hr 1}
${font Monofur:bold:size=11}${goto 65}${execpi 600 sed -n '22p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 175}${execpi 600 sed -n '29p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 285}${execpi 600 sed -n '36p' $HOME/Conky_WeatherCom/10days/raw_10}${color}\
${image $HOME/Conky_WeatherCom/10_23.png -p 20,162 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_30.png -p 130,162 -s 70x70}\
${image $HOME/Conky_WeatherCom/10_37.png -p 240,162 -s 70x70}

${goto 115}${font Monofur:bold:size=14}${color4}${execpi 600 sed -n '24p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 225}${execpi 600 sed -n '31p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 335}${execpi 600 sed -n '38p' $HOME/Conky_WeatherCom/10days/raw_10}${color}${font}
${goto 118}${execpi 600 sed -n '25p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 228}${execpi 600 sed -n '32p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 338}${execpi 600 sed -n '39p' $HOME/Conky_WeatherCom/10days/raw_10}


${color5}Rain? ${color}${execpi 600 sed -n '27p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 135}${color5}Rain? ${color}${execpi 600 sed -n '34p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 260}${color5}Rain? ${color}${execpi 600 sed -n '41p' $HOME/Conky_WeatherCom/10days/raw_10}
${color5}Wind ${color}${execpi 600 sed -n '28p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 135}${color5}Wind ${color}${execpi 600 sed -n '35p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 260}${color5}Wind ${color}${execpi 600 sed -n '42p' $HOME/Conky_WeatherCom/10days/raw_10}
${color5}${hr 1}
${font Monofur:bold:size=11}${goto 50}${execpi 600 sed -n '43p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 135}${execpi 600 sed -n '50p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 220}${execpi 600 sed -n '57p' $HOME/Conky_WeatherCom/10days/raw_10}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 305}${execpi 600 sed -n '64p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}${font}${color}\
${image $HOME/Conky_WeatherCom/10_44.png -p 0,297 -s 55x55}\
${image $HOME/Conky_WeatherCom/10_51.png -p 85,297 -s 55x55}\
${image $HOME/Conky_WeatherCom/10_58.png -p 170,297 -s 55x55}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${image $HOME/Conky_WeatherCom/10_65.png -p 255,297 -s 55x55}${endif}

${goto 75}${font Monofur:bold:size=14}${color4}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 160}${execpi 600 sed -n '52p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 245}${execpi 600 sed -n '59p' $HOME/Conky_WeatherCom/10days/raw_10}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 330}${execpi 600 sed -n '66p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}${color}${font}
${goto 78}${execpi 600 sed -n '45p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 163}${execpi 600 sed -n '53p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 248}${execpi 600 sed -n '60p' $HOME/Conky_WeatherCom/10days/raw_10}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 333}${execpi 600 sed -n '67p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}

${color5}PR ${color}${execpi 600 sed -n '48p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 95}${color5}PR ${color}${execpi 600 sed -n '55p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 180}${color5}PR ${color}${execpi 600 sed -n '62p' $HOME/Conky_WeatherCom/10days/raw_10}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${color5}PR ${color}${execpi 600 sed -n '69p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}
${color5}W ${color}${execpi 600 sed -n '49p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 95}${color5}W ${color}${execpi 600 sed -n '56p' $HOME/Conky_WeatherCom/10days/raw_10}\
${goto 180}${color5}W ${color}${execpi 600 sed -n '63p' $HOME/Conky_WeatherCom/10days/raw_10}\
${if_existing $HOME/Conky_WeatherCom/10days/10days_OK}${goto 265}${color5}W ${color}${execpi 600 sed -n '70p' $HOME/Conky_WeatherCom/10days/raw_10}${endif}

Don't forget: cwc (ConkyWeatherCom) the bash script.

#!/bin/bash
### collects data from the Internet
   conky -c $HOME/Conky_WeatherCom/conkyrc_horiz &
### does not go on the NET --> uses local data
   conky -p 5 -c $HOME/Conky_WeatherCom/conkyrc_horiz_2 &
exit
NOW:

I start on the international version
- - then accuweather
- - then ....

Last edited by Sector11 (2013-04-26 22:28:41)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#848 2013-04-26 22:53:21

ichase
#! CrunchBanger
Registered: 2011-03-16
Posts: 146

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

S11, Thanks as always for the assist  smile 
Not sure why the alignment would be off on my screen and perfect on yours?  yikes

4c1516251104176.jpg

Loved your idea on the script, may have to make one that incorporates all of my conkys   lol   I currently launch each one from my OpenBox Menu   lol  but created the weather_horz.sh and added that to the menu.

Offline

#849 2013-04-26 23:35:29

ichase
#! CrunchBanger
Registered: 2011-03-16
Posts: 146

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

Ok, seem to have it all lining up.  big_smile   8o
19d05b251107380.jpg

Just need to make some minor adjustments with the font color but should be good to go in no time.  Thanks again S11 for the assist.  big_smile

All the best and have a great weekend,  am sure I will be posting more soon as I am now about to start figuring out how I can incorporate the bargraphs_fs.lua into my current info conky.  big_smile

Offline

Be excellent to each other!

#850 2013-04-27 02:15:44

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)

ichase wrote:

Loved your idea on the script, may have to make one that incorporates all of my conkys   lol   I currently launch each one from my OpenBox Menu   lol  but created the weather_horz.sh and added that to the menu.

It's an OLD idea those scripts.  As the very last thing in ~/.config/openbox/autostart (or autostart.sh if you use that) I have:

## Start Conky after a slight delay
#(sleep 3s && conky -c ~/.conkyrc) &
## Start conkys
(sleep 2s && /media/5/Conky/OBMenuS/S11_Current.sh) &

exit

S11_Current.sh is a Start/Stop Conky script that will start conkys if none are running or killall conkys that are running.  So it starts them when you boot up.

#!/bin/bash
# click to start, click to stop

if pidof conky | grep [0-9] > /dev/null
  then
	exec killall conky
  else
#####
# install wmctrl to switch desktops
#####
# on all desktops
# requires: sticky
# own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#####
conky -c /media/5/Conky/S11_Email_1.conky &

# for single desktops remove: sticky
# own_window_hints undecorated,below,skip_taskbar,skip_pager

# Start with low sleep and increase as you lower desktops
# on desktop 4 only

# on desktop 3 only

# on desktop 2 only
(sleep 2s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &
(sleep 2s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
(sleep 2s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Disk_Activity.conky) &

# on desktop 1 only
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11-Top_Right.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11_v9_Vert.conky) &
(sleep 5s && wmctrl -s 0 && conky -c /media/5/Conky/S11-VRX.conky) &

fi
exit

That will start your conkys when you boot up.

In ~/.config/tint2/tint2rc - in your clock setting:

clock_rclick_command = /media/5/Conky/OBMenuS/S11_Current.sh
clock_lclick_command = ~/bin/kfc.sh

Now a right click on the tint2 clock will kill every conky and another right click will restart them.

kfc.sh (Kentucky Fried Conky): Kill em all dead! Like kill em all alive is possible! lol lol lol

#!/bin/bash
   exec killall conky &
exit 0

Hope that helps some more.

Last edited by Sector11 (2013-04-27 02:17:11)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

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: acrobat

Debian Logo