HOWTO change settings in Pwidgets

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

HOWTO change settings in Pwidgets

#1 Post by 01micko »

First of all, here are links to useful Pwidgets posts.

Pwidgets. Official download for latest Pwidgets.

Pwidgets- plugins and widget storage. Useful plugins, extra widgets.

wiki. Useful information and "Official" widget list included in latest version and list of recent plugins and other activity.

TV Channels Channels for Tv widget

Pwidgets Eyecandy Clockskins and sidebars, other Pwidget graphical stuff

Pwidgets now has a `Plugins´ tab that makes it easy to change your settings.

Covered are
  • Themes
    Sidebar
    Cluster
    Calendar
    Clock_analog
    Downspeed
    Horoscope
    Pet
    RssFeed
    Slideshow
    Tv
    Weather
    WorldTime
zigbert has created a 'howto' for making widgets
Creating a widget
A simple widget
Take a look at /root/.pwidgets/configs/ScrollText. Change the text at bottom of the file. Save new file with another name (keep it in /root/.pwidgets/configs/). Restart Pwidgets, and your new widget is available.

A more complex widget
1.) ENGINE
Pwidgets supports 4 widget engines, but 3 of them are hardcoded for a unique widget. Conky is what we have used to build most of our widgets.
- conky (base engine)
- xli (Slideshow)
- xwinwrap (Tv)
- xonclock (Analog-clock)

2.) CONFIG
A widget MUST have a config file in /root/.pwidgets/configs/ (See examples). Normally this is a ordinary conky config file. The config filename will be the widgets name. Content of this directory shows up in 'Available widgets' list in the main gui.

3.) SCRIPTS
If external code needs to be run to fetch new info for the widget, call up the widgets script in /root/.pwidgets/scripts/. The script should have the same name as the config file. It is also possible to run a specified script before reading config file. 'Downspeed' is an example of this. The script file has the same name as the config file with a -pre ending (Downspeed-pre), and is placed in /root/.pwidgets/scripts/.

4.) THEME
Your new widget will follow the global theme settings. If you want to override this you can hardcode colors in config files. Though, the best solution is to make a unique theme for your widget. Themes are placed in /root/.pwidgets/themes/THEME/main. The main file works for all widgets. If a unique theme is specified, this one overrides the main theme. The unique theme should have the same name as the config file (widget name).

5.) PLUGIN
If the new widget requires user configuration to works properly, a plugin may do the job. A plugin is a small gui that edits the widget config file. Plugins are stored in /root/.pwidgets/plugins/, and has the same name as the config file. It will show up automatically when user adds your widget from 'Available widgets' to 'Widget list'. After user input, let the plugin execute:
. /usr/local/pwidgets/locals/english
. /usr/local/pwidgets/func -apply
fixwidgets
This builds the chosen widget tree including the changed info from this plugin.
Have fun. :)
Attachments
mickey.jpg
(6.47 KiB) Downloaded 11288 times
Last edited by 01micko on Thu 24 Sep 2009, 08:36, edited 15 times in total.
Puppy Linux Blog - contact me for access

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

#2 Post by 01micko »

IMPORTANT UPDATE
Pwidgets-1 is now released. The clock is now handled a little differently. The basic pinciple is the same but now the file Clock-analog.png is stored in a new directory called misc,
~/.pwidgets/misc .
Have fun!
Last edited by 01micko on Thu 19 Feb 2009, 12:02, edited 2 times in total.
Puppy Linux Blog - contact me for access

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

#3 Post by 01micko »

Good suggestion here by CatDude
As to the analog clock skins,
i used those that came in MU's gdesklets-0.36-i586-2gsb-MU-200clocks.pet
as posted here: gDesklets 0.36 beta (Only for Puppy-3)

Rename the .pet to .tgz and extract it somewhere,
you will get a directory called: gdesklets-0.36-i586-2gsb-MU-200clocks[/url]
you will find most of the clocks in: gdesklets-0.36-i586-2gsb-MU-200clocks/usr/lib/gdesklets/Displays/Clock/gfx/clocks

I renamed: /root/.pwidgets/misc/Clock-analog.png
then created a symlink to whatever took my fancy out of the 200 clocks.

I tested with these, and they worked OK


earth.png = 186x186
BallClockAqua.png = 128x128
arne49.png = 144x144
arne1.png = 170x170
Rainbow.png = 197x197



CatDude
Puppy Linux Blog - contact me for access

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

#4 Post by 01micko »

Here's a quick weather 'howto'

You have to edit a file. Ok, it can be done. Open the 'file' (rox or home) icon on the desktop. You will see a bunch of folders and a menu bar at the top of the window. There is a nice looking icon that resembles an eye, Left click it. A whole bunch more of folders and files will appear. Scroll down and find one that says '.pwidgets' (yes it has a 'dot' before it.) Click it once. A bunch more folders will appear, click(once) the 'Config' folder. Click the file (there are a bunch there) that is titled 'Weather'. It will open up in a program, which is what we call a text editor, something like 'Notepad', called 'Geany'. There you can read the contents. Peruse them. Try to understand what's going on. Go right down to a line that says 'TEXT'. Under that you will see the default listing of "EUR|NO|NO009|Val%E5moen". Replace this with your code. If you live in the US it is easy, just replace it with your zipcode, otherwise, do the following

goto "http://www.accuweather.com/us-city-list.asp"
goto 'enter an international location'
type your city (doesn't matter where you are, just type it in English if you can)
It will come up with some options, choose what suits you.
THEN in the browser bar (address bar I spose) there is a url, copy only the bit after "code=" and there will be something like 'OCN|AU|GOLD%20COAST' or 'EUR|UK|UK241|LONDON' or 'OCN|NZ|NZ000|AUCKLAND' or 'SAM|CL|CI011|SANTIAGO' or 'AFR|EG|EG011|CAIRO' (for Cairo, Egypt) or 'OCN|AU|NSW|Cairo' (for Cairo, NSW, Australia) or 'ASI|TH|TH017|BANGKOK'
FOR US, just do the zipcode, such as '90210' for Beverly Hills, California (yes, too much TV!)

Update: (Only if you have <puppy4.2Deepthought, keep the date of this post in mind) Pwidgets now has a new weather font. Download the font file 'pweather1.ttf.gz' from Pwidgets thread (you may have to scroll down a bit to find it) and unzip it. Install it in 'usr/share/fonts/default/TTF' Try it out in Abiword, It will appear as 'pweather'. Edit the file I mention in the 1st paragraph of this 'howto'. Another way to get to that file is open the Pwidgets gui, on the left highlight 'Weather', click the config button at the top and the file will open in the default text editor. At the beginning of the line where the weather code goes, 'line 51', you will see

Code: Select all

${color0}${font weather:size=62}${execi 10
Change 'weather' to 'pweather', save the file, choose weather as a widget and enjoy!
Puppy Linux Blog - contact me for access

User avatar
jrb
Posts: 1536
Joined: Tue 11 Dec 2007, 19:56
Location: Smithers, BC, Canada

#5 Post by jrb »

Hi Micko,
Congratulations on a job fantastically done. I've got pwidjets running in puppy412 and it looks great and works great.

Thought I better mention however that for those of us living in Canada we can get the weather forcast by putting in our postal code, but it doesn't give us the code we need for pwidgets.

Instead I went to the International section and entered "Smithers, BC Canada" as per your instructions. This gave me "NAM|CA|BC|SMITHERS" which works.

Thanks for this, J

Currently -27C, a three puppy night

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

#6 Post by 01micko »

To change the degrees C to degrees F in Pwidgets Weather you must edit another file. Goto /root/.pwidgets/scripts/WeatherIcon and open in your preferred text editor. Goto line 5 and you see 'METRIC=1', change to METRIC=0,. Save the file. Restart Pwidgets from the GUI, choose weather and you will see the temperature in degrees F. (You may not even need to restart Pwidgets)

Code: Select all

!/bin/sh
#AccuWeather icon, using weather.ttf
#USAGE: WeatherIcon <locationcode>
#Sintot
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
LOCCOD="EUR|ES|SP013|Madrid"
if [ -z $1 ] && [ -x $LOCCOD ] ; then
   echo
        echo "USAGE: $0 [locationcode]"
        echo
        exit 0;
elif [ ! -z $1 ] ; then
        LOCCOD=$1
fi
curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp?metric=&locCode=$LOCCOD">/tmp/Weather.tmp
SIMBOL=`cat /tmp/Weather.tmp|grep -A2 'description>Currently'|grep gif|sed 's/\// /g'|sed 's/_/ /g'|awk {'print $8'}`
case $SIMBOL in
Have fun. :)
Puppy Linux Blog - contact me for access

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

#7 Post by 01micko »

Trio has a tutorial on how to show the correct space left in a pupsave on a usb pen-drive when using "puppyspace" widget
trio wrote: Somebody asked this before, How to set puppyspace to show correct diskspace of pupsave file in usb install...the answer is (Mick, maybe yo could put this in the pwidgets howto, thanks):

REMEMBER MY PUPSAVE NAME IS: home/42Final/pup_save-421_off.2fs so, you have to change to yours accordingly

1. Alter puppyspace config file (/root/.pwidgets/configs/Puppyspace:

Code: Select all

TEXT
${color2}${font Pdingobats:bold:size=20}:${font DejaVu:bold:size=13}$alignc${color0}Puppy Space
${font}${color1}${fs_size /mnt/+mnt+home+42Final+pup_save-421_off.2fs}${if_empty ${execi 4 /root/.pwidgets/scripts/Puppyspace}}${color6}${else}${color5}${endif}$alignr ${fs_free /mnt/+mnt+home+42Final+pup_save-421_off.2fs}
${fs_bar 10 /mnt/+mnt+home+42Final+pup_save-421_off.2fs}
2. Make an executable script named 0_mntpupsave so it will be executed before pwidgets starts. Put it in "/root/Startup" dir.

Code: Select all

#!/bin/sh

[ ! "`ls /mnt | grep 42Final`" ] && filemnt /mnt/home/42Final/pup_save-421_off.2fs && rox --close=/mnt/+mnt+home+42Final+pup_save-421_off.2fs &
re-apply pwidgets and restart X
Puppy Linux Blog - contact me for access

User avatar
Tweenman
Posts: 19
Joined: Mon 27 Oct 2008, 22:05

Where should I make my edits?

#8 Post by Tweenman »

Hello,

I just upgraded to 4.2, which file do I edit to lengthen the right column, to make room for one more pwidget. I'd also like to add a left column.

I tried "Cluster - run several profiles" It worked (default & system_left) the first few times I checked it but now it doesn't, instead it knocks out the right column.

Also when I max a window the weather pwidgets disappears, someitmes it comes back on its own, sometimes I have to click apply. How do I correct this blanking? Thanks in advance.

User avatar
stiginge
Posts: 420
Joined: Thu 22 Mar 2007, 10:10
Location: Kerry, Ireland

rss feed

#9 Post by stiginge »

I've got the RSS Feed widget on my puppy 'desktop', but it just seems to throw up indonesian news headlines all the time, instead of rss feeds I'm actually interested in . However, I can't find how to change this anywhere?
Buy silver, crash JPMorgan

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

Re: Where should I make my edits?

#10 Post by 01micko »

Tweenman wrote:Hello,

I just upgraded to 4.2, which file do I edit to lengthen the right column, to make room for one more pwidget. I'd also like to add a left column.

I tried "Cluster - run several profiles" It worked (default & system_left) the first few times I checked it but now it doesn't, instead it knocks out the right column.

Also when I max a window the weather pwidgets disappears, someitmes it comes back on its own, sometimes I have to click apply. How do I correct this blanking? Thanks in advance.
Sorry for the late reply. :) .To make room for one more widget you can look at the /root/.pwidgets/config file of each widget you have in your list and edit the height of each one accordingly.

With the clusters, you need to edit the relevant configfile.
Puppy Linux Blog - contact me for access

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

Re: rss feed

#11 Post by 01micko »

stiginge wrote:I've got the RSS Feed widget on my puppy 'desktop', but it just seems to throw up indonesian news headlines all the time, instead of rss feeds I'm actually interested in . However, I can't find how to change this anywhere?
Copy the url of your rss feed to the relevant plugin of the rss widget.

It is easy!
Last edited by 01micko on Fri 17 Jul 2009, 09:06, edited 1 time in total.
Puppy Linux Blog - contact me for access

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

Re: rss feed

#12 Post by trio »

01micko wrote:
stiginge wrote:I've got the RSS Feed widget on my puppy 'desktop', but it just seems to throw up indonesian news headlines all the time, instead of rss feeds I'm actually interested in . However, I can't find how to change this anywhere?
You need to edit the config file for the rss widget
I thought I made a plugin for this...please open menu - desktop - pwidgets - plugins - rss

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

Re: rss feed

#13 Post by 01micko »

trio wrote:
01micko wrote:
stiginge wrote:I've got the RSS Feed widget on my puppy 'desktop', but it just seems to throw up indonesian news headlines all the time, instead of rss feeds I'm actually interested in . However, I can't find how to change this anywhere?
You need to edit the config file for the rss widget
I thought I made a plugin for this...please open menu - desktop - pwidgets - plugins - rss
Yes you did! I corrected my post. Been a while!

The cluster seems to have a bug. I have just been testing and the check boxes aren't showing... but I am using a slowish machine.... any ideas?
Puppy Linux Blog - contact me for access

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

PWidgets Spacing between widgets

#14 Post by Sky Aisling »

Hello,

Thank you so much for PWidgets! I love 'em!

How do I increase the spacing between the widgets?

You write:
To make room for one more widget you can look at the /root/.pwidgets/config file of each widget you have in your list and edit the height of each one accordingly.
I have the situation of one widget overlaying another. See screenshot where 'wireless' overlays 'weather'.

I tried changing the height of 'wireless' but didn't seem to make a difference.

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#15 Post by steve_s »

Bump for the last question.

I hope this thread is still being updated/viewed.

I just added pwidgets to Puppy 5.2 and it works great.

Main question: I just have the calendar and the save spaces/disk spaces as options, but I want them in the bottom right of the screen, not the top right of the screen.

How do I move them down from the top right to the bottom right? :wink: I looked for the answer but didn't find that one listed.

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#16 Post by steve_s »

Ok, figured out how to move it down: menu--> desktop--> desktop settings--> pwidgets tiny desktop apps and then under that File then preferences and set the starting height to what you want, in my case I set it to 300. Looks good.

Now if I could just get the drive spaces to show with some information rather than just "Drive Space" then I'd be all set. ;-)

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#17 Post by steve_s »

Figured that out too: in the area on the file Space_drives in /usr/local/pwidgets/widgets/configs I noticed that there was nothing under the last line after the text for "Drive Sizes" as there should be, so I went to a Space_drives file in pwidgets on Puppy 4.2.1 and copied how it was there at the end of the file. Now it looks great. 8)

Don't know if that is added to pwidgets bugs list...someone tell me if it isn't mentioned to Zigbert and I'll post it.

User avatar
Sky Aisling
Posts: 1368
Joined: Sat 27 Jun 2009, 23:02
Location: Port Townsend, WA. USA

#18 Post by Sky Aisling »

Hi Steve_S,

You write:
Main question: I just have the calendar and the save spaces/disk spaces as options, but I want them in the bottom right of the screen, not the top right of the screen.
Does this help?
Starting on the PWidgets main box:
On the right side under title of ‘Widgets on Desktop’ highlight the widget you want to move.
Then, choose the green *down* arrow right above the ‘Widgets on Desktop’ title.
Each click of the the arrow will move the widget down a notch in the list.
Play with the arrows to see how they move the widget. (You must have a widget highlighted for the arrows to activate).

Also, to change the side of the screen that the widget list appears: choose *file*/*preferences*.

Hope this is what you are looking for.

User avatar
steve_s
Posts: 1595
Joined: Mon 26 May 2008, 13:29
Location: Austin, TX, USA
Contact:

#19 Post by steve_s »

Sky Aisling: thanks!

User avatar
fenex2004
Posts: 34
Joined: Sat 12 Jun 2010, 04:08

#20 Post by fenex2004 »

Hey guys,

Hoping this thread still al ittle active.

Finally got a functioning copy of my frugal install to burn; everything where it is supposed to be. One of the few remaining problems is that the Pwidgets don't load at startup when booting from the new CD. Thought I had seen a posting about how to get pwidgets to start at boot up but can't find it now. Anyone remember having this problem? the solution?

Thanks !

.

Post Reply