Widget-bar (online-widgets on your desktop) -now also P217

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Widget-bar (online-widgets on your desktop) -now also P217

#1 Post by MU »

screenshots:

http://dotpups.de/dotpups/Desktop-Tools/


This application opens a borderless window, that will display a HTML-page.

The window will be below all others, but over the desktop-icons.
It is placed on the right side of your desktop.

So it is no full alternative to the sophisticated widgets of KDE or Gnome, but at least it might please you more than a full webbrowser.

I already had introduced this technique with "Schweizer Uhr" (swiss clock, a flash-application).

The HTML-page displays some gadgets from:
http://www.labpixies.com/

You can add own ones like this:
Search for a nice gadget, like this:
http://www.labpixies.com/gadget_page.php?id=36&ctid=

Now click there on the button "Your own website"
This will show you some code, select and copy all, or just the "iframe" part.

Now paste it in a texteditor in
/usr/local/Widget-bar/bar01-MU/widgets1.htm

Then start the application again, to see your new widget.

The "window" requires that you have seamonkey installed.
I compiled it in Puppy 2.12, maybe with newer seamonkeys, you have to recompile the source:
cd /usr/local/Widget-bar/source
bash build.sh

Then copy the resulting binary one folder up.

Download (25 kb):
http://dotpups.de/dotpups/Desktop-Tools/Widget-bar.pup

One disadvantage:
The window does not store cookies like a full webbrowser.
So it will not remember settings on restart, for example a town you select in the weather-forecast.

Mark
Last edited by MU on Mon 23 Feb 2009, 22:31, edited 3 times in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

slight update:
my example HTML-page now includes a button-bar, so you can put your widgets in more than one page.
To add more pages, copy widgets1.htm to widgets3.htm.
Then edit navigation.js , and set the line
var buttons = 2;
to
var buttons = 3;

I already added a second page, that displays the current weather in some german cities.
This is realized by "wetter-netzzeitung.htm", that is put in an iframe like the other gadgets.
This weather is no "gadget", but some simple HTML-code I grabbed from http://www.netzeitung.de/ .

So the nice thing in this approach is, that you could add *any* HTML based stuff as "widget". So you do not rely on a special format.

One thing I noticed:
the window crashed, when I clicked my buttons.
Reason was flash9.
I could fix this by adding some environment-variables in widget-bar.

Mark

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

I am using Prism (Puppy 2.17 based) and it crashed

Code: Select all

# ./widget-bar 
./mozilla-panel: symbol lookup error: /usr/lib/seamonkey-1.0.8/components/libgfx_gtk.so: undefined symbol: pango_xft_get_font_map
# 
Glad to hear you are already compiling for/in 2.20 :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

Lobster, please try:

cd /usr/local/Widget-bar/source
bash build.sh
cp -ax mozilla-panel ../

This will compile the borderless window for the new seamonkey (hopefully).

Mark

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#5 Post by Lobster »

Code: Select all

# cd /usr/local/Widget-bar/source
# bash build.sh
build.sh: line 4: pkg-config: command not found
build.sh: line 4: cc: command not found
build.sh: line 7: strip: command not found
# cp -ax mozilla-panel ../ 
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

looks like you have no devx_220.sfs installed.
Mark

jcagle
Posts: 637
Joined: Thu 29 Sep 2005, 20:34

#7 Post by jcagle »

sh-3.00# ./widget-bar
killall: mozilla-panel: no process killed
./widget-bar: line 24: 13544 Segmentation fault ./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets1.htm $xs 0 $w $y 1

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

jcagle,
we need to find out, if it segfaults (crashes) because of flash9.

Please install it again, I just updated it.
Then edit
/usr/local/Widget-bar/widget-bar

replace the last line
./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets1.htm $xs 0 $w $y 1
with:
./mozilla-panel /usr/local/Widget-bar/bar01-MU/widgets4.htm 100 0 300 800 1

That loads a page without flash.
It also does not use puppybasic to calculate the size.
Then we know more...

The update has these changes:
my german weather did not work, I now replaced it with a php-script that runs on one of my servers. It parses a full page from netzeitung.de, and just spits out the weather.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="pragma" content="no-cache">


<style type=text/css>
.wetter2007  { width: 120px; margin: 0; padding: 2px 0 5px 0; display: block; font: 10px verdana, arial, sans-serif; color: #006; background: #D7E0E9; border-top: 1px solid #fff; }
.wetter2007 li { margin: 0; padding: 3px 0 0 8px; }
</style>
  </head>
  <body>

<?
$wetter = "";

#loadpage("http://localhost/wetter/test.txt");

loadpage("http://www.netzeitung.de/arbeitundberuf/");

$wetter = preg_replace ("/^.*<UL/" , "<UL" , $wetter);
$wetter = preg_replace ("/<\/UL>.*/" , "</UL>" , $wetter);
print "$wetter";


function loadpage($url){

global $wetter;
$start = 0;
$lines = file ($url);
  foreach ($lines as $line ){
    if (eregi("<UL class=\"wetter" , $line)){
      $wetter = $line;
    }
  }
}
?>
  </body>
</html>
I also added page 3, german videotext.
And page 4, a empty page, with a simple example HTML-page, in case you want to add own stuff.

The widget.htm files now use javascript to load the iframes, this ensures that they will be reloaded and not cached.

Here is a screenshot of the videotext:

Image

Mark
Last edited by MU on Sun 09 Sep 2007, 06:54, edited 2 times in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#9 Post by Lobster »

MU wrote:looks like you have no devx_220.sfs installed.
Mark
I am using Prism (Puppy 2.17 based) without the devx_217.sfs (I thought that was required from your suggestion . . .

Hopefully someone with the required version will test :)

It was worth a quick try. Looks good Mark :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

Lob, you will need the devx, as I compiled with seamonkey 104, but you have 108. So you must compile the window again.



Some general thoughs now:

You might wonder, why I chose a white background.

The reason:
many gadgets, especially those based on flash, have a white background.

If we had widgets with real transparency, we could use /root/Choices/ROX-background.jpg as background-picture.

I made a test-dotpup, that does this, it puts the background in a "div", so that it can be positioned. *removed, now part of the official one*
The position is hardcoded for 1024x768, with a top taskbar.
So this had to be enhanced.

With suitable widgets like my german weather, this gives a perfect illusion of widgets directly integrated in the desktop, see this screenshot:

Image

Well, time to sleep now, why are weekends so short :?: ... :?
Mark
Last edited by MU on Sun 09 Sep 2007, 10:59, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#11 Post by MU »

Code: Select all

# ./widget-bar
./mozilla-panel: symbol lookup error: /usr/lib/seamonkey-1.0.8/components/libgfx_gtk.so: undefined symbol: pango_xft_get_font_map
#
I get the same error in Puppy 2.17.
Even if I recompile. Note: to compile, in the source "deskwindow.c" you must remove the line 57, or it will not compile::
#pt = stpcpy (pt, "/.mozilla/default/r3y1skkw.slt");

I then copied over Seamonkey 104, and symlinked it as /usr/lib/mozilla, but it still does not work.
I don't understand it, as all the Gtk and Pango-libraries seem to be the same as in my Puppy (2.12, Muppy 007).

I'm out of idea at moment :(

**edit: it seems, Barry had the same trouble:
http://forums.mozillazine.org/viewtopic.php?p=2445337

Will try that immedeatly :-)

Mak

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#12 Post by MU »

Hooray, that was it.
Updated the dotpup.

Also added a small start-dialog, where you can close the window or choose different backgrounds :P :) 8)

It should set the background-properties automatically depending on your screen-resolution.
Now what we need next, are some nice widgets without flash, because of the transparency-problem when choosing the desktop-background.
I will add a IP - display later, maybe you have some nice things, too? Javascript-calendars and such?

Mark

jcagle
Posts: 637
Joined: Thu 29 Sep 2005, 20:34

#13 Post by jcagle »

I'll re-download tonight, if I remember. I've got church and work today, so I don't have much time right now.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#14 Post by MU »

Updated dotpup.

New: Button to visit a site from Adobe.
It allows to disable the nasty security popups for specific folders, if you start a flash from your harddisk (what is the case with the included clocks).

New:
You now can add iframes or flashs with 2 simple Javascript-functions.

These allow to set the exact position of each widget.
They also allow to add a inner border (it is white), and an outer border.
The outer border uses a bitmap.

Like this non-transparent Flash-widgets look much nicer, see these screenshots:

Image


Image


Oh my, just 4 hours left for sleep..

good night, Mark

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

Updated dotpup.

Cleaned up the code.
Added some fixes, now also rounded, transparent borders can be used.

I also added a scientific calculator.
It was an Opera Widget, I just had to modify it slightly, as it used some special inbuilt objects of opera.

But it seems, most widgets can be used without modifications.

In Opera, start a widget.
Then you get a zip in
/root/.opera/widgets
Unzip it to a new folder, and move it to
/usr/local/Widget-bar/bar01-MU/HTML/

Then add it to widgetX.htm like the calculator.

Here are 2 screenshots, the transparent borders and the calculator:

Image


Image

If you want to use a different picture for the border, edit:
/usr/local/Widget-bar/bar01-MU/javascript/borderpicture.js

It has just 1 line:
borderpic="border3.png";

Mark

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

#16 Post by zigbert »

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#17 Post by MU »

I started a picture/textviewer that can be used as widget.
It could be used as a nice interface to display a help-page.

Download and extract in /usr/local/Widget-bar/bar01-MU/HTML
Then add such a line to one of the widgetX.htm:

Code: Select all

borderframe( 4 , 20 , 270 , 500 , 10 , 0 ,"HTML/book/index.htm" );
I'm away this weekend, so no time to extend it.

Demo + download:
http://noforum.de/dasbuch/

Mark

Post Reply