pWidgets 2.5.8
- Mike Walsh
- Posts: 6351
- Joined: Sat 28 Jun 2014, 12:42
- Location: King's Lynn, UK.
-
- Posts: 1045
- Joined: Mon 26 Nov 2007, 22:07
- Location: Blomberg / Germany
CPU Temperatures widget configuration
G'day zigbert and der-schutzhund (and 01micko if he's watching),
I use pwidgets with all my Pups (Fulls and Frugals) as I think pwidgets is very helpful.
I too would like to use the CPU temp widget but have not seen it work with any Pup or kernel (I get the same results as der-schutzhund I think). This widget's config files look very brief (?) but can they be edited to display a range of cpu temperatures as there seem to be many possible temperatures, certainly with computers that have more per core.
Temp_cpu widget configs:
01micko has recently posted a "poor man's cpu temperature monitor" pmcputemp (http://www.murga-linux.com/puppy/viewtopic.php?t=98299) to display a cpu temperature on the task bar. I have tried this on a range of Pups on this HP desktop, and using a script 01micko wrote for me to try, get different readings which seem to depend on the Pup/kernel and which temperature the script picks.
For example, with Quirky-7.0.3, there are about 12 temperatures to pick from, being "input", "crit" and "max" versions of three "temp" settings. Here are his (2) one-line scripts and their results on this 2-core cpu desktop:
The task-bar is probably not an easy place to show so many temp. values, or even display just a few, but a widget could show them compactly perhaps (like it does with the cpu usage widget )?
But can the temp_cpu widget config file be edited/written to use 01micko's scripts to display all or some of these cpu temperatures?
David S.
I use pwidgets with all my Pups (Fulls and Frugals) as I think pwidgets is very helpful.
I too would like to use the CPU temp widget but have not seen it work with any Pup or kernel (I get the same results as der-schutzhund I think). This widget's config files look very brief (?) but can they be edited to display a range of cpu temperatures as there seem to be many possible temperatures, certainly with computers that have more per core.
Temp_cpu widget configs:
#!/bin/sh
cat /proc/eee/fan_rpm &
#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.
#EEE CPU Overheat Alarm
#### PWIDGETS #####
HEIGHT=75
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=40
#### CONKY ####
#COLORS --- 0:headings 1:base-info 2:extra-info 3:markers 5:green 6:red
#Colors are defined in theme-files, - NOT here.
color0 A2914E
color1 666666
color2 bbbbbb
color3 ffab00
color5 499D3A
color6 red
background no
own_window yes
own_window_type roxdesktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour hotpink
double_buffer yes
total_run_times 0
update_interval 1
minimum_size 180 5
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color white
default_shade_color 333333
default_outline_color red
no_buffers yes
uppercase no
use_spacer none
#font fixed
use_xft yes
xftfont dejavu:bold:size=10
TEXT
${font pdingobats2:size=28}${color4}z${font}${color0} CPU Temp ${alignr}${color3}${acpitemp} C
${font pdingobats2:size=28}${color4}v${font}${color0} CPU Fan ${alignr}${color3}${if_existing /proc/eee/fan_rpm}${execi 10 /usr/local/pwidgets/widgets/scripts/Temp_cpu}rpm$else${acpifan}$endif
01micko has recently posted a "poor man's cpu temperature monitor" pmcputemp (http://www.murga-linux.com/puppy/viewtopic.php?t=98299) to display a cpu temperature on the task bar. I have tried this on a range of Pups on this HP desktop, and using a script 01micko wrote for me to try, get different readings which seem to depend on the Pup/kernel and which temperature the script picks.
For example, with Quirky-7.0.3, there are about 12 temperatures to pick from, being "input", "crit" and "max" versions of three "temp" settings. Here are his (2) one-line scripts and their results on this 2-core cpu desktop:
I can edit the /root/.config/pmcputemp file (by copying a line from the above first script output, e.g. "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input" (which is 35C at the moment) to display whichever of these I think is most important (but I don't really know which is .)# find /sys -type f -name 'temp*'
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon0/temp1_crit
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon0/temp1_crit_hyst
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon0/temp1_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_label
#
# find /sys -type f -name 'temp*' -exec cat '{}' \;
120000
90000
62000
34000
Core 1
0
100000
100000
0
74000
74000
40000
Core 0
The task-bar is probably not an easy place to show so many temp. values, or even display just a few, but a widget could show them compactly perhaps (like it does with the cpu usage widget )?
But can the temp_cpu widget config file be edited/written to use 01micko's scripts to display all or some of these cpu temperatures?
David S.
The temp_cpu widget has never worked for me either. Remember that most of the widgets itself is not made by me. I only delivered the framework.
I have focus elsewhere (also on a new framework for interactive desklets), so I have not the intention to expand the widgets itself. But I do keep the framework in a reasonable condition.
Sigmund
I have focus elsewhere (also on a new framework for interactive desklets), so I have not the intention to expand the widgets itself. But I do keep the framework in a reasonable condition.
Sigmund
How to write a widget?
G'day zigbert,
Thanks for replying to my post.
Just now, I looked for a simple (simpleton's?) guide on how to write a pwidget but the wiki and its forum links (http://www.murga-linux.com/puppy/viewto ... 61&t=36675) looked a bit out-of-date (started six and a bit years ago).
I found widget scripts must now go into /usr/local/pwidgets/widgets/scripts but it looks like some computer programming knowledge is needed beyond just copying a bash (.sh) script and trying to create a pwidgets config file for it.
Oh well .
Anyway, enjoy the sun again up there after your hibernation .
David S.
Thanks for replying to my post.
Just now, I looked for a simple (simpleton's?) guide on how to write a pwidget but the wiki and its forum links (http://www.murga-linux.com/puppy/viewto ... 61&t=36675) looked a bit out-of-date (started six and a bit years ago).
I found widget scripts must now go into /usr/local/pwidgets/widgets/scripts but it looks like some computer programming knowledge is needed beyond just copying a bash (.sh) script and trying to create a pwidgets config file for it.
Oh well .
Anyway, enjoy the sun again up there after your hibernation .
David S.
Temp_cpu widget - config file "edited"
G'day,
Working from the certainty that an infinite number of monkeys on typewriters could write Shakespeare sooner or later, I have taken some of their output concerning conky and cpu temperature (found by the Bard Google), and by trial and many errors, randomly found a Temp-cpu widget config "Text" line that gives me a dual core display on this HP desktop's pwidgets.
Those with nothing to lose may wish to blindly follow my one-eyed efforts......
Firstly, you need to install a lmsensors.pet as the Widgets conky doesn't seem to have this.
Secondly, run 'sensors' in a terminal to check it runs and to see what cpu/core temperatures you could expect from your computer.
Thirdly, edit your existing temp-cpu config file replacing the 'TEXT' lines as below or just replace the config file with this:
It would be nice to get all three 'sensor'-reported temps in the widget - I would probably need to understand what a "grep" is and how to "cut" just the bits needed, or even how to optionally add the 'critical' values from the sensors display.
David S.
Working from the certainty that an infinite number of monkeys on typewriters could write Shakespeare sooner or later, I have taken some of their output concerning conky and cpu temperature (found by the Bard Google), and by trial and many errors, randomly found a Temp-cpu widget config "Text" line that gives me a dual core display on this HP desktop's pwidgets.
Those with nothing to lose may wish to blindly follow my one-eyed efforts......
Firstly, you need to install a lmsensors.pet as the Widgets conky doesn't seem to have this.
Secondly, run 'sensors' in a terminal to check it runs and to see what cpu/core temperatures you could expect from your computer.
Thirdly, edit your existing temp-cpu config file replacing the 'TEXT' lines as below or just replace the config file with this:
Attached for those with young eyes is a desktop shot showing the lmsensors output as well as the Temp-cpu widget in its current form in the centre of the widgets (yellow text temps). 01micko's pmcputemp (version 0.6) is also shown on the task-bar.#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.
#### PWIDGETS #####
HEIGHT=75
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=20
#### CONKY ####
#COLORS --- 0:headings 1:base-info 2:extra-info 3:markers 5:green 6:red
#Colors are defined in theme-files, - NOT here.
color0 A2914E
color1 666666
color2 bbbbbb
color3 ffab00
color5 499D3A
color6 red
background no
own_window yes
own_window_type roxdesktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour hotpink
double_buffer yes
total_run_times 0
update_interval 1
minimum_size 180 5
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color white
default_shade_color 333333
default_outline_color red
no_buffers yes
uppercase no
use_spacer none
#font fixed
use_xft yes
xftfont dejavu:bold:size=10
TEXT
${font pdingobats2:size=28}${color4}z${font}${color0} CPU Temps
${color yellow} ${execi 33 sensors | grep -A 2 'Core' | cut -c1-22 | sed '/^$/d'}
It would be nice to get all three 'sensor'-reported temps in the widget - I would probably need to understand what a "grep" is and how to "cut" just the bits needed, or even how to optionally add the 'critical' values from the sensors display.
David S.
- Attachments
-
- lm_sensors-3.1.2.pet
- Possibly a bit old. Try your Pup repository if this pet doesn't seem to work.
- (72.05 KiB) Downloaded 352 times
-
- capture24021.gif
- (44.79 KiB) Downloaded 624 times
Last edited by davids45 on Thu 16 Apr 2015, 00:46, edited 1 time in total.
Temp_cpu widget - 2 cores + pci adaptor
G'day,
If you have a graphic adaptor with a temperature output (as "temp1") and a dual core CPU, this Temp_cpu pwidget config may work for you.
The lmsensors 'sensors' output is just readable in the blue window.
If your sensors output is different, tinkering of the TEXT line in the config file may be needed to match the sensor's wording.
01micko's pmcputemp-0.61 is also running - its blue icon showing a core temperature is on the task-bar.
David S.
If you have a graphic adaptor with a temperature output (as "temp1") and a dual core CPU, this Temp_cpu pwidget config may work for you.
The screen-shot is from unicornpup-6.0. The widget has the yellow 'Core' temperatures.#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.
# needs lmsensors installed too - check likely widget output by running sensors in a console!!!!!!!
#### PWIDGETS #####
HEIGHT=100
OFFSET_X_LEFT=40
OFFSET_X_RIGHT=40
#### CONKY ####
#COLORS --- 0:headings 1:base-info 2:extra-info 3:markers 5:green 6:red
#Colors are defined in theme-files, - NOT here.
color0 A2914E
color1 666666
color2 bbbbbb
color3 ffab00
color5 499D3A
color6 red
background no
own_window yes
own_window_type roxdesktop
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_colour hotpink
double_buffer yes
total_run_times 0
update_interval 1
minimum_size 180 5
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 2
border_margin 4
border_width 1
default_color white
default_shade_color 333333
default_outline_color red
no_buffers yes
uppercase no
use_spacer none
#font fixed
use_xft yes
xftfont dejavu:bold:size=12
TEXT
${font pdingobats2:size=24}${color4}z${font}${color0} CPU Temps
${color yellow} ${execi 33 sensors | grep -A 2 'Core' | cut -c1-22 | sed '/^$/d'}
${font}${color0} Graphic-card ${color orange} ${execi 33 sensors | grep -A 1 'temp1' | cut -c14-22 | sed '/^$/d'}
The lmsensors 'sensors' output is just readable in the blue window.
If your sensors output is different, tinkering of the TEXT line in the config file may be needed to match the sensor's wording.
01micko's pmcputemp-0.61 is also running - its blue icon showing a core temperature is on the task-bar.
David S.
FWIW - I corrected three small issues with the WeatherStation script's wind direction indicator (arrow) -
1) There was no entry for 360 degrees (so no direction arrow would display), which - even though the same as 0 degrees - Yahoo sometimes reports either/or. Entry added.
2) The directional arrows (pcompass' iconwind font) were all being displayed as rotated 10 degrees clockwise relative to the actual reported Yahoo coordinates - just required shuffling all of the corresponding script 'echo' entries down one place in the script.
3) A space was missing from the 50 degrees '$WinCode' line, which prevented any arrow from displaying with a reported 50 degree coordinate.
Here's the entire revised code -
Bob
1) There was no entry for 360 degrees (so no direction arrow would display), which - even though the same as 0 degrees - Yahoo sometimes reports either/or. Entry added.
2) The directional arrows (pcompass' iconwind font) were all being displayed as rotated 10 degrees clockwise relative to the actual reported Yahoo coordinates - just required shuffling all of the corresponding script 'echo' entries down one place in the script.
3) A space was missing from the 50 degrees '$WinCode' line, which prevented any arrow from displaying with a reported 50 degree coordinate.
Here's the entire revised code -
Code: Select all
if [ $WinCode = 0 ] ; then echo "J"
elif [ $WinCode = 10 ] ; then echo "a"
elif [ $WinCode = 20 ] ; then echo "b"
elif [ $WinCode = 30 ] ; then echo "c"
elif [ $WinCode = 40 ] ; then echo "d"
elif [ $WinCode = 50 ] ; then echo "e"
elif [ $WinCode = 60 ] ; then echo "f"
elif [ $WinCode = 70 ] ; then echo "g"
elif [ $WinCode = 80 ] ; then echo "h"
elif [ $WinCode = 90 ] ; then echo "i"
elif [ $WinCode = 100 ] ; then echo "j"
elif [ $WinCode = 110 ] ; then echo "k"
elif [ $WinCode = 120 ] ; then echo "l"
elif [ $WinCode = 130 ] ; then echo "m"
elif [ $WinCode = 140 ] ; then echo "n"
elif [ $WinCode = 150 ] ; then echo "o"
elif [ $WinCode = 160 ] ; then echo "p"
elif [ $WinCode = 170 ] ; then echo "q"
elif [ $WinCode = 180 ] ; then echo "r"
elif [ $WinCode = 190 ] ; then echo "s"
elif [ $WinCode = 200 ] ; then echo "t"
elif [ $WinCode = 210 ] ; then echo "u"
elif [ $WinCode = 220 ] ; then echo "v"
elif [ $WinCode = 230 ] ; then echo "w"
elif [ $WinCode = 240 ] ; then echo "x"
elif [ $WinCode = 250 ] ; then echo "y"
elif [ $WinCode = 260 ] ; then echo "z"
elif [ $WinCode = 270 ] ; then echo "A"
elif [ $WinCode = 280 ] ; then echo "B"
elif [ $WinCode = 290 ] ; then echo "C"
elif [ $WinCode = 300 ] ; then echo "D"
elif [ $WinCode = 310 ] ; then echo "E"
elif [ $WinCode = 320 ] ; then echo "F"
elif [ $WinCode = 330 ] ; then echo "G"
elif [ $WinCode = 340 ] ; then echo "H"
elif [ $WinCode = 350 ] ; then echo "I"
elif [ $WinCode = 360 ] ; then echo "J"
- Attachments
-
- Original Weather Station.jpg
- Original script - pointing 10 degrees to the right...
- (8.29 KiB) Downloaded 487 times
-
- Weather Station.jpg
- Revised script - 0 degrees correctly displayed as straight North/straight "up"...
- (7.99 KiB) Downloaded 483 times
Last edited by Moat on Fri 01 May 2015, 07:47, edited 1 time in total.
Weatherstation wind direction
G'day Moat,
Thanks for looking into the widget weatherstation wind script.
However, in my day-old full VividPup beta (see attached screen shot), the wind direction arrow is a text letter so I'm guessing I'm missing the pcompass font.
I haven't tried this in other Pups to check, but if this is a missing font, do you know where I can find the pcompass font file?
Regards,
David S.
Update: same text-instead-of-arrow in Dpup Wheezy with the weatherstation widget for wind direction.
Thanks for looking into the widget weatherstation wind script.
However, in my day-old full VividPup beta (see attached screen shot), the wind direction arrow is a text letter so I'm guessing I'm missing the pcompass font.
I haven't tried this in other Pups to check, but if this is a missing font, do you know where I can find the pcompass font file?
Regards,
David S.
Update: same text-instead-of-arrow in Dpup Wheezy with the weatherstation widget for wind direction.
- Attachments
-
- Vivid_Weatherstation_font.jpg
- Weatherstation wind direction arrow is text
- (94.51 KiB) Downloaded 626 times
Hi David!
Below I attached the pcompass font I am using in (a somewhat modified) Precise 5.7.1 Retro - remove the fake tar.gz extension, and copy the font to /usr/share/fonts/default/ttf directory and see if that cures the issue.
Myself, I've experienced rendering issues of the pcompass font in some later Pups... hopefully it'll work for you (I'm gonna guess it will work in your Dpup Wheezy, but maybe not Vivid...?).
Bob
Below I attached the pcompass font I am using in (a somewhat modified) Precise 5.7.1 Retro - remove the fake tar.gz extension, and copy the font to /usr/share/fonts/default/ttf directory and see if that cures the issue.
Myself, I've experienced rendering issues of the pcompass font in some later Pups... hopefully it'll work for you (I'm gonna guess it will work in your Dpup Wheezy, but maybe not Vivid...?).
Bob
- Attachments
-
- pcompass.ttf.tar.gz
- (3.84 KiB) Downloaded 305 times
pcompass font tested in Vivid & Wheezy
G'day Bob,
Copied your ttf file to /usr/share/fonts/default/ttf and it works in Libre Office writer & calc (see screenshot from Vivid - second column is first column copied as pcompass)
So thanks for that.
But now in my weatherstation widget, I see a rectangle where previously there was a conventional letter (again check the screenshot). I've made the problem line red.
The rectangle came in both wheezy and vivid pups.
So could it be my location station doesn't issue a wind-direction (Sydney, NSW), or there is a problem in the widget config somewhere with the pcompass font - I had seen letters earlier with the default widget font?
David S.
Copied your ttf file to /usr/share/fonts/default/ttf and it works in Libre Office writer & calc (see screenshot from Vivid - second column is first column copied as pcompass)
So thanks for that.
But now in my weatherstation widget, I see a rectangle where previously there was a conventional letter (again check the screenshot). I've made the problem line red.
The rectangle came in both wheezy and vivid pups.
So could it be my location station doesn't issue a wind-direction (Sydney, NSW), or there is a problem in the widget config somewhere with the pcompass font - I had seen letters earlier with the default widget font?
I will keep playing.${color6}Wind direction ${color6}${font}${alignr}${execi 120 /usr/local/pwidgets/widgets/scripts/WeatherStation show2}${font pcompass:size=10}${execi 120 /usr/local/pwidgets/widgets/scripts/WeatherStation iconwind}
David S.
- Attachments
-
- Vivid_Wstation_Pcompass.jpg
- Weatherstation widget in Vivid - pcompass font installed and working
- (135.63 KiB) Downloaded 550 times
Re: pcompass font tested in Vivid & Wheezy
Hi David -
My guess is the pcompass font needs to be "rebuilt" in order to work with these later Xorgs (??), and that's somewhat over my head...
Just a total noob's guess, FWIW.
It's a shame, though, and likely just some tiny little thing/bug - as in your screenshot can be seen that the other Pwidgets' image-rendering fonts are working perfectly fine.
Bob
Yes - that's the exact error (rectangle) that I've run across on some Pups I tried that were "later" than my Precise. I'm simply not smart enough to figure out what in particular is causing that, but have a sneaky suspicion it's something relating to later versions of Xorg (for instance, in Carolina v1.3 pcompass font works - in Carolina v1.3 Vanguard - with Xorg upgraded to v1.16.2 - pcompass just renders the rectangle, as well as displaying some other font-related issues across the desktop environment).davids45 wrote:But now in my weatherstation widget, I see a rectangle where previously there was a conventional letter...
My guess is the pcompass font needs to be "rebuilt" in order to work with these later Xorgs (??), and that's somewhat over my head...
Just a total noob's guess, FWIW.
It's a shame, though, and likely just some tiny little thing/bug - as in your screenshot can be seen that the other Pwidgets' image-rendering fonts are working perfectly fine.
Bob
Re: pcompass font tested in Vivid & Wheezy
BTW - you can check if the wind info had been downloaded to the temporary file used by Pwidgets, by viewing the contents (right-click and select 'Open As Text') of the file /root/.pwidgets/tmp/wever-tmp - the entry should be @ around line 13. For example, my wever-tmp's line 13 currently looks like this -davids45 wrote:So could it be my location station doesn't issue a wind-direction...
Code: Select all
<yweather:wind chill="57" direction="340" speed="7" />
Wind direction on weatherstation widget
G'day Bob,
As you suggested, I checked my widgets tmp file and there is a lot of data there for Sydney, including the wind direction, which is displayed as degrees by the widget.
I should just get used to accepting the degrees value (e.g. 0 or 360=a northerly, 180=a southerly) I suppose, and delete the arrow part of the widget.
It could be fun to add some extra days' forecast detail which is in the Yahoo output.
David S.
As you suggested, I checked my widgets tmp file and there is a lot of data there for Sydney, including the wind direction, which is displayed as degrees by the widget.
It's the next step of conversion/rendering of this value into a pcompass font letter that is not working as the number-to-letter conversion in another font such as dejavu sans looks OK.<title>Yahoo! Weather - Sydney, AS</title>
<link>http://us.rd.yahoo.com/dailynews/rss/we ... html</link>
<description>Yahoo! Weather for Sydney, AS</description>
<language>en-us</language>
<lastBuildDate>Fri, 01 May 2015 12:10 pm AEST</lastBuildDate>
<ttl>60</ttl>
<yweather:location city="Sydney" region="" country="AS"/>
<yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/>
<yweather:wind chill="18" direction="140" speed="16.09" />
<yweather:atmosphere humidity="88" visibility="9.99" pressure="1015.92" rising="0" />
<yweather:astronomy sunrise="6:29 am" sunset="5:13 pm"/>
<image>
<title>Yahoo! Weather</title>
<width>142</width>
<height>18</height>
<link>http://weather.yahoo.com</link>
<url>http://l.yimg.com/a/i/brand/purplelogo/ ... a.gif</url>
</image>
<item>
<title>Conditions for Sydney, AS at 12:10 pm AEST</title>
<geo:lat>-33.96</geo:lat>
<geo:long>151.01</geo:long>
<link>http://us.rd.yahoo.com/dailynews/rss/we ... html</link>
<pubDate>Fri, 01 May 2015 12:10 pm AEST</pubDate>
<yweather:condition text="Light Rain Shower" code="11" temp="18" date="Fri, 01 May 2015 12:10 pm AEST" />
<description><![CDATA[
<img src="http://l.yimg.com/a/i/us/we/52/11.gif"/><br />
<b>Current Conditions:</b><br />
Light Rain Shower, 18 C<BR />
<BR /><b>Forecast:</b><BR />
Fri - Rain. High: 19 Low: 16<br />
Sat - Rain. High: 21 Low: 17<br />
Sun - AM Showers. High: 22 Low: 16<br />
Mon - Partly Cloudy. High: 23 Low: 16<br />
Tue - Sunny. High: 25 Low: 10<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/we ... html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>
]]></description>
<yweather:forecast day="Fri" date="1 May 2015" low="16" high="19" text="Rain" code="12" />
<yweather:forecast day="Sat" date="2 May 2015" low="17" high="21" text="Rain" code="12" />
<yweather:forecast day="Sun" date="3 May 2015" low="16" high="22" text="AM Showers" code="39" />
<yweather:forecast day="Mon" date="4 May 2015" low="16" high="23" text="Partly Cloudy" code="30" />
<yweather:forecast day="Tue" date="5 May 2015" low="10" high="25" text="Sunny" code="32" />
<guid isPermaLink="false">ASXX0112_2015_05_05_7_00_AEST</guid>
I should just get used to accepting the degrees value (e.g. 0 or 360=a northerly, 180=a southerly) I suppose, and delete the arrow part of the widget.
It could be fun to add some extra days' forecast detail which is in the Yahoo output.
David S.
Re: Wind direction on weatherstation widget
Yes... but I really like the arrow, dang it, and would prefer it continued to work!davids45 wrote:I should just get used to accepting the degrees value (e.g. 0 or 360=a northerly, 180=a southerly) I suppose, and delete the arrow part of the widget.
Ha - funny... I had the exact same thought while looking through the script. And in looking, have just discovered that the "tomorrow" portion is actually parsing and (wrongly) displaying the last line of the forecast - or the 5th day out. Utter noob me is currently searching for a way to parse only from the second day (i.e. - tomorrow). Awk? Cat? Grep? Tail? Cut? Sed? Lost and searching...davids45 wrote:It could be fun to add some extra days' forecast detail which is in the Yahoo output.
Bob
Weatherstation Winds Well Directed
G'day Bob,
I have successfully added your Weatherstation widget script revision to my Precise571 so I now see how the wind is blowing - gently and from the SE where most of our rain comes from.
Looking at the /usr/share/fonts/default/TTF/ fonts directory, I thought the two text files 'fonts-scale' and 'fonts-dir' may be my problem as they have lines for the pcompass font in Precise but not in other Pups. I copied each pcompass line into the equivalent Vivid files and increased the number at the start of each file by one, but no joy with where the wind blows from in Vivid.
I might continue to play around with this, hoping someone who may know what they are doing could help with a font-curative post??
David S.
Further testing of Moat's WeatherStation script and I find pcompass font is working in pemasu's SnowPups and Exprimo (see attached desktop). As these are kernel-2...., font problem may be kernel related (old is good, new is bad?), or is it the pwidgets version (again, old is good, new is bad?). More to check .
I have successfully added your Weatherstation widget script revision to my Precise571 so I now see how the wind is blowing - gently and from the SE where most of our rain comes from.
Looking at the /usr/share/fonts/default/TTF/ fonts directory, I thought the two text files 'fonts-scale' and 'fonts-dir' may be my problem as they have lines for the pcompass font in Precise but not in other Pups. I copied each pcompass line into the equivalent Vivid files and increased the number at the start of each file by one, but no joy with where the wind blows from in Vivid.
I might continue to play around with this, hoping someone who may know what they are doing could help with a font-curative post??
David S.
Further testing of Moat's WeatherStation script and I find pcompass font is working in pemasu's SnowPups and Exprimo (see attached desktop). As these are kernel-2...., font problem may be kernel related (old is good, new is bad?), or is it the pwidgets version (again, old is good, new is bad?). More to check .
- Attachments
-
- exprimo.jpg
- Widget in Dpup Exprimo
- (43.59 KiB) Downloaded 324 times
-
- precise_weatherstation.jpg
- Weatherstation with wind direction indicated
- (85.07 KiB) Downloaded 463 times
Last edited by davids45 on Mon 04 May 2015, 00:19, edited 1 time in total.
Re: Wind direction on weatherstation widget
Aha... found it! Sed it is -Moat wrote: Utter noob me is currently searching for a way to parse only from the second day (i.e. - tomorrow). Awk? Cat? Grep? Tail? Cut? Sed? Lost and searching...
Code: Select all
| sed -n '2p'
So -
Code: Select all
show11)
tomorrow=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 8 `
tomorrow2=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 6 `
tomorrow3=`grep yweather:forecast '/root/.pwidgets/tmp/wever-tmp' | sed -n '2p' |cut -d '"' -f 10`
I'll just attach the entire revised script (remove fake .tar.gz, as usual) -
- Attachments
-
- WeatherStation.tar.gz
- Revised WeatherStation script
- (5.19 KiB) Downloaded 258 times
Re: Weatherstation Winds Well Directed
Hi David!
More tweaks posted above, if you're feeling a bit adventurous and also wish that tomorrow's forecast doesn't catch you off guard when you step outside.
G'day back!
Bob
Excellent!davids45 wrote:... so I now see how the wind is blowing - gently and from the SE...
More tweaks posted above, if you're feeling a bit adventurous and also wish that tomorrow's forecast doesn't catch you off guard when you step outside.
Yes, hoping somebody font-smart drops in, too. In the meantime, I might just fallback to my Mint install, attempt to find a font editing/creation app, and give it a go myself. A 100% learning experience...davids45 wrote:I might continue to play around with this, hoping someone who may know what they are doing could help with a font-curative post??
G'day back!
Bob
Last edited by Moat on Fri 01 May 2015, 11:20, edited 1 time in total.