Page 151 of 162

Posted: Mon 05 Dec 2011, 08:28
by zigbert
davids45
Nice avatar :D
The other day I collected the last flags from this season - 20cm snow. Your avatar makes me think of the spring when my feet can touch the bare ground for the first time. - That's heaven.....
Well, 1m powder snow, and I can 'fly' down the steepest hill, - that's heaven too. :D

1) Tasmod as also noted, and will be fixed

2) 01micko made an improvement to support several CPUs. - Must in some way not work for you. Let's see if Mick is around...

3/4) Widget development is not on my priority list. - Sorry mate.


Sigmund

Posted: Mon 05 Dec 2011, 12:09
by zigbert
Image

Posted: Mon 05 Dec 2011, 13:59
by akash_rawal
zigbert wrote: JWM has been the bottleneck to get this going - until you come up with <window type-hint="7">.
Nice to know that you are already aware of it. The attribute type-hint="7" works properly with all WMs except JWM. (Some latest versions seem to have corrected this.)

Currently I am too busy with my entrance exam preparation. When I get time, I will attempt to rewrite at least 1 widget.

For transparency, all we need to do is to find a commandline image editing program capable of cropping images. If we know where to place a widget, we know from where we have to crop the image.

Anyways, the example widget works flawlessly after adding attribute type-hint="7" to its window. I use compiz as my window manager.

Posted: Mon 05 Dec 2011, 18:33
by zigbert
Version 2.40
See main post

Changelog
- Activate gtkdialog widget support (thanks to akash_rawal)
- Make the gui scalable.
- Bugfix: Menu-labels were hardlinked to gtk-stock (thanks to tasmod/davids45)
- Bugfix: Do not allow more than one detected langauge. (thanks to shinobar)
- Bugfix: Sidebar plugin: preview icon.

Posted: Mon 05 Dec 2011, 20:28
by 01micko
davids45

With the weather plugin you need to enable UTF-8, then you get the degree symbol as expected. i don't see this as a major drama but I guess a note in the gui or a splash should be apparent informing the user.

There is a bug I found with the Cpu_bar widget, the default config had 2 entries ( :roll: ), so with a uniprocessor you would get an empty cpu bar below the working one... but that is fixed in the plugin script now. I don't know if it will fix your particualr issue as you said there is nothing displayed :? James C did test it recently with 4 cores and it worked as expected. Try the patch please. (see attached)

akash_rawal..

Nice stuff! Sigmund, what we need is the pwidgets_background file to exist even when we don't have sidebar activated, that way there is always an image to reference in the correct dimensions (screen size) to process. Each individual widget will of course need the -G param to gtkdialog, and as akash said the only missing piece is a tool to crop the image. Maybe pnm suite can handle this? (Barry would know :wink: edit... pamcut!!! :) ). Already in Puppy..

Cheers

Posted: Tue 06 Dec 2011, 00:59
by 01micko
Here we go.. the gtkdialog widget engine: (1st draft)

The boundaries are limitless! You could display all the conky stuff with progress bars, except dynamic graphs (for now.. maybe a refreshing pixmap?), You can display icons in gtkdialog, any size, you could have a slideshow, without the flicker, widgets can be i18n'd for localisation.. who needs/wants conky?.

Code: Select all

#!/bin/sh

WIDGETNAME=`basename $0`

SCREEN=`xwininfo -root | grep ' \-geometry ' | tr -s ' ' | cut -f 3 -d ' ' | cut -f 1 -d '+' | tr 'x' ' '`
HEIGHT=`echo -n "$SCREEN" | cut -f 2 -d ' '`
WIDTH=`echo -n "$SCREEN" | cut -f 1 -d ' '`
YDIMENSION=150 #`echo $(($HEIGHT - 300))` #hard code for demo
XDIMENSION=$((${WIDTH} - 500))

[ ! -d /tmp/pwidgets ] && mkdir /tmp/pwidgets
cp -af /root/.pwidgets/Pwidgets_background /tmp/pwidgets/ #do it each time incase change bg
IMAGE=/tmp/pwidgets/Pwidgets_background #this is .png, makes life easier! It's the one we cut
NEWIMAGE=/tmp/pwidgets/${WIDGETNAME}_background #this is the result
BGHEIGHT=`file $IMAGE| cut -d ' ' -f6|tr -d ','`
BGWIDTH=`file $IMAGE| cut -d ' ' -f4`
NEWIMAGEPATH=/tmp/pwidgets #pixmap_path
IMAGEFILE=${WIDGETNAME}_background #_${WIDGETNAME} #our widget background

#hard coded for demo #we can do a quick dummy run and get the info from xwininfo if geometry \
#is a variable
X=356
Y=78

#code based on /usr/sbin/background_reshape BK
CROPLEFT=${XDIMENSION}
CROPTOP=${YDIMENSION}

#the magic #crop image using pamcut
pngtopnm $IMAGE | pamcut -left=${CROPLEFT} -top=${CROPTOP}  -height=$Y -width=$X | pnmtopng > $NEWIMAGE
# -right=${CROPRIGHT}

echo 'pixmap_path "'"$NEWIMAGEPATH"'"
style "widget-background"
{
   engine "pixmap"
   {
        image
        {
                function = FLAT_BOX
                file = "'"${IMAGEFILE}"'"
                border = {0, 0, 0, 0}
                detail = "base"
                stretch = FALSE
        }
   }
}
class "GtkWindow" style "widget-background" ' >/tmp/gtkwidgetrc
export GTK2_RC_FILES=/tmp/gtkwidgetrc

export gui='<window title="pwidget" type-hint="7">
   <vbox>
   <text use-markup="true"><label>"<span color='"'white'"'>This window can behave like a</span>"</label></text>
   <text use-markup="true"><label>"<span color='"'yellow'"'>WIDGET</span>"</label></text>
   <button ok></button>
   </vbox>
</window>'
gtkdialog -p gui -G ${X}x${Y}+${XDIMENSION}+${YDIMENSION}
Notes:

**** there is plenty of hard coded crap in there so needs work

**** pamcut is perfect!

**** you must have sidebar activated for the above demo to work

*many thanks akash_rawal for opening our collective eye :wink:

EDIT: The xwininfo code at the top is unnecessary as the size of Pwidgets_background is already the exact screen size and I found this easily with the 'file' command. I had little time this morning but will have some later to improve the code, maybe integrate the engine and make it useful, been awhile and I forget how the func file works :lol:

Error

Posted: Tue 06 Dec 2011, 05:49
by tlchost
When I install pwidgets in Fluppy13 I can not access the program from the icon in the desktop area. Entering pwidgets from the command line gives me:

/usr/local/pwidgets/pwidgets: line 26: type: gtkdialog4: not found
/usr/local/pwidgets/pwidgets: line 209: gtkdialog: command not found


When I remove pwidigts 2.40 I see this:

pwidgits 2.38

Thom

Posted: Tue 06 Dec 2011, 07:02
by davids45
G'day,

Pwidgets-2.4.0 and 01micko's post seem to fix the problems I raised in my previous post, except the Cpu_bar widget that, once Applied, still has a config file with nothing after TEXT so nothing shows. 01micko's pet did not appear to fix the loss of TEXT. This computer has dual processors.

However, I'm happy to fix this by amalgamating the RAM_bar and CPU_bar widget text entries with the Space_Puppy widget config so in the one widget I can see the file space, the RAM use, and how the two CPUs are running, all in bar format.

Opting for ticking the UTF-8 box of the start-up dialog removed the unwanted A from the temperature display of the weather widget.

Thanks all.

David S.

Posted: Tue 06 Dec 2011, 13:12
by vovchik
Dear akash_rawal,

Please try my picscale for scaling pngs (it is tiny - around 42k) and will scale your png files - and many other image types - without any additional dependencies http://bkhome.org/blog/?viewDetailed=02375. And picscale preserves transparency, which is why I wrote it in the first place.

Concerning your additon to the gtk rc file, I get the following message:

Code: Select all

/root/.gtkrc.mine:31: Background image options specified without filename
I did supply a fully qualified filename (e.g. /root/my-documents/backgrounds/blank-128.png". DO you know why gtk cannot find it?

With kind regards,
vovchik

Pwidgets - addition of facebook and twitter

Posted: Tue 06 Dec 2011, 13:30
by askanthea
I've had a good look and nothing about these - lots of clock and temp gauges etc, i just wondered if anyone had attempted it? Ive got a java one i use in a local html window at the moment?

Cheers

Andy x

Posted: Tue 06 Dec 2011, 13:35
by 01micko
Hello vovchik
I did supply a fully qualified filename (e.g. /root/my-documents/backgrounds/blank-128.png". DO you know why gtk cannot find it?
However, you have to set the "pixmap_path" in order for gtk to find the image. (see my above example)

HTH

Posted: Tue 06 Dec 2011, 14:15
by vovchik
Thanks 01micko!

It all works. The rc file wants pixmap_path first and then just the pic filename later in that widget construct. Got it!

With kind regards,
vovchik

Posted: Tue 06 Dec 2011, 14:28
by Aitch
Vovchik
Please come and post some of your gems, and update your Bacon posts at puppylinux.info

/aside
Others....don't be shy, we're still going, humming along nicely, with improvements being made all the time :D
Why not come and test Joe's bb2bbpress script that enables easy transfer of murga-linux posts to puppylinux.info
It is a work-in-progress, but we've set up a scratchpad to try it
http://puppylinux.info/topic/translate- ... plinuxinfo
Sorry for the interruption....carry on :wink:

thanks

Aitch :)

Posted: Tue 06 Dec 2011, 16:55
by akash_rawal
01micko wrote: Here we go.. the gtkdialog widget engine
Great job 01micko. The only concerned thing is a considerable overhead during startup ... but that can be minimized by using single window to draw all widgets. We can draw entire sidebar using a single window aligned at the edge, and then widgets inside it (goodbye ROX-Filer). It would be easier to write widgets too, as there's no need to write full gtkdialog code and GTK will manage positions of widgets in the sidebar.

But I have found a problem with xonclock:
Image
Clicking on xonclock makes gtkdialog widget invisible, don't know why.

Also, in some puppies, pamcut is actually pnmcut.

Posted: Tue 06 Dec 2011, 21:34
by 01micko
Hi akash_rawal

Yes, I see your point. Of course 1 gtkdialog process would be much more efficient but I do see a problem with the analog clock. You know it's probably possible to write a gtkdialog clock as we can refresh gui with the timer widget and have angled text in the latest gtkdialog by thunor. The only problem would be the clock face background which could be overcome by blending the clock face into the wallpaper/sidebar background.

I have actually integrated the transparent Search_files widget into Pwidgets not without it's problems though, but I'm getting close. It is an easy one though as the gtkdialog code for it is static in that no variables have to be parsed to get the widget on screen. I have added to /usr/local/pwidgets "func_gtk_trans", modified "func" and the widget config and script, and modified /usr/sbin/fixwidgets to kill process cleanly.. I'll post a tarball later.

Also, the Search_file widget inherits the gtktheme we set up, which is kind of cool, but maybe not wanted.

To be honest I think this is worthy of a new project.

Posted: Wed 07 Dec 2011, 01:24
by zigbert
I suggest a widget sidebar. Completely separated from the wallpaper. Give it a unique background could make it really nice and much more flexible for different Pinboards. All needed is gtk. Also a sidebar will give only one PID, and that would be running fine on low-powered systems.

Start with gtkdialog ONLY and see how far it would go. The engine would be very simple, and the size would be close to nothing.....

I am sorry to say that I am not motivated at the moment for a new project. My focus is at Pmusic. It will probably last through the winter. Version 2.3 is getting closer, and I have already started planning on 2.4.


Sigmund

pwidgets in Fluppy

Posted: Sat 10 Dec 2011, 16:33
by don570
I was able to install pwidgets in Fluppy012(and probably 013)
by upgrading to gtkdialog4 using a pet by Barry Kauler.

Available here...
http://www.murga-linux.com/puppy/viewto ... b7ab5dfc77

____________________________________________________

Re: pwidgets in Fluppy

Posted: Sun 11 Dec 2011, 17:35
by tlchost
don570 wrote:I was able to install pwidgets in Fluppy012(and probably 013)
by upgrading to gtkdialog4 using a pet by Barry Kauler.[/url]
Thanks.....used it to install pwidgets 4.0 in Fluppy13.

Thom

Posted: Sun 11 Dec 2011, 18:50
by akash_rawal
For rendering widgets here's another engine, again using gtkdialog.

http://www.murga-linux.com/puppy/viewto ... 570#588570

Posted: Wed 11 Jan 2012, 20:24
by bigpup
Installed Pwidgets 2.4.0 from link on first page.
In help-> about it says 2.3.8