Let me post this, while I'm thinking about it...
I've pretty much settled on this same old skool design.
I've grown accustomed to it, over the years. It tells me what I what to know, and doesn't take up a lot of real estate on my desktop.
/usr/share/conkywx/examples/vindsl-weather-template.sh
Code:
##################################
## VinDSL | rev. 12-09-23 08:09 ##
##################################
## CONKYWX WEATHER TEMPLATE ##
##################################
${voffset 6}${goto 34}${font Weather:size=44}${color6}y${font}
${voffset -58}${font RadioSpace:size=33}${color6}${alignc}[PT]${font}
${voffset 2}${alignc 6}${font}${font DroidSansFallback:bold:size=7.4}${color5}Feels${offset 3}like${offset 1}:${offset 1}${color6}[FL]${offset 3}${color5}/${offset 3}${color6}[FCTT]${font}
${voffset -40}${goto 203}${font DroidSansFallback:bold:size=8.75}${color6}[D1T]${font}
${voffset 0}${goto 204}${font DroidSansFallback:bold:size=7.3}${color5}CoR${offset 1}:${offset 1}${color6}[D1P]${font}
${voffset -45}${goto 188}${font KRARound:size=41.5}${color8}I${font}
${voffset 6}${font Ubuntu:size=22.75}${color5}${alignc}[CT]${font}
${voffset 7}${alignc 6}${font}${font DroidSansFallback:bold:size=8}${color5}Sunrise${offset 1}:${offset 1}${color6}[SR]${offset 6}${color5}Sunset${offset 1}:${offset 1}${color6}[SS]${font}
${voffset 8}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Humidity${offset 1}:${offset 2}${color6}[HM]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Barometer${offset 1}:${offset 2}${color6}[BR]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Bar${offset 3}Trend${offset 1}:${offset 2}${color6}[FCTP]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Moonrise${offset 1}:${color6}[MR]${font}${voffset 11}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Moonset${offset 1}:${color6}[MS]${font}
${voffset -61}${goto 16}${font ConkyWindNESW:size=41.6}${color6}[BF]${font}${voffset -36}${goto 196}${font MoonPhases:size=35}${color6}[MIF]${font}${voffset -36}${goto 198}${font MoonPhases:size=35}${color8}8${font}
${voffset -1}${goto 22}${font DroidSansFallback:bold:size=8.45}${color3}[WS] mph${voffset -1}${goto 203}[MP]${font}
${voffset 8}${goto 25}${font DroidSans:bold:size=8.5}${color5}[D2D]${goto 85}[D3D]${goto 144}[D4D]${goto 201}[D5D]${font}
${voffset 2}${goto 23}${font ConkyWeather:size=32}${color6}[D2F]${goto 83}[D3F]${goto 142}[D4F]${goto 200}[D5F]${font}
${voffset 1}${goto 25}${font DroidSans:bold:size=8.5}${color3}[D2T]${goto 85}[D3T]${goto 144}[D4T]${goto 201}[D5T]${font}
${voffset -1}${goto 24}${font DroidSans:bold:size=8.45}${color5}CoR${offset 1}:${offset 1}${color3}[D2P]${goto 84}${color5}CoR${offset 1}:${offset 1}${color3}[D3P]${goto 144}${color5}CoR${offset 1}:${offset 1}${color3}[D4P]${goto 201}${color5}CoR${offset 1}:${offset 1}${color3}[D5P]${font}
Here's the test template, with update & fetch times added...
/usr/share/conkywx/examples/vindsl-weather-template-test.sh
Code:
##################################
## VinDSL | rev. 12-09-18 12:00 ##
##################################
## CONKYWX FETCH TEST TEMPLATE ##
##################################
${voffset 6}${goto 34}${font Weather:size=44}${color6}y${font}
${voffset -58}${font RadioSpace:size=33}${color6}${alignc}[PT]${font}
${voffset 2}${alignc 6}${font}${font DroidSansFallback:bold:size=7.4}${color5}Feels${offset 3}like${offset 1}:${offset 1}${color6}[FL]${offset 3}${color5}/${offset 3}${color6}[FCTT]${font}
${voffset -40}${goto 203}${font DroidSansFallback:bold:size=8.75}${color6}[D1T]${font}
${voffset 0}${goto 204}${font DroidSansFallback:bold:size=7.3}${color5}CoR${offset 1}:${offset 1}${color6}[D1P]${font}
${voffset -45}${goto 188}${font KRARound:size=41.5}${color8}I${font}
${voffset 6}${alignc}${font}${font DroidSansFallback:bold:size=7.4}${color5}Update${offset 1}:${offset 1}${color6}[LU]${offset 6}${color5}Fetched${offset 1}:${offset 1}${color6}[LF]${font}
${voffset -0}${font Ubuntu:size=22.75}${color5}${alignc}[CT]${font}
${voffset 8}${alignc 6}${font}${font DroidSansFallback:bold:size=8}${color5}Sunrise${offset 1}:${offset 1}${color6}[SR]${offset 6}${color5}Sunset${offset 1}:${offset 1}${color6}[SS]${font}
${voffset 8}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Humidity${offset 1}:${offset 2}${color6}[HM]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Barometer${offset 1}:${offset 2}${color6}[BR]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Bar${offset 3}Trend${offset 1}:${offset 2}${color6}[FCTP]${font}${voffset 11}${goto 84}${font DroidSansFallback:bold:size=7.55}${color5}Moonrise${offset 1}:${color6}[MR]${font}${voffset 11}${goto 85}${font DroidSansFallback:bold:size=7.55}${color5}Moonset${offset 1}:${color6}[MS]${font}
${voffset -61}${goto 16}${font ConkyWindNESW:size=41.6}${color6}[BF]${font}${voffset -36}${goto 196}${font MoonPhases:size=35}${color6}[MIF]${font}${voffset -36}${goto 198}${font MoonPhases:size=35}${color8}8${font}
${voffset -1}${goto 22}${font DroidSansFallback:bold:size=8.45}${color3}[WS] mph${voffset -1}${goto 203}[MP]${font}
${voffset 8}${goto 25}${font DroidSans:bold:size=8.5}${color5}[D2D]${goto 85}[D3D]${goto 144}[D4D]${goto 201}[D5D]${font}
${voffset 2}${goto 23}${font ConkyWeather:size=32}${color6}[D2F]${goto 83}[D3F]${goto 142}[D4F]${goto 200}[D5F]${font}
${voffset 1}${goto 25}${font DroidSans:bold:size=8.5}${color3}[D2T]${goto 85}[D3T]${goto 144}[D4T]${goto 201}[D5T]${font}
${voffset -1}${goto 24}${font DroidSans:bold:size=8.45}${color5}CoR${offset 1}:${offset 1}${color3}[D2P]${goto 84}${color5}CoR${offset 1}:${offset 1}${color3}[D3P]${goto 144}${color5}CoR${offset 1}:${offset 1}${color3}[D4P]${goto 201}${color5}CoR${offset 1}:${offset 1}${color3}[D5P]${font}
I've moved the Sunrise/Sunset times to the weather template, so the time template isn't required any longer.
The only changes I made to conkywx.sh ver. 0.7.4 is:
Apply the "piping patch". Mentioned here: http://ubuntuforums.org/showpost.php...&postcount=364
And, the "leading zero patch" in the converttohours () function:
/usr/share/conkywx/conkywx.sh
Code:
# -----------------------------------------------------------------------
# convert times
# -----------------------------------------------------------------------
converttohours ()
{
local orgtime1=$( trim "$1" )
check_if_time="${orgtime1:0:2}"
if [[ $check_if_time =~ ^[0-9|:][:0-9]*$ ]]; then
corrtime="${orgtime1:0:8}"
if [[ $Time_format == 24 ]]; then
if [[ "$orgtime1" == *SCT* ]]; then
echo $( date --date "$corrtime 1 hour 30 min" +%R)
else
echo $( date --date="$corrtime" +%R )
fi
else
if [[ "$orgtime1" == *SCT* ]]; then
echo $( date --date "$corrtime 1 hour 30 min" "+%l:%M %p")
else
# echo $( date --date="$corrtime" +%R )
case $show_lowercase_ampm in
0)
echo "$( date --date="$corrtime" "+%l:%M %p" )"
;;
1)
echo "$( date --date="$corrtime" "+%l:%M %P" )"
;;
*)
echo "$( date --date="$corrtime" "+%l:%M" )"
;;
esac
fi
fi
else
echo "N/A"
fi
}
Here's my conkywx.conf file:
/etc/conkywx/conkywx.conf (and)
/usr/share/conkywx/examples/conkywx.conf
Code:
# -----------------------------------------------------------------------
# Wund Weather Config File
# -----------------------------------------------------------------------
# THIS PROGRAM IS FOR PERSONAL AND PRIVATE USE ONLY
# CONTACT WUNDERGROUND.COM FOR PROFESSIONAL SOLUTIONS
# CAVEAT: No guarantee that this program will work on all platforms,
# Use At Your Own Risk.
# -----------------------------------------------------------------------
# use_xml
# -----------------------------------------------------------------------
# Use XML data from wunderground - 1 for yes - 0 for no
# if this is set to 1 you will need the xml_ID for a station of your choosing
#
use_xml=0
# -----------------------------------------------------------------------
# xml_ID
# -----------------------------------------------------------------------
# You can use the xml data which is provided at wunderground generated by
# Davis Vantage Pro series of private weather stations.
# This xml is updated every 2.5 seconds or there about - so one gets pretty
# much real-time weather data. Though the data contained is current and all
# predictive and astro data for sun and moon and 7 day forecast comes from
# from the main web page for your location.
#
# To get this xml_ID you need to visit the location of your interest
# which will give you the *Location* url [US] or number [rest of the world]
# at the bottom of the page you have a listing of private weather station feeding
# wunderground
#
# You will also notice a lot of them - under Type column have Rapid Fire in green -
# ideally one of these would make a good choice and you can select one closest to your
# location. The last part of the url is the number after the ID=. infact if you hover
# your mouse over the station name on the main page you will see a popup with the link
# url which has like this ID=I00020B4 - you can see examples below
# New delhi GK 2
# xml_ID=IDELHINE8
# Morristown area
# xml_ID=I00020B4
# Perth Wanneroo
# xml_ID=IWESTERN144
# -----------------------------------------------------------------------
# Location settings
# -----------------------------------------------------------------------
# + Enter the location number from weather underground web page url
# + most locations have a location number - BUT some do not - like the US sites!!!
# + in which case use the URL and set Location to url
# + Location=url
# + OR
# + Location=number
# + Use only one location per config file!
# + for more than one location - create a new config file and give the path
# + to it with a -c command line option
# + there are some test cases listed below - just ensure only one location is uncommented.
# If you cannot figure the number just use the full url to that page.
# Scottsdale, Arizona
Location=http://www.wunderground.com/q/zmw:85250.1.99999
# -----------------------------------------------------------------------
# Test location settings
# -----------------------------------------------------------------------
# Testing URL - to test the various locations - a Location can be
#+ uncommented it will override the Location above
#+
# New delhi Palam
# Location=42181
# Paris France
# Location=07157
# perth western australia
# Location=94610
# Morristown, NJ USA
#Location=http://www.wunderground.com/US/NJ/Morristown.html
# Reykjavik, Iceland
# Location=04030
# Cape town South Africa
# Location=68816
# Gloucestershire, United Kingdom
# Location=03633
# Dubai UAE
# Location=41194
# Prospect Creek, Alaska
# Location=http://www.wunderground.com/q/zmw:99726.18.99999
# Svalbard, Norway
# Location=http://www.wunderground.com/cgi-bin/findweather/getForecast?query=zmw:00000.1.01008
# Dresden Germany
# Location=10488
# -----------------------------------------------------------------------
# Units to use and Downloaded
# -----------------------------------------------------------------------
# enter the units to get centigrade or farenheit
#+ metric [SI] or imperial/english [IM] Option= SI or IM
Units_to_Use=IM
Units_downloaded=IM
# -----------------------------------------------------------------------
# Show units, use short date, show notification
# -----------------------------------------------------------------------
# Use 1 (enable) or 0 (disable)
Units_show=0 # If you want to see units like km/h etc in conky
use_short_date=1 # Sunday, 27 will become Sun 27
show_notification=1 # Every update a popup notification shows
show_short_cond_text=1 # Use short Present Condition text
show_lowercase_ampm=1 # Use upper or lower case AM PM or am pm for 12 hour time format
# 0 for uppercase, 1 for lower, or 2 for no am pm
# NOTE: this will only work if Time_format=12 below
show_degsym_fc_temp=2 # Show deg symbol in forecast temps,
# 0 to hide, 1 to show, 2 to show deg symbol with F C depending on Unit_to_Use
# 3 to show deg after the FC pair, 4 to show deg F C after pair ;-)
# -----------------------------------------------------------------------
# Time format to use 12 or 24 hour format
# -----------------------------------------------------------------------
# Time_format is 12 or 24 - in 12 u get AM or PM in 24 u get
#+ 24 hours format like 15:00 in place of 03:00 PM
Time_format=12
# -----------------------------------------------------------------------
# Today date format - can be used any place multiple times
# -----------------------------------------------------------------------
today_date_format="%b, %d %Y"
# -----------------------------------------------------------------------
# Minimum time the script allows the wesite to be polled
# -----------------------------------------------------------------------
# this is the minimum fetch time in seconds
#+ this should be less than the conky script fetch frequency
#+ The program checks for changes in Location, use_xml or xml_ID variable.
#+ If any of these have changed then the program will make a fresh call for
#+ downloading data even if the minimum_fetch_time has not been reached
# minimum_fetch_time=1740
minimum_fetch_time=870
# -----------------------------------------------------------------------
# --- DO NOT TOUCH SECTION ---
# URLs used in this program
# -----------------------------------------------------------------------
main_url="http://www.wunderground.com/global/stations/"
xml_url="http://api.wunderground.com/weatherstation/WXCurrentObXML.asp?ID="
So, that's where it stands, right now. Simple pimple!
I'm gonna go play around with the Metric side of things, and see how that goes...
BBL
Bookmarks