Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Jul 2014, 03:21
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Pwidgets 2.4.1
Post new topic   Reply to topic View previous topic :: View next topic
Page 14 of 205 [3067 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, ..., 203, 204, 205 Next
Author Message
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: Sat 17 Jan 2009, 02:15    Post subject:  

Thank you......teacher Wink
Back to top
View user's profile Send private message 
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: Mon 19 Jan 2009, 05:26    Post subject: GOT IT  

Micko & Zigbert:

I attached the exec file that will click only on the clock surface (whereever it is on the screen)!

#!/bin/sh
#Trio Tjandradjaja

X_PIXELS=`xrandr -q | grep '*' | egrep "[0-9]+[ ]*x[ ]*[0-9]+" -o | cut -d "x" -f 1`

CLOCK_H_OFFSET=`grep offset-h= ~/.pwidgets/pwidgets-exec | sed 's/^.*offset-h= //' | awk '{print $4}' | cut -d "=" -f 2 `

CLOCK_Y_OFFSET=`grep offset-v= ~/.pwidgets/pwidgets-exec | sed 's/^.*offset-v= //' | awk '{print $3}' | cut -d "=" -f 2 `

WIDGETS_POSITION=`grep position= ~/.pwidgets/pwidgets-exec | sed 's/^.*position= //' | awk '{print $2}' | cut -d "=" -f 2`

if [ "$WIDGETS_POSITION" = "TOP-RIGHT" ] ; then
CLOCK_X_CENTER=$[$X_PIXELS+$CLOCK_H_OFFSET-65]
else
CLOCK_X_CENTER=$[$CLOCK_H_OFFSET+65]
fi

CLOCK_Y_CENTER=$[$CLOCK_Y_OFFSET+65]

#echo "$CLOCK_X_CENTER"

#the actual xevent
sleep 0.1 ; xevent -a $CLOCK_X_CENTER $CLOCK_Y_CENTER
sleep 0.2 ; xevent -b 1 2 #simulated left mouse click
sleep 0.1 ; xevent -a 500 385

Very Happy

Last edited by trio on Mon 19 Jan 2009, 06:10; edited 1 time in total
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 05:58    Post subject:  

Excellent trio!
Now all we have to do is automatically find screen centre for the mouseclick. HairyWill suggested Barry's code further back in the thread. I'm busy making a new font for Pwidgets at the moment but heres a tip. It will have to be a separate script for xevent and that can be called from your script. Your script will end up in 'fixwidgets'.

Cheers

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: Mon 19 Jan 2009, 06:25    Post subject:  

Now, that's easy... Very Happy here you go Micko:

#!/bin/sh
#Trio Tjandradjaja

sleep 2

X_PIXELS=`xrandr -q | grep '*' | egrep "[0-9]+[ ]*x[ ]*[0-9]+" -o | cut -d "x" -f 1`

Y_PIXELS=`xrandr -q | grep '*' | egrep "[0-9]+[ ]*x[ ]*[0-9]+" -o | cut -d "x" -f 2`

CLOCK_H_OFFSET=`grep offset-h= ~/.pwidgets/pwidgets-exec | sed 's/^.*offset-h= //' | awk '{print $4}' | cut -d "=" -f 2 `

CLOCK_Y_OFFSET=`grep offset-v= ~/.pwidgets/pwidgets-exec | sed 's/^.*offset-v= //' | awk '{print $3}' | cut -d "=" -f 2 `

WIDGETS_POSITION=`grep position= ~/.pwidgets/pwidgets-exec | sed 's/^.*position= //' | awk '{print $2}' | cut -d "=" -f 2`

if [ "$WIDGETS_POSITION" = "TOP-LEFT" ] ; then

CLOCK_X_CENTER=$[$CLOCK_H_OFFSET+65]

else
CLOCK_X_CENTER=$[$X_PIXELS+$CLOCK_H_OFFSET-65]


fi

CLOCK_Y_CENTER=$[$CLOCK_Y_OFFSET+65]

SCREEN_X_CENTER=$[X_PIXELS/2]
SCREEN_Y_CENTER=$[Y_PIXELS/2]


#the actual xevent
sleep 0.1 ; xevent -a $CLOCK_X_CENTER $CLOCK_Y_CENTER
sleep 0.2 ; xevent -b 1 2 #simulated left mouse click
sleep 0.1 ; xevent -a $SCREEN_X_CENTER $SCREEN_Y_CENTER
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 06:58    Post subject:  

Trio', <----- excellent!!!!

After some testing I'll pack up a new 'fixwidgets' file and send it to Warren, (Whodo) so he can include in the next puppy 4.2 alpha2. I might even make a .pet and upload here if it's ok with you, or you can make if you want. Do you know how? I'm sure Sigmund won't mind.

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 07:19    Post subject:  

trio, uploading fixwidgets.pet. Check it out. It will overwrite your existing 'fixwidgets' file. Your script is there in full.

Mick
fixwidgets.pet
Description 
pet

 Download 
Filename  fixwidgets.pet 
Filesize  980 Bytes 
Downloaded  416 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: Mon 19 Jan 2009, 08:12    Post subject:  

Micko:
thanks for the compliment & I'll be honored if you guys make the pet (I never try to make any pet yet Very Happy) I am thinking of another problem, the slideshow always triggers the scale2pics...I try to find something..no promise though....

Last edited by trio on Mon 19 Jan 2009, 08:42; edited 1 time in total
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 08:14    Post subject:  

I couldn't resist mate and made the pet anyway! Look above!
_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10747
Location: Ontario Canada,Sydney Australia

PostPosted: Mon 19 Jan 2009, 08:38    Post subject:  

Hey mico I asked jebaJQ8 to make some weather fonts for puppy, I don't know if he will or not, but he's really good with SVG, I do well with raster graphics but could never get used to SVG. You can see some of his work at http://www.murga-linux.com/puppy/viewtopic.php?p=266916#266916
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 08:47    Post subject:  

ttuuxxx wrote:
Hey mico I asked jebaJQ8 to make some weather fonts for puppy, I don't know if he will or not, but he's really good with SVG, I do well with raster graphics but could never get used to SVG. You can see some of his work at http://www.murga-linux.com/puppy/viewtopic.php?p=266916#266916
ttuuxxx


Love that idea! I used his icons on the 486. Barry uses them in Woof. Nice work. I hope he has time. It would be good if he can use the 'Weather' font from the Pwidgets before 4.2 hit the streets as a template. He only need do lowercase. When Zigbert gets back he can give him his 'doggy' cartoons for the 'pet' option in Pwidgets. So therefore only 1 font is needed. Genius ttuuxxx!

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10747
Location: Ontario Canada,Sydney Australia

PostPosted: Mon 19 Jan 2009, 09:22    Post subject:  

01micko wrote:
ttuuxxx wrote:
Hey mico I asked jebaJQ8 to make some weather fonts for puppy, I don't know if he will or not, but he's really good with SVG, I do well with raster graphics but could never get used to SVG. You can see some of his work at http://www.murga-linux.com/puppy/viewtopic.php?p=266916#266916
ttuuxxx


Love that idea! I used his icons on the 486. Barry uses them in Woof. Nice work. I hope he has time. It would be good if he can use the 'Weather' font from the Pwidgets before 4.2 hit the streets as a template. He only need do lowercase. When Zigbert gets back he can give him his 'doggy' cartoons for the 'pet' option in Pwidgets. So therefore only 1 font is needed. Genius ttuuxxx!

It might be technical for him also, Maybe you could export the fonts as SVG and then tar.gz them with the right names on each and see if he would take a look at what needs replacing with new images? And if he doesn't I'll put it on my todo list. it would save me a few steps also. Wink
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile

Back to top
View user's profile Send private message Visit poster's website 
trio


Joined: 21 Dec 2008
Posts: 1788
Location: अनुमोदना

PostPosted: Mon 19 Jan 2009, 09:40    Post subject:  

@micko:

you might want to try this:

"Slideshow")

FILE=~/.pwidgets/misc/scaledimages/01.jpg

if [ -e $FILE ];
then
DUMMY_EXIST="YES"
else
DUMMY_EXIST="NO"
fi

. $HOME/.pwidgets/configs/Slideshow
#calculate X_POS when widgets are listed at right
if [ $WIDGETS_POSITION = right ]; then
X_PIXELS=`xrandr -q | grep '*' | egrep "[0-9]+[ ]*x[ ]*[0-9]+" -o | cut -d "x" -f 1`
X_POS=$[$X_PIXELS-$OFFSET_X-140] #frame
X_POS2=$[$X_PIXELS-$OFFSET_X-133] #picture
else
X_POS=$OFFSET_X #frame
X_POS2=$[$OFFSET_X+7] #picture
fi
SCALED_DIR=$HOME/.pwidgets/misc/scaledimages
mkdir $SCALED_DIR 2> /dev/null
rm -f $SCALED_DIR/* 2> /dev/null
touch $SCALED_DIR/01.jpg
#frame
echo "xli -geometry +$X_POS+$OFFSET_Y $HOME/.pwidgets/misc/frame.jpg &" >> $HOME/.pwidgets/tmp/pwidgets-exec

if [ "$DUMMY_EXIST" = "NO" ] ; then
#build scaled images in a temporary storage
echo "scale2pics \"$IMAGE_DIRECTORY\" $SCALED_DIR 126 95 85 jpg" >> $HOME/.pwidgets/tmp/pwidgets-exec
#The actual slideshow
TMP=$[$OFFSET_Y+7]
echo "xli -geometry +$X_POS2+$TMP -delay $DELAY -goto $SCALED_DIR/01.jpg $SCALED_DIR/*.jpg &" >> $HOME/.pwidgets/tmp/pwidgets-exec
;;
*)
echo "conky -a $POS_CONKY -x $OFFSET_X -y $OFFSET_Y --config=$HOME/.pwidgets/configs/$TREE_WIDGET &" >> $HOME/.pwidgets/tmp/pwidgets-exec
;;
esac

else

#The actual slideshow
TMP=$[$OFFSET_Y+7]
echo "xli -geometry +$X_POS2+$TMP -delay $DELAY -goto $SCALED_DIR/01.jpg $SCALED_DIR/*.jpg &" >> $HOME/.pwidgets/tmp/pwidgets-exec
;;
*)
echo "conky -a $POS_CONKY -x $OFFSET_X -y $OFFSET_Y --config=$HOME/.pwidgets/configs/$TREE_WIDGET &" >> $HOME/.pwidgets/tmp/pwidgets-exec
;;
esac
fi

replace the existing lines with this in /usr/pwidgets/func
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 09:41    Post subject:  

ttuuxxx wrote:
01micko wrote:
ttuuxxx wrote:
Hey mico I asked jebaJQ8 to make some weather fonts for puppy, I don't know if he will or not, but he's really good with SVG, I do well with raster graphics but could never get used to SVG. You can see some of his work at http://www.murga-linux.com/puppy/viewtopic.php?p=266916#266916
ttuuxxx


Love that idea! I used his icons on the 486. Barry uses them in Woof. Nice work. I hope he has time. It would be good if he can use the 'Weather' font from the Pwidgets before 4.2 hit the streets as a template. He only need do lowercase. When Zigbert gets back he can give him his 'doggy' cartoons for the 'pet' option in Pwidgets. So therefore only 1 font is needed. Genius ttuuxxx!

It might be technical for him also, Maybe you could export the fonts as SVG and then tar.gz them with the right names on each and see if he would take a look at what needs replacing with new images? And if he doesn't I'll put it on my todo list. it would save me a few steps also. Wink
ttuuxxx


ok
fontorpup.tar.gz
Description 
gz

 Download 
Filename  fontorpup.tar.gz 
Filesize  8.89 KB 
Downloaded  371 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7781
Location: qld

PostPosted: Mon 19 Jan 2009, 09:50    Post subject:  

Trio,

seems to work just fine, but I am tired! Will check it out tomorrow. I knew the test and output was the key! Just haven't had time!

EDIT, No, it doesnt' work. I'll have a look.

Thankyou

Mick

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
sintot


Joined: 29 Oct 2006
Posts: 57
Location: Madrid

PostPosted: Mon 19 Jan 2009, 20:55    Post subject:  

Hi all:
A gmail script just in case you don't have a better one:
Code:

#!/bin/bash
#Use: In conkyrc, ${execpi 300 /name_of_the_script total GMuser GMpassword} for unread messages
#and ${execpi 300 /name_of_the_script title GMuser} for the titles
#Sintot
case "$1" in
total)
curl --silent -k -u $2:$3 https://mail.google.com/mail/feed/atom/>/tmp/gmail$2.tmp
UNREAD=`cat /tmp/gmail$2.tmp|head -5|tail -1|sed 's/<[a-zA-Z/]*>//g'`
NAMES=`cat /tmp/gmail$2.tmp|grep '<name>'|sed 's/<[a-zA-Z/]*>//g'`
echo -n "New Messages for $2: "
echo -n '${Color red}${font DejaVu Sans:size=15}'
echo -n $UNREAD
echo '${font}${Color}'
;;
title)
UNREAD=`cat /tmp/gmail$2.tmp|head -5|tail -1|sed 's/<[a-zA-Z/]*>//g'`
TITLES=`cat /tmp/gmail$2.tmp|grep '<title>'|grep -v 'Gmail - Inbox'|sed 's/<[a-zA-Z/]*>//g'`
if [ "$UNREAD" -gt "5" ]
then
 UNREAD=5
 OTHERS=`echo "     ..."`
fi
for ((i=1;i<=$UNREAD;i++)); do
   echo -n "    -"
   echo "$TITLES"|head -$i|tail -1
done
echo "$OTHERS"
;;
esac

Cheers
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 14 of 205 [3067 Posts]   Goto page: Previous 1, 2, 3, ..., 12, 13, 14, 15, 16, ..., 203, 204, 205 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1063s ][ Queries: 12 (0.0192s) ][ GZIP on ]