pWidgets 2.5.8

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#121 Post 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:
Puppy Linux Blog - contact me for access

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#122 Post 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

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#123 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
sintot
Posts: 57
Joined: Sun 29 Oct 2006, 15:15
Location: Madrid

#124 Post 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,áéíóú
Attachments
calendarnorway.jpeg
(15.54 KiB) Downloaded 2017 times
calendarspanish.jpeg
(17.85 KiB) Downloaded 2024 times
Last edited by sintot on Sun 04 Jan 2009, 17:40, edited 1 time in total.

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#125 Post 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

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#126 Post 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? :?
Puppy Linux Blog - contact me for access

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#127 Post 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

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#128 Post 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.
Puppy Linux Blog - contact me for access

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

Pwidgets and E-16

#129 Post 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...

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#130 Post 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.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

Re: Pwidgets and E-16

#131 Post 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

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#132 Post 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

User avatar
Evil20071
Posts: 489
Joined: Sat 07 Jun 2008, 19:50
Location: Piedmont, SC,.United States
Contact:

#133 Post 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.
[url=http://totalelectronics.us]TotalElectronics.us[/url]

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#134 Post by trio »

found this:

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

looks like the base script of the current pwidgets weather?

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#135 Post 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
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
sintot
Posts: 57
Joined: Sun 29 Oct 2006, 15:15
Location: Madrid

#136 Post by sintot »

Yes, Trio, it is the base for the text part of the weather widget.

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#137 Post by trio »

No prob Sintot,

I just thought I should mention it to the forum

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

conky config cpu-ram bar

#138 Post 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}
Attachments
mypwidgets.jpg
(27.8 KiB) Downloaded 1404 times
Last edited by trio on Fri 02 Jan 2009, 04:38, edited 3 times in total.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#139 Post by ttuuxxx »

Hey that looks nice :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
tasmod
Posts: 1460
Joined: Thu 04 Dec 2008, 13:53
Location: North Lincolnshire. UK
Contact:

#140 Post 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.

Post Reply