Page 7 of 162

Posted: Mon 29 Dec 2008, 09:19
by 01micko
[quote="Evil20071"]

#!/bin/sh
#AccuWeather icon, using weather.ttf
#USAGE: WeatherIcon <locationcode>
#Sintot
METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
LOCCOD="USA|EN-US|New York"
if [ -z $1 ] && [ -x $LOCCOD ] ; then
echo
echo "USAGE: $0 [locationcode]"
echo
exit 0;
elif [ ! -z $1 ] ; then
LOCCOD=$1
fi
curl -s "http://rss.accuweather.com/rss/liveweat ... b]metric=1[/b]&locCode=$LOCCOD">/tmp/Weather.tmp
SIMBOL=`cat /tmp/Weather.tmp|grep -A2 'description>Currently'|grep gif|sed 's/\// /g'|sed 's/_/ /g'|awk {'print $8'}`
case $SIMBOL in[/code]
And a screenshot of this after refreshing pwidgets is attached.

Look there. Might help.

Also, from your screenshot the background is not refreshing. Don't scale your background, resize it in mtpaint then use it. Icewm is not Pwidget friendly without some persistence. :wink:

Posted: Mon 29 Dec 2008, 16:28
by zigbert
Version 0.4 is uploaded
See main post and Read the notes

The work of the new slideshow widget is based on 01micko's code, and the Pmusic widget is based on wow's code

Thank you guys!!!!!!!


Sigmund

Posted: Mon 29 Dec 2008, 18:41
by ttuuxxx
Hi Sigmund I found a freeware weather font
http://www.fontspace.com/gemfonts/whethers
Just that it might have to have a bit of tweaking to match the font same naming as the other non-freeware font that you recommended at the start of the thread.
I also had an Idea for a widget that could probably be easily made up, What I thinking is a background changer widget, you click a left arrow and it goes backwards and click a right arrow and it scrolls forward, using your local backgrounds image folders. I haven't looked at the code, but what I figured that could work is have 2 scripts, one called forward and one called backward and each time they are activated it moves to the next or previous image.Then all you have to do is have pwidgets call one script or the other.

<-- Backgrounds >>

or an image
Just an idea, I really like Pwidgets, its a great application.
:) ttuuxxx

Posted: Mon 29 Dec 2008, 19:01
by sintot
Evil20071 In the script, as 01Micko has seen, the line:

Code: Select all

curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=$LOCCOD">/tmp/Weather.tmp
must be:

Code: Select all

curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=$METRIC&locCode=$LOCCOD">/tmp/Weather.tmp
Calendar
I've created a new script (with bugs, as the weather one :-) ) for the Calendar:

Code: Select all

# more /etc/conky/calendario 
#!/bin/bash 
#Calendar script, localized and with holidays 
#in conkyrc, use ${execpi 60 name_of_the_script} 
#Sintot 
COUNTRY=16 #16 is Spain 
MONTH=`date +%m` 
YEAR=`date +%Y` 
DAY=`date +%e` 
LANG=es #es for spanish, en for english 
case "$1" in
cal)
curl -s -d "&year=$YEAR&country=$COUNTRY&typ=1&lang=$LANG&month=$MONTH&hcl=1&hol=4194315" -G http://www.timeanddate.com/calendar/print.html>/tmp/calend 
cat /tmp/calend|tail -18|head -7|sed -e 's/<span class=\"red\([1234]*\)\">/${Color red\1}/g' -e 's/<\/span>/${Color}/g' -e "s/$DAY/\${Color green}$DAY\${Color}/" -e 's/red1/blue/g' -e 's/red2/brown/g' -e 's/red3/yellow/g' -e 's/red4/FCAF3E/g' -e 's/red/red/g'|grep -v "<"|grep -v "#" 
;;
fest)
echo 
cat /tmp/calend|tail -6|head -1|sed -e 's/<span title="[a-z,A-Z,0-9,áéíóú

Posted: Tue 30 Dec 2008, 03:41
by trio
@zigbert:
Teacher, I haven't tried the new pwidgets with slideshow yet, but there is something I wanted to suggest if you're using the same script of xlideshow which always execute scale2pics first to make the scaled images. This is correct for a new set up and when you put new pictures, if not, then it should straight execute the slideshow. There should be an option, for it will make the start up a little bit longer. Thanks

Posted: Tue 30 Dec 2008, 11:58
by 01micko
Pwidgets 4... loving it!
One issue. Say you install a pet or something while running the slideshow and you need to restart X to use the pet installation, the slideshow must be stopped before X is restarted, otherwise the X server crashes. There is probably no fix for this but maybe a `stopwidgets'function could be added?

Mick

Oh, one more thing, where is that doggone font? :?

Posted: Tue 30 Dec 2008, 13:31
by trio
tried the pet, it is very good, but again I am pointing out 2 things:

1. Slideshow always generate scaled2pics everytime you start up, it should be an option, only if you're putting in new images or having new installation
2. For Icewm users, please add winoption:
#xli picture viewer
WM_CLASS=xli
WM_NAME=xli
xli.layer: Desktop
xli.allWorkspaces: 1
xli.dBorder: 0
xli.dTitleBar: 0
xli.ignoreTaskBar: 1
xli.dMaximize: 0
xli.dMinimize: 0
xli.dRollup: 0
xli.dResize: 0
xli.dClose: 0
:!:

if not, you'll get everything such as title in title bar, borders,etc just as a regular window

Thanks

Posted: Tue 30 Dec 2008, 14:55
by 01micko
trio wrote:tried the pet, it is very good, but again I am pointing out 2 things:

1. Slideshow always generate scaled2pics everytime you start up, it should be an option, only if you're putting in new images or having new installation
2. For Icewm users, please add winoption:
#xli picture viewer
WM_CLASS=xli
WM_NAME=xli
xli.layer: Desktop
xli.allWorkspaces: 1
xli.dBorder: 0
xli.dTitleBar: 0
xli.ignoreTaskBar: 1
xli.dMaximize: 0
xli.dMinimize: 0
xli.dRollup: 0
xli.dResize: 0
xli.dClose: 0
:!:

if not, you'll get everything such as title in title bar, borders,etc just as a regular window

Thanks
Thanks trio
1.Good idea, will save some time loading.
2. I will mention it to ttuuxxx who is building some icewm packages for puppy420.

Pwidgets and E-16

Posted: Tue 30 Dec 2008, 17:32
by puppyluvr
:D Hello,
Is there a way to specify which window Pwidgets writes to???
In E-16 it puts widgets on various desktops, not together!!
I want it to write to the root window only...

Posted: Tue 30 Dec 2008, 20:07
by WhoDo
trio wrote:2. For Icewm users, please add winoption:
#xli picture viewer
WM_CLASS=xli
WM_NAME=xli
xli.layer: Desktop
xli.allWorkspaces: 1
xli.dBorder: 0
xli.dTitleBar: 0
xli.ignoreTaskBar: 1
xli.dMaximize: 0
xli.dMinimize: 0
xli.dRollup: 0
xli.dResize: 0
xli.dClose: 0
:!:

if not, you'll get everything such as title in title bar, borders,etc just as a regular window
I have updated the winoptions file for the default icewm installation in Puppy 4.2, so when/if users add the xlideshow.pet their icewm will behave properly. Thanks for the tip.

Re: Pwidgets and E-16

Posted: Wed 31 Dec 2008, 04:01
by trio
puppyluvr wrote::D Hello,
Is there a way to specify which window Pwidgets writes to???
In E-16 it puts widgets on various desktops, not together!!
I want it to write to the root window only...
found this:
#
Q: Why doesn't Conky work with Gnome/KDE/nautilus/enlightenment/<insert any other WM/DE/application that draws to the root window here>

A: Please see "Conky won't stop flickering"

Q: Conky won't stop flickering

A: Conky is designed to draw to the root desktop window. However, there are several other applications which like drawing to the root desktop window. Because of this, Conky has two options available to get around this problem:

*

You can try enabling double-buffer. Conky's double-buffer option uses the X double-buffer extension to provide a flicker-free Conky. This can be done by running Conky with the '-b' parameter, or adding this to your conkyrc:

double_buffer yes

*

Conky can run in windowed mode, meaning that instead of drawing the the root window it draws to it's own window. You can move this window around and resize it by right-clicking or left-clicking on the window while holding down the Alt key. This can be accomplished by running Conky with the '-o' parameter, or by adding the following to your conkyrc:

own_window yes

So I guess maybe you should use:

own_window no

in all of the config files in /root/.pwidgets/config/ ? Never use enlightenment though, just trying to help

Posted: Wed 31 Dec 2008, 05:24
by zigbert
ttuuxxx
The weather font is not complete. Today it's snowing outside my window, - and there is no snow-icon.

My dream is that we could make ONE font, containing all dingbats we wanted. If anyone looking for a project, give me a hint ...

01micko
Sorry, I didn't mean to include the 'Pet' widget. The dogone font is alone over 100kb, and that doesn't fit Pwidgets.

My dream is that we could make ONE font, containing all dingbats we wanted. If anyone looking for a project, give me a hint ... :)

trio
You're right about the scaling function. it shouldn't be called everytime fixwidgets is running. I just did it the easy way. I'll look at it.

sintot
A wonderful calender. And a very good example of extended use of conky. Let's see what we can do about it.


Sigmund

Posted: Wed 31 Dec 2008, 05:45
by Evil20071
01micko wrote:
Evil20071 wrote:
#!/bin/sh
#AccuWeather icon, using weather.ttf
#USAGE: WeatherIcon <locationcode>
#Sintot
METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
LOCCOD="USA|EN-US|New York"
if [ -z $1 ] && [ -x $LOCCOD ] ; then
echo
echo "USAGE: $0 [locationcode]"
echo
exit 0;
elif [ ! -z $1 ] ; then
LOCCOD=$1
fi
curl -s "http://rss.accuweather.com/rss/liveweat ... b]metric=1[/b]&locCode=$LOCCOD">/tmp/Weather.tmp
SIMBOL=`cat /tmp/Weather.tmp|grep -A2 'description>Currently'|grep gif|sed 's/\// /g'|sed 's/_/ /g'|awk {'print $8'}`
case $SIMBOL in[/code]
And a screenshot of this after refreshing pwidgets is attached.
Look there. Might help.

Also, from your screenshot the background is not refreshing. Don't scale your background, resize it in mtpaint then use it. Icewm is not Pwidget friendly without some persistence. :wink:
Well... I feel stupid for not seeing that one myself... Thanks. Also, it does, but pwidgets is just slow picking up the background. It doesn't bother me any. I was actually going to set it to keep the black background permanently. It makes it easier for my eyes.

Posted: Wed 31 Dec 2008, 07:43
by trio
found this:

http://bbs.archlinux.org/viewtopic.php?id=37381

looks like the base script of the current pwidgets weather?

Posted: Wed 31 Dec 2008, 07:45
by ttuuxxx
zigbert wrote:ttuuxxx
The weather font is not complete. Today it's snowing outside my window, - and there is no snow-icon.

My dream is that we could make ONE font, containing all dingbats we wanted. If anyone looking for a project, give me a hint ...

01micko
Sorry, I didn't mean to include the 'Pet' widget. The dogone font is alone over 100kb, and that doesn't fit Pwidgets.

My dream is that we could make ONE font, containing all dingbats we wanted. If anyone looking for a project, give me a hint ... :)

trio
You're right about the scaling function. it shouldn't be called everytime fixwidgets is running. I just did it the easy way. I'll look at it.

sintot
A wonderful calender. And a very good example of extended use of conky. Let's see what we can do about it.


Sigmund
I think there was a snow font included, But the naming convention doesn't match with none freeware font, so we would have to rename the fonts, and if you compare them and see any missing, I'm sure I could make some or somebody else.
ttuuxxx

Posted: Wed 31 Dec 2008, 13:57
by sintot
Yes, Trio, it is the base for the text part of the weather widget.

Posted: Wed 31 Dec 2008, 14:17
by trio
No prob Sintot,

I just thought I should mention it to the forum

conky config cpu-ram bar

Posted: Wed 31 Dec 2008, 16:27
by trio
as the widgets keep building up, i made one pwidget item which consist of cpu-ram monitor in bars. it will give more space for pwidgets user to show more widgets on the list. Anyhow for you experienced users, this is just a child's drawing, but for new users, just copy the lines below and save it in the /root/.pwidgets/configs/ , you'll get a new widget instantly on the list when you start pwidgets control panel from the desktop start menu. and you can get so much more by making conky config files like this by yourself, please look up on the net....

#this is a Pwidgets config file
#the actual building of the graphics is defined in bottom of this file, - after 'TEXT'.

#Cpu-ram monitor

#### PWIDGETS #####

HEIGHT=65
OFFSET_X=20


#### CONKY ####
#color0:headings color1:base-info color2:extra-info color3:markers color5:green color6:red
color0 9C8F5B
color1 777777
color2 white
color3 ffab00
color5 499D3A
color6 red

background no
own_window yes
own_window_type override
#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 160 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
use_xft yes
xftfont DejaVu :style=bold:size=9

TEXT
${color0}R A M ${color5}${membar 10,110}

${color0}C P U ${color3}${cpubar 10,112}

Posted: Wed 31 Dec 2008, 16:55
by ttuuxxx
Hey that looks nice :)
ttuuxxx

Posted: Wed 31 Dec 2008, 17:00
by tasmod
Having lost my clock skins I looked for the updated link with the correct permissions, this seems to have been edited out.

Can someone repost the clock skin correct link.

Thanks.