pWidgets 2.5.8

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#106 Post by zigbert »

J-Bob wrote:Edit: I should also mention, that i removed the wallpaper roxapp because removing it saves space, and i let rox manage right clicks on the desktop.
Do you know if everything works ok WITH the wallpaper setter?


Sigmund

User avatar
J-Bob
Posts: 282
Joined: Sun 10 Feb 2008, 00:58
Location: Canada
Contact:

#107 Post by J-Bob »

i tested it on my desktop WITH the wallpaper setting program. still the same program.

the problem i found out, is that the xevent clicks, but does not release, i noticed this when i tried it on rxvt.

if i knew how to manage xevents i would build a fix, but alas, i do not.

But at least i know what is the entire root of the problem. it's not the sleep, it's the xevent.

if we had it click, and release than it should be fixed.

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

#108 Post by 01micko »

J-Bob wrote:i tested it on my desktop WITH the wallpaper setting program. still the same program.

the problem i found out, is that the xevent clicks, but does not release, i noticed this when i tried it on rxvt.

if i knew how to manage xevents i would build a fix, but alas, i do not.

But at least i know what is the entire root of the problem. it's not the sleep, it's the xevent.

if we had it click, and release than it should be fixed.
There isn't much documentation about xevent, seemed like a good idea at the time. I have noticed just tonight that my clock didn't wake, first time for that. Maybe try editing usr/sbin/fixwidgets by deleting the line refering to xevent and using my 'wakeclock.sh' script and see what happens, don't forget to re-edit fixwidgets.
Hope that helps.
Merry Christmas.
Puppy Linux Blog - contact me for access

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

#109 Post by 01micko »

J-Bob wrote:i tested it on my desktop WITH the wallpaper setting program. still the same program.

the problem i found out, is that the xevent clicks, but does not release, i noticed this when i tried it on rxvt.

if i knew how to manage xevents i would build a fix, but alas, i do not.

But at least i know what is the entire root of the problem. it's not the sleep, it's the xevent.

if we had it click, and release than it should be fixed.
Replace your last four lines in usr/sbin/fixwidgets with this

Code: Select all

sleep 3							#number of seconds before execution
xevent -a 0 0					#number of pixels for cursor to deviate right and down
sleep 1 ; xevent -b 1 2		#simulated left mouse click
sleep 1 ; xevent -a 512 384
and then I will absolutely agree with you if it does not work.

Sincerely
Puppy Linux Blog - contact me for access

User avatar
J-Bob
Posts: 282
Joined: Sun 10 Feb 2008, 00:58
Location: Canada
Contact:

#110 Post by J-Bob »

01micko wrote:
J-Bob wrote:i tested it on my desktop WITH the wallpaper setting program. still the same program.

the problem i found out, is that the xevent clicks, but does not release, i noticed this when i tried it on rxvt.

if i knew how to manage xevents i would build a fix, but alas, i do not.

But at least i know what is the entire root of the problem. it's not the sleep, it's the xevent.

if we had it click, and release than it should be fixed.
Replace your last four lines in usr/sbin/fixwidgets with this

Code: Select all

sleep 3							#number of seconds before execution
xevent -a 0 0					#number of pixels for cursor to deviate right and down
sleep 1 ; xevent -b 1 2		#simulated left mouse click
sleep 1 ; xevent -a 512 384
and then I will absolutely agree with you if it does not work.

Sincerely
the results were interesting, it clicks at (0,0) but releases around the center of the screen.

i think that you might have found the needed fix for this.

Glad i was able to help with checking for bugs.

- J-Bob

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

#111 Post by 01micko »

J-Bob wrote:
01micko wrote:
J-Bob wrote:i tested it on my desktop WITH the wallpaper setting program. still the same program.

the problem i found out, is that the xevent clicks, but does not release, i noticed this when i tried it on rxvt.

if i knew how to manage xevents i would build a fix, but alas, i do not.

But at least i know what is the entire root of the problem. it's not the sleep, it's the xevent.

if we had it click, and release than it should be fixed.
Replace your last four lines in usr/sbin/fixwidgets with this

Code: Select all

sleep 3							#number of seconds before execution
xevent -a 0 0					#number of pixels for cursor to deviate right and down
sleep 1 ; xevent -b 1 2		#simulated left mouse click
sleep 1 ; xevent -a 512 384
and then I will absolutely agree with you if it does not work.

Sincerely
the results were interesting, it clicks at (0,0) but releases around the center of the screen.

i think that you might have found the needed fix for this.

Glad i was able to help with checking for bugs.

- J-Bob

Code: Select all

#use xevent to update desktop. By Michael Amadio (01micko)
sleep 3							#number of seconds before execution
xevent -a 0 0					#sends cursor to coordinates 0 0
sleep 1 ; xevent -b 1 1 0	#simulated left mouse click
sleep 1 ; xevent -a 512 384
J-Bob, try this, I changed the parameter of the 'click' to '1 0' (mouse button down, mouse button up) from '2' (mouse button down and up). Works the same for me, but might improve your problem. If it works you can shorten the sleeps.
Puppy Linux Blog - contact me for access

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

#112 Post by Evil20071 »

I can't get pwidgets to start on system boot. A little help here? I can get Conky to start, but not pwidgets.
[url=http://totalelectronics.us]TotalElectronics.us[/url]

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

#113 Post by 01micko »

Evil20071 wrote:I can't get pwidgets to start on system boot. A little help here? I can get Conky to start, but not pwidgets.
You must edit ~/xinitrc with

Code: Select all

fixwidgets
just before

Code: Select all

#exec $CURRENTWM
zigbert explains it in the main post. :wink:
Puppy Linux Blog - contact me for access

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

Easier way

#114 Post by trio »

01micko wrote:
Evil20071 wrote:I can't get pwidgets to start on system boot. A little help here? I can get Conky to start, but not pwidgets.
You must edit ~/xinitrc with

Code: Select all

fixwidgets
just before

Code: Select all

#exec $CURRENTWM
zigbert explains it in the main post. :wink:
I instead make a simple script executable and put in in /root/startup folder:

#!/bin/sh
xli -fillscreen -onroot /root/Choices/ROX-background.jpg
conky -d
fixwidgets
sleep 6 #number of seconds before execution
xeven -a 0 100 #number of pixels for cursor to deviate right and down
sleep 0.2 ; xevent -b 1 2 #simulated left mouse click
sleep 0.1 ; xevent -a 512 384
sleep 0.2 ; xevent -b 3 2

Note: this is pwidgets installation not from the pet, as the pet itself already included xevent command that is on the 0,0 coordinate which make my start menu clicked. So it's better for the pet to remove this line and make a pwidgets-startup.sh instead. That's my suggestion

Just wanna share, if i maybe can help

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

xlideshow-0.0.1

#115 Post by 01micko »

We now have 'xlideshow'working.
The code is rudimentary so any improvements are welcome.
I need to know how to stop xli from running a commentary in the bottom bar. Any ideas? Anyone? Once that is accomplished it will be ready for Pwidgets.
CatDude has made his own fork of xlideshow and it is very good. It has a GUI to allow adjustment of imagesize, quality, what image folder to use, nice work!
Trio added some very useful input.
Puppy Linux Blog - contact me for access

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

#116 Post by zigbert »

thanks trio

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

#117 Post by 01micko »

I think we can ditch xevent. Discovered xonclock option '--no-winredirect' and I can get the clock to appear, albeit in a window. Will do some hacking and testing to see if it can be improved. The files to look at are /usr/local/pwidgets/func and ~/.xonclockrc. See what we can do.

Update: To quote the man page of xonclock
--no-winredirect
If the program is started under KDE or GNOME (and maybe someone else) the clock may get hidden state. Try to set this flag to prevent a such situation. It may help I hope. Default: not set.
or Jwm or Icewm and his hopes are dashed! As are ours!
Looks like we are stuck with xevent for a little while. Sorry for the false hope! :evil:
Puppy Linux Blog - contact me for access

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

#118 Post by Evil20071 »

How do I set the Weather widget to get the F instead of C?
[url=http://totalelectronics.us]TotalElectronics.us[/url]

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

#119 Post by 01micko »

Evil20071 wrote:How do I set the Weather widget to get the F instead of C?
Open ~/.pwidgets/scripts/WeatherIcon in a text editor. You'll see what to do.
Puppy Linux Blog - contact me for access

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

#120 Post by Evil20071 »

That didn't work. Already tried that. Change it to both 0 and 1 and both come back C. Here's the contents (Of the top section) of that file:

Code: Select all

#!/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/liveweather_rss.asp?metric=1&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
And a screenshot of this after refreshing pwidgets is attached.
[url=http://totalelectronics.us]TotalElectronics.us[/url]

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

Post Reply