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:

#321 Post by 01micko »

Hi guys

Trio,

Not sure which 'func' file of yours I have but there are a few. Anyhow, it works!

SIgmund,
You can add back in '--use-background', I think it is ok. Then your clock will work.

Where are the rest of your 'doggy cartoons', I'm sure I can add them to 'pweather', who cares if it is not all weather, and besides, it could be a 'dog' of a day!, Or a 'dog day afternoon'! 8)

Trio again,

Tried the new fix with 'wmctrl' and not quite working, it wants to work. When it appeared (the clock) it was under the Pwidgets gui! As soon as I tried to move it it flickered at the position it was meant to be. Very close.

Cheers you blokes.

Mick
Puppy Linux Blog - contact me for access

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

#322 Post by trio »

Micko,

Yup, it does pops up like that, might be anywhere on the screen then go to the designated position. just like xmovewindowbyclassname, but it has much more features that can be useful for other things, pls see the man page.
Also there is actually, a more advance wmctrl that's called xctrl (which I cannot find to download) that can redirect the xonclock window even if it is in a nowin-redirect=false state, with -O command option. so, we can add this line to pwidgets-exec like:

xctrl -x -O -r xonclock -b remove,below

that should make xonclock appears by itself without moving around first

Anybody has the compiled xctrl? pls upload.....

Anyway..I will try the -O option to take over the window control with wmctrl when I get back home...but I think it won't work

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

#323 Post by zigbert »

Mick

The dog font is at http://www.dafont.com/doggon.font
This font is rather big, so either we can pick a few cartoons an put together with the Puppy logo, or we build a pet with the dogon (cartoons) font. You already got the 'Pet' widgets in your list. This will work when you install the doggon.ttf.


Sigmund

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

#324 Post by 01micko »

wmctrl - interact with a EWMH/NetWM compatible X Window Manager.
from the man page

Icewm is compliant, is JWM? This is where I have a problem....
Puppy Linux Blog - contact me for access

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

#325 Post by zigbert »

micko01 wrote:SIgmund,
You can add back in '--use-background', I think it is ok. Then your clock will work.
Yes i can, but then I have to ClickClock :)

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

#326 Post by 01micko »

No you don't. :wink:

Code: Select all

if [ "$WIDGETS_POSITION" = "left" ]; then
POS_XONCLOCK=TOP-LEFT
POS_CONKY=top_left
X_WIDTH=0
else
POS_XONCLOCK=TOP-RIGHT
POS_CONKY=top_right
X_WIDTH=$[$X_PIXELS-140]
fi
#build exec-file
echo -e "\c" > $HOME/.pwidgets/tmp/pwidgets-exec
while read TREE_WIDGET; do

HEIGHT="`grep HEIGHT= $HOME/.pwidgets/configs/$TREE_WIDGET | cut -d '=' -f 2`"
case "$TREE_WIDGET" in
			"Clock-analog")
			OFFSET_X=`grep OFFSET_X= $HOME/.pwidgets/configs/$TREE_WIDGET | cut -d '=' -f 2`
			IMAGE="`grep IMAGE= $HOME/.pwidgets/configs/$TREE_WIDGET | cut -d '=' -f 2`"
			echo "xonclock --position=$POS_XONCLOCK --offset-v=$OFFSET_Y --offset-h=$OFFSET_X --no-winredirect --use-background --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
Works ok for me, must be 140x140 though, but I can live with that. :)

Incidentally, song playing in Pmusic is 'Victim of Changes', Judas Priest, circa 1976, I saw them live in September, classic old school British heavy metal. I was raised on it! (Ooh, now I'm giving away some numbers :wink: )
Attachments
noyoudont.jpg
(21.56 KiB) Downloaded 841 times
Puppy Linux Blog - contact me for access

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

#327 Post by 01micko »

Dafont is offline atm. :cry: Ok, I'll wait, might be a day, might be a week.
I gather it is GPL? Or at least opensource licence?

Thx
Puppy Linux Blog - contact me for access

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

#328 Post by trio »

Micko,

I am sure wmctrl is JWM compliant...but anyway, the file itself is 65K, so it is big. Only showing you guys that there might be other ways to do it..including using devil's pie (setting window rules before an application is executed like a WM but from a command line).....for now we stick to xmovewindowbyclssname i think.

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

#329 Post by 01micko »

Yes trio

xmovewimdowbyclassname is only <4kb, that suits our small footprint :wink:

Is it possible to set more options in winoptions? Say 'layer: desktop=1' :?: :?
Puppy Linux Blog - contact me for access

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

#330 Post by trio »

yes offcourse, but you would have to change winoptions manually to set geometry, that was our problem, remember? because with no-winredirect=true, xonclock is dependant to the window manager fully

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

#331 Post by zigbert »

I thought everything was ok, but then I restarted X and it crashed because of the --no-winredirect parameter of xonclock. I use jwm. Can you please test if it works for you. Below is the content of /root/.pwidgets/pwidgets-exec

Code: Select all

xonclock --position=TOP-RIGHT --offset-v=30 --offset-h=-40 --no-winredirect --use-background --skin=/root/.pwidgets/misc/Clock-analog.png &
sleep 5 ; xmovewindowbyclassname xonclock 1100 30

Thanks
Sigmund

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

#332 Post by trio »

Zigbert

It didn't happen to me, but anyway maybe it's safer to put that parameter in the /root/.xonclockrc (no-winredirect = true) only, and delete the that parameter in func file.

Thx

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

#333 Post by 01micko »

Hi guys,

I'm extremely sad :cry: to report it is the 'xmovewindowbyclassname' crashing X in JWM, not 'no-winredirect'. It doesn't matter if you have it in the script or in .xonclockrc. I was playing around with 'no-winredirect long before I came up with the 'xevent' fix. No crashes, just clock in a window, left of screen. Maybe it is because it is executing before JWM is fully loaded, suppose I'll investigate, the fix is too good to dump, there could be a simple workaround.

On the subject of '.xonclockrc', maybe all options could be there and we could make it more 'Pwidgets' compliant, that is, clean up the code to reflect where pwidgets options are stored, for example the skin path. Maybe then we could write smaller scripts, just a thought. :wink:

Mick
Puppy Linux Blog - contact me for access

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

#334 Post by 01micko »

Ok, cleaning up ',xonclockrc'

Code: Select all

#
# --- xonclock configuration file example ---
#
# 1) any comments are followed by '#' symbol
# 2) if there is no value after '=' then xonclock ignore it and uses
#    default internal value
# 3) to get full description of parameter may be set see xonclock manual page
# 4) to set any parameter use syntax: "param = value"
#

#
# path to clock skin
skin = /root/.pwidgets/misc/Clock-analog.png

#
# base clock position:
# (TOP-LEFT | TOP-CENTER | TOP-RIGHT | MIDDLE-LEFT |
# MIDDLE-CENTER | MIDDLE-RIGHT | BOTTOM-LEFT |
# BOTTOM-CENTER | BOTTOM-RIGHT)
#position = TOP-CENTER

#
# vertical and gorizontal offset (pixels)
offset-v = 
offset-h = 

#
# length and width of hours hand (pixels)
hour-length =
hour-width =

#
# length and width of minutes hand (pixels)
minute-length = 50
minute-width =

#
# length and width of seconds hand (pixels)
second-length =
second-width =

# colors of clock hands
color-hour = 70/70/70/255     # color in form R/G/B/A
color-minute = 70/70/70/255   # color in form R/G/B/A
color-second = 240/136/15/255  # color in form R/G/B/A

#
# seconds rendering flag
show-seconds = true

#
# how many seconds sleep before render the clock at startup
sleep = 3

#
# date rendering flag
show-date = false              # (true | false)

#
# date string params
date-font =                   # font name
date-color =                  # color in form R/G/B/A
date-format = %G-%m-%d        # date-render format
date-position =               # format the same as for
                              # position parameter (see above)
date-offset-v =               # pixels
date-offset-h =               # pixels
date-clip-format = %G-%m-%d   # how represent date string when
                              # copying to clipboard

#
# turn off override-redirect flag
no-winredirect = true        # (true | false)

#
# where the center of clock hands should be
hands-rotation-axis =         # X/Y pixels

#
# keep clock on top
top = false                   # (true | false)

#
# clock hands overlapping size
overlap =                     # pixels

#
# make clock movable
movable = true                # (true | false)

#
# use background (for skins with aplpha channel)
use-background = true        # (true | false)

#
# microsecond interval to wait until obscured
# windows have been refreshed (useful only if
# use-background = true) while retrieving new
# background
remerge-sleep = 5000

#
# to customize time zone
tz-hour = 0
tz-min = 0

#
# alpha channel threshold value
alpha-threshold = 127
So far all I did was delete all options for xonclock in a standard unhacked Pwidgets-0.4 /usr/local/pwidgets/func file. It works as expected. Clock appears on left of screen and manually move it to it's correct position.
Now maybe I'll add xmovewindowbyclassname to func with 10 seconds sleep. See what happens.
Puppy Linux Blog - contact me for access

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

#335 Post by 01micko »

Seems more sleep does not work. Any more sleep and I will fall asleep waiting for clock to appear or X server to crash. How else can we do it?
Puppy Linux Blog - contact me for access

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

#336 Post by trio »

:lol: Zigbert & Micko:

I FOUND A GREAT SOLUTION FOR CLOCK FIX
you can dump xevent, xmovewindowbylass name, bla,bla...

just change your fixwidgets to:

TMP="`cat /root/.config/wallpaper/bg_img`"
cp "$TMP" /root/Choices/ROX-background.jpg
killall ROX-Filer
xli -fillscreen -onroot /root/Choices/ROX-background.jpg

and set your xonclockrc to no-winredirect=false

happy...happy...

the problem is puppy sets the background with ROX-Filer and we/conky set another background/wallpaper with xli..so xonclock is at the bottom

That's all folks thank you

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

#337 Post by 01micko »

--position=POSITION
This option defines the clock placement on X screen. It may be: TOP-LEFT, TOP-CENTER, TOP-RIGHT, MIDDLE-LEFT, MIDDLE-CENTER, MIDDLE-RIGHT, BOTTOM-LEFT, BOTTOM-CENTER, BOTTOM-RIGHT. By default it set to BOTTOM-RIGHT.
--offset-v=OFFSET
This option defines vertical offset of the clock concerning its base placement. Positive offset will shift clock lower, negative - upper. Default: 0.
--offset-h=OFFSET
This option defines horizontal offset of the clock concerning its base placement. Positive offset will shift clock right, negative - left. Default: 0.
from the xonclock man page.

Why does no-winredirect disobey it's orders? Sigmund, is your placement of xonclock purely in relation to 'x=0', 'y=0'? I'm not sure. It says there 9 options for position on the man page. Should we set a position in '.xonclockrc' and calculate from there? Just more questions! Another strange thing, if default is bottom right, why does it appear top left? (only with --no-winredirect). Yes, bugs in xonclock. My opinion for what it's worth.

Hang on, you had 'position=TOP-CENTER' in xonclockrc, did you calculate from there?

Mick (with millions of questions and no answers :? )
Puppy Linux Blog - contact me for access

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

#338 Post by 01micko »

Um, that's all ok! Pwidgets and a bare desktop! No icons! (icewm and Jwm)

Needs work, but maybe some other way.
Puppy Linux Blog - contact me for access

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

#339 Post by trio »

yes, Micko

What I meant was that we know now what the problem is, so maybe we can let conky use the same background and not to set another one..

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

#340 Post by zigbert »

trio
What I meant was that we know now what the problem is, so maybe we can let conky use the same background and not to set another one..
Go trio, Go. :D

Sigmund

Post Reply