Dear Micko, I am not with puppy linux right now, I am on windows, but you quoted the code not completely, there was no X_WIDHT in the original code. You must quote from the beginning...01micko wrote:Sigmund
Trio's clockfix with 'xmovewindowbyclassname' seems good. As mentioned in previous posts we seem to have it working nicely.
Here are the changes to the 'func' fileYou can see the change trio has made, the only change I made was remove the 'use-background' option and add the 'no-winredirect' option.Code: Select all
echo "xonclock --position=$POS_XONCLOCK --offset-v=$OFFSET_Y --offset-h=$OFFSET_X --no-winredirect --skin=$IMAGE &" >> $HOME/.pwidgets/tmp/pwidgets-exec if [ "$POS_XONCLOCK" = "TOP_LEFT" ] ; then echo "sleep 5 ; xmovewindowbyclassname xonclock $[$X_WIDTH+$OFFSET_X+40] $OFFSET_Y" >> $HOME/.pwidgets/tmp/pwidgets-exec else echo "sleep 5 ; xmovewindowbyclassname xonclock $[$X_WIDTH+$OFFSET_X] $OFFSET_Y" >> $HOME/.pwidgets/tmp/pwidgets-exec fi
I hope this is good and stable. It allows us to dump 'xevent'. (lots of whinging about that 'fix' ) 'xmovewindowbyclassname' is less than 4k.
Sorry for previously uploading hacked files. Next time just the code, and instructions how to edit, but testers have been few and far between, as you can see by the lack of feedback. Ah well.
Mick
and if you already dowloaded wmctrl and put it in usr/local/bin you change the func file to:
echo "xonclock --position=$POS_XONCLOCK --offset-v=$OFFSET_Y --offset-h=$OFFSET_X --no-winredirect --skin=$IMAGE &" >> $HOME/.pwidgets/tmp/pwidgets-exec
if [ "$POS_XONCLOCK" = "TOP_LEFT" ] ; then
echo "sleep 2 ; wmctrl -x -r xonclock 0,$[$X_WIDTH+$OFFSET_X+40],$OFFSET_Y,140,140" >> $HOME/.pwidgets/tmp/pwidgets-exec
else
echo "sleep 2 ; wmctrl -x -r xonclock 0,$[$X_WIDTH+$OFFSET_X],$OFFSET_Y,140,140" >> $HOME/.pwidgets/tmp/pwidgets-exec
it will move the window to the right position, and the sleep can be lower too. I am thinking how we can use wmctrl not to move the window, but to open at the right position, it would be good right? I haven't try it yet.
Thank you