The time now is Sun 22 Apr 2018, 14:41
All times are UTC - 4 |
Page 1 of 2 [27 Posts] |
Goto page: 1, 2 Next |
Author |
Message |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Sun 21 Dec 2008, 11:23 Post subject:
xlideshow-0.0.1 Subject description: looped slideshow designed for Pwidgets, or Standalone |
|
Zigbert said that with clever use of xli that we might be able to come up with a slideshow widget for Pwidgets. Well, I had a go, and I have limited (ie; nil) coding skill.
With the help of some well constructed code by MU I have come up with a script that at least shows some small (resized) pictures that you might have in your system.
For interested persons; Please add your ideas, Please edit my code. This is for the Puppy community, not for me. If someone wants to take over, by all means do it! I have got the ball rolling!
EDIT: With help from CatDude and trio we have come up with a working slide show. I am releasing the basic widget version and CatDude is working on a GUI 'standalone' version which will probably end up as the 'official' 'Xlideshow'.
Notes
You should have 'xli' if you have Pwidgets, if not you can get conky-1.6.1.pet plus dependencies, it includes xli, and also needed is Scale2pics
Download and install 'xlideshow-0.0.1.pet'
It installs a directory called images.
Put .png or .jpg images in there, say up to 20 for a machine under 1gig processor, 25 to 50 for up to 2gig, 55 to 100 for a 2gig and over with a gig of ram. These are just guesses, I tested on my 1066Mhz CeleronM, with 512MBram with 25 images of various sizes. Keep the speed of your machine and size of images in mind. NO responsibility taken if your machine crashes, use at your own risk, sorry must say this stuff, you know
That's it. Start it from the menu or drag ~/my-applications/bin/xlideshow.sh to the desktop, or, type 'xlideshow.sh' in a terminal. In Jwm it is normal to see the commentary in the bar. Icewm won't do it. Not tested on other WMs but should work. Edit:Ok, icewm will do it but there is a fix; insert
Code: | #xli picture viewer
WM_CLASS=xli
WM_NAME=xli
xli.layer: Desktop
xli.allWorkspaces: 1
xli.dBorder: 1
xli.dTitleBar: 0
xli.ignoreTaskBar: 1
xli.dMaximize: 0
xli.dMinimize: 0
xli.dRollup: 0
xli.dResize: 0
xli.dClose: 1
|
at the end of ~/.icewm/winoptions
Not tested with Xvesa. Testers?
There is still work to do. Feedback is important.
.Changelog
27dec08: uploaded xlideshow-0.0.1
can now set position on screen, can change coordinates to suit your resolution, just open '~/my-applications/bin/xlideshow.sh' in a text editor and alter the values after '-geometry', thx trio
Empties '~/scaledimages' automatically, thx CatDude
28dec08: removed old versions, you can hack away at the latest one
Description |
|
Filesize |
48.59 KB |
Viewed |
1170 Time(s) |

|
Description |
|

Download |
Filename |
xlideshow-0.0.1.pet |
Filesize |
1.17 KB |
Downloaded |
677 Time(s) |
_________________ Puppy Linux Blog - contact me for access
Last edited by 01micko on Sun 28 Dec 2008, 01:42; edited 14 times in total
|
Back to top
|
|
 |
J-Bob

Joined: 09 Feb 2008 Posts: 283 Location: Canada
|
Posted: Sun 21 Dec 2008, 13:16 Post subject:
|
|
I'm not much of a coder, but i might be able to rig it to build a bugfixing splash screen.
- J-Bob
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1570 Location: UK
|
Posted: Sun 21 Dec 2008, 16:00 Post subject:
|
|
Hello 01micko
I thought i would give this a go, and report my findings.
I followed your instructions (to the letter)
but i had to make: /root/xlideshow.sh
executable for it to run.
01micko wrote: |
Put any size image you want in the ~/images folder.
|
Did that, all of the following images are 800x600
/root/images/Vista1.jpg
/root/images/Vista2.jpg
/root/images/Vista3.jpg
/root/images/Vista4.jpg
/root/images/Vista5.jpg
/root/images/Vista6.jpg
Here are the contents of: /root/scaledimages
/root/scaledimages/01.jpg................(140x90)
/root/scaledimages/Vista1.jpg.........(107x80)
/root/scaledimages/Vista2.jpg.........(107x80)
/root/scaledimages/Vista3.jpg.........(107x80)
/root/scaledimages/Vista4.jpg.........(107x80)
/root/scaledimages/Vista5.jpg.........(107x80)
/root/scaledimages/Vista6.jpg.........(107x80)
At line 15 of: /root/xlideshow.sh
it has the following:
Code: |
scale2pics ~/images ~/scaledimages 120 80 100 jpg &
|
Am i correct in thinking that that translates as, 120 pixels wide x 80 pixels high with 100% quality ?
if so, then where does the 107 pixel width come from ?
The attached image shows the contents of: /root/images and /root/scaledimages
it has been edited to show both the first image (01.jpg) and the second image (Vista1.jpg)
for comparison.
01micko wrote: |
The slide show will show up somewhere, probably topleft, of your screen and should endlessly loop.
|
The center of the xlideshow window appears at roughly 360x380 on my desktop (running at 1280x960),
and it does indeed loop endlessly.
If you want me to try anything, just ask.
CatDude
.
Description |
just for comparison |
Filesize |
121.49 KB |
Viewed |
1511 Time(s) |

|
_________________

|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Sun 21 Dec 2008, 16:22 Post subject:
|
|
Catdude
Yep, was late at night when I posted that and I was trying different resolutions. Should keep it at 120x80 for now. (I'll edit post)
Please hack away! I'd appreciate it. Add, takeaway, rewrite, whatever tweaks you can come up with.
Funny about the permissions on ~/xlideshow.sh. Any way I'll add that too. Even wierder the 107x80. Might have something to do with that 140x90 error. Anyhow resize that to 120x80 and have another go. You are correct with the "120 80 100" line
Cheers
PS, I checked the file I uploaded and it was executable on my system. Strange. Anyways, reuploaded a fresh one, no changes.
PPS: Catdude! I did the sums and 107x80 is the correct aspect ratio for any standard, (ie not widesceen) screensize. The 120x80 allows for a little wider image. If you try some other sizes, even portraits you will find that the height remains constant, this will be good for Pwidgets. The exception will be anything with a wider aspect ratio than 120x80 so I probably should alter the x value to something like 140, that way widescreen images should render correctly. Also banners will be limited to that width, but who wants banners in a slideshow?
Update: I have had xlideshow running for 4 hours straight now with no issues so I think we have a solid foundation to build on.
Update 3 hours later: still running and started it by clicking once on the excecutable.
Another Update: CatDude has tested and provided useful feedback, there are 7 others out there in the puppy-internet-wilderness that have downloaded this script. Feedback? Does it work for you? Are your machines crashed and burnt?
Have fun!
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Wed 24 Dec 2008, 03:07 Post subject:
Subject description: xlideshow-0.0.0.pet |
|
I have made it easier. Made the .pet for xlideshow.
Notes-
Must be run from command line with the code
or click on ~/my-applications/bin/xlideshow.sh
It will crash X if you try to make a short cut. (maybe?)(must investigate)
Dependencies are not in the .pet so you will still need 'xli' and Scale2pics.
Have changed the image maximum size to 140x80 to better support widescreen images.
There is already an image in '~/scaledimages' named '01.jpeg'. You can change it to whatever you want but it must be named '01.jpeg' and should be <140 wide x 80 high. On a slow machine try it with up to 10 images. A fast machine should handle 30 or 40. Jpeg or png images can be used but png images will be slower, as will very large images, bear that in mind, consider your machine's speed. Place images in '~/images' (which the .pet created).
Don't worry, it will take 15.5 seconds to load even on the latest machine, be patient.
Enjoy!
Edit: Ok, it will crash X if you start it from a shortcut, but you can call it from a simple script (it is designed to be called from a script any ways)
. Code: | #!/bin/bash
xlideshow.sh
|
Name it something like 'startslide.sh'.
Make it executable and your away. In a terminal type
Code: | chmod 755 startslide.sh |
newer version: see main post
Description |
|
Filesize |
28.16 KB |
Viewed |
1392 Time(s) |

|
Description |
|
Filesize |
77.33 KB |
Viewed |
1515 Time(s) |

|
_________________ Puppy Linux Blog - contact me for access
Last edited by 01micko on Fri 26 Dec 2008, 23:55; edited 1 time in total
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1570 Location: UK
|
Posted: Thu 25 Dec 2008, 20:26 Post subject:
|
|
Hello 01micko
01micko wrote: | Zigbert said that with clever use of xli that we might be able to come up with a slideshow widget for Pwidgets. Well, I had a go, and I have limited (ie; nil) coding skill.
|
And i have even less
01micko wrote: |
Please hack away! I'd appreciate it. Add, takeaway, rewrite, whatever tweaks you can come up with.
|
So i did.
Here's the score.
With the attached script (a hybrid, bits of Pwidgets & bits of Pwget)
it is possible to:
Choose from a combobox, what size xlideshow displays at.
Choose from a combobox, the quality of the images displayed.
Choose from a combobox, the delay between each image being displayed.
Select any directory containing images for the xlideshow.
Dependencies are the same as you stipulated in your original post.
To get my script to run you need to do the following:
1) Download and install Scale2pics.pet and xli should be on your system
2) Get the script catdudes-xlideshow.sh.tar.gz, and .xlirc.gz unzip them in the root directory.
3) Create a ~/scaledimages directory
You do not need to put an image named '01.jpg' into the ~/scaledimages directory,
when you run the script it will create a blank file called '01.jpg', which seems to work OK.
Each time the script is run, it will delete ALL files in the ~/scaledimages directory,
and re-create the '01.jpg' file.
I have run it from a desktop shortcut, the iceWM menu and by just clicking on it, without any crashes or anything.
The code is probably not as correct as it should be (like i said above, i have no experience really)
and i am sure that it could be cleaned up some, by someone who knows what they are doing.
I attach a couple of images to show what it looks like.
CatDude
.
P.S
My apologies to Lobster & Zigbert for butchering their code,
but we have to start somewhere now don't we.
 |
Description |
|
Filesize |
17.54 KB |
Viewed |
1395 Time(s) |

|
Description |
|

Download |
Filename |
catdudes-xlideshow.sh.tar.gz |
Filesize |
941 Bytes |
Downloaded |
633 Time(s) |
_________________

|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Thu 25 Dec 2008, 21:47 Post subject:
|
|
Thanks CatDude!
Runs perfect!
Todo list:
must set the position of the show. There is an option called '-at' in xli. Also have to make it run quiet. There is a quiet option too. I'll see what I can do, you too, see what happens.
brings up the interactive help menu in xli. I haven't had much luck yet but I'm sure it isn't too hard.
Love it!
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1570 Location: UK
|
Posted: Fri 26 Dec 2008, 07:38 Post subject:
|
|
Hello Micko
01micko wrote: | Thanks CatDude!
Runs perfect!
|
That's good to hear.
01micko wrote: |
Also have to make it run quiet. |
What do you mean by quiet ?
CatDude
.
_________________

|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Fri 26 Dec 2008, 08:10 Post subject:
|
|
CatDude wrote: | ]
What do you mean by quiet ?
CatDude
. |
Get rid of the commentary, I see by your screenshot you have it. I'm gonna have a look at some more of zigbert's work. I've been a bit tied up at the moment.
Thanks
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1570 Location: UK
|
Posted: Fri 26 Dec 2008, 08:39 Post subject:
|
|
Hi
01micko wrote: |
Get rid of the commentary, I see by your screenshot you have it. |
Are you refering to the stuff in the titlebar ?
I noticed in your images above:
xlideshow-crop.jpg
xlideshow-shot0.jpg
it appears that you have no window borders or titlebar, how did you manage that.
CatDude
.
_________________

|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Fri 26 Dec 2008, 08:56 Post subject:
|
|
I just reproduced what you have in Icewm. I was using JWM. Seems Icewm starts xli in a window, interesting.
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
trio

Joined: 21 Dec 2008 Posts: 2083 Location: अनुमोदना
|
Posted: Fri 26 Dec 2008, 09:02 Post subject:
No border and window position how to Subject description: to place xlideshow on spesific spot at permanently and remove the border |
|
CatDude wrote: | Hi
01micko wrote: |
Get rid of the commentary, I see by your screenshot you have it. |
Are you refering to the stuff in the titlebar ?
I noticed in your images above:
xlideshow-crop.jpg
xlideshow-shot0.jpg
it appears that you have no window borders or titlebar, how did you manage that.
CatDude
. |
Hi, I just want to share, you cannot set a spot for where the xli window should appear with xli command or to make it without border, but it is actually the a window that is controlled by your window manager, in my case icewm. you have to add below lines to the /root/.icewm/winoption or if jwm you can edit /root/.jwmrc (but that is all different command lines):
#xli picture viewer
WM_CLASS=xli
WM_NAME=xli
xli.layer: Desktop
xli.allWorkspaces: 1
xli.dBorder: 1
xli.dTitleBar: 0
xli.ignoreTaskBar: 1
xli.dMaximize: 0
xli.dMinimize: 0
xli.dRollup: 0
xli.dResize: 0
xli.dClose: 1
xli.geometry: +890+560
Description |
see i use border for the xlideshow, you can totally remove by putting 0 value to respective line as i explained |
Filesize |
53.28 KB |
Viewed |
1316 Time(s) |

|
|
Back to top
|
|
 |
trio

Joined: 21 Dec 2008 Posts: 2083 Location: अनुमोदना
|
Posted: Fri 26 Dec 2008, 09:17 Post subject:
Additional info Subject description: for persistance xlideshow window to a certain size |
|
use this script:
sleep 0.5
xli -fit -geometry 100x80 -delay 5 -goto ~/scaledimages/01.jpg ~/scaledimages/*.jpg
|
Back to top
|
|
 |
trio

Joined: 21 Dec 2008 Posts: 2083 Location: अनुमोदना
|
Posted: Fri 26 Dec 2008, 09:28 Post subject:
|
|
Another one of my puppy desktop
Note: if you don't put -geometry ...x.... in the script, then you'll get a window that always resizing to the size of the picture...
Description |
|
Filesize |
35.69 KB |
Viewed |
1314 Time(s) |

|
Last edited by trio on Fri 26 Dec 2008, 10:22; edited 1 time in total
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 8670 Location: qld
|
Posted: Fri 26 Dec 2008, 09:29 Post subject:
|
|
Thankyou trio!
And I'm sure onbehalf of CatDude!
Works a treat. Just had to adjust x y values for my screen res.
I figured some type of config file would be the go, and may still be. We have to try and please Jwm and Icewm.
Ok trio, just read you posted again about geometry, will try that and get back.
Cheers
Description |
|
Filesize |
22.74 KB |
Viewed |
1425 Time(s) |

|
_________________ Puppy Linux Blog - contact me for access
|
Back to top
|
|
 |
|
Page 1 of 2 [27 Posts] |
Goto page: 1, 2 Next |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|