Could Puppy use an .xml file for changing wallpapers?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

Could Puppy use an .xml file for changing wallpapers?

#1 Post by Mike Walsh »

Evening, all.

Now, then; this probably sounds a bit of a daft request.

I don't know how many of you have heard about all the 'fuss' generated by Apple's forthcoming release of MacOSX, Mojave. It will feature something called 'dynamic wallpaper'. This is a series of shots of a location in the Mojave Desert, in California, taken at regular intervals during the day. These shots are then translated into a 24-hour long 'slideshow', using an .xml file to control it, determined by your clock's setting.

Essentially, it looks like this:-


Image


OMG!Ubuntu have run an article on this, pointing out that stuff like this has been around in Linux for ages. One of their FaceBook followers, a Vietnamese guy name of Thanh Tran, has assembled an .xml file that controls the series of pictures which he's 'borrowed' from the beta-testing version of Mojave. I've attached the .xml file below, in case anybody's curious. (/home/tranh/ has already been changed to /root throughout.)

https://www.omgubuntu.co.uk/2018/06/mac ... untu%21%29

So; I'm wondering. How could we get the same effect for Puppy users (if anybody's interested, that is?) I'd like to be able to offer this as a .pet package for Puppians. Just d/l, click-to-install, then select it.

Obviously, Pup won't use an .xml file as a wallpaper image; it doesn't 'recognise' the format, for starters. So...

.....anybody got any ideas?? Thoughts??


Mike. :wink:
Attachments
mojave.xml.gz
.xml control file for the Mojave 'dynamic wallpaper'... (remove the fake .gz to view it)
(6.89 KiB) Downloaded 62 times
Last edited by Mike Walsh on Sun 15 Jul 2018, 23:36, edited 1 time in total.

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#2 Post by p310don »

If I remember correctly, I believe puppyluvr made something like this some time back.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

p310don wrote:If I remember correctly, I believe puppyluvr made something like this some time back.
Hi, Don.

Any ideas what it was.....or where it could be found?


Mike. :wink:

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

Wallpaper setter V0.6.6 that comes in most Puppies can already do this.

Start the Wallpaper program.
Under file>Options
There is a setup for a slideshow.

file>Start/Stop Slideshow (controls on/off)

This may give you what you want.
Attachments
capture28356.png
(21.25 KiB) Downloaded 219 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

Thanks for that, bigpup.

Yes, there's possibilities there. However, the really clever part about Thanh Tran's .xml script is that it will always start the 'slideshow' at the correct point according to the time of day. In other words, if you install and start this thing at 2.30 pm in the afternoon, it will automatically start the slideshow with the particular image that covers that time slot.

Also, if you take a closer look at that script, the 24 hours of a day aren't neatly divided up into 16 equal chunks (for the 16 provided images). Some of the night-time ones last for 3 or 4 hours at a time, whereas the daytime ones often only last for an hour or so, often with an 'overlay' transition period.

-------------------------------------------------------

I've had another look at those pictures, and carefully worked out 'timings'. I can say that with certain pictures representing certain 'time-points' throughout the day, then setting them all into 90-minute intervals actually isn't too far out.....so long as the sequence is started at the right time.

That's the point where I come unstuck. How to always start the sequence with Wallpaper Setter at the correct image for the time of day whenever you happen to boot into Puppy? Because I don't think there's that many of us who leave our boxes running 24/7..... I know I certainly don't.


Mike. :wink:

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#6 Post by jafadmin »

For extra points, kids, use zulu/gmt as a reference so that it shows the appropriate image to match the time of day @ the subject location.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

jafadmin wrote:For extra points, kids, use zulu/gmt as a reference so that it shows the appropriate image to match the time of day @ the subject location.
Hi, jafa.

You're talking UTC here, aren't you? I believ 'Zulu' is what the military call it because it comes across more clearly over the radio...


Mike. :wink:

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#8 Post by rufwoof »

Using ROX Soap (assuming rox/pinboards) might do what you need, just have a sequence of images to load in a loop. From http://rox.sourceforge.net/desktop/node/123.html ...

Code: Select all

#!/bin/sh
rox --RPC << EOF
<?xml version="1.0"?>
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope">
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer">
  <SetBackdrop>
   <Filename>$1</Filename>
   <Style>Stretch</Style>
  </SetBackdrop>
 </env:Body>
</env:Envelope>

EOF
Maybe something like (untested) ...

Code: Select all

#!/bin/sh
while ( true ); do
 HOUR_IMAGE=`date +"%H"`.png
 x --RPC << EOF 
<?xml version="1.0"?> 
<env:Envelope xmlns:env="http://www.w3.org/2001/12/soap-envelope"> 
 <env:Body xmlns="http://rox.sourceforge.net/SOAP/ROX-Filer"> 
  <SetBackdrop> 
   <Filename>${HOUR_IMAGE}</Filename> 
   <Style>Stretch</Style> 
  </SetBackdrop> 
 </env:Body> 
</env:Envelope> 

EOF
 sleep 600
done
and where you have a 0.png, 1.png, 2.png ... 23.png i.e. image for each hour
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#9 Post by rufwoof »

I'm using a spartan desktop. Left click shows a selectable list of all windows, right click for selectable list of menu commands, exec key and ? ... (alt-shift ?) and type the first couple/few letters of a program name and enter to execute it i.e. cwm window manager (no titles/buttons) ...etc.

Image

I've just coded a similar sort of thing as what Mike is looking to do, but using 1 minute rotations of the xsetroot (background) colours. Works quite well (a keeper). Image above is a clickable thumbnail that just shows a single snapshot

Code: Select all

#!/bin/sh
while ( true ); do
        T=`date +"%S"`
        T=`expr $T + 30`
        T=rgb:00/$T/$T
        xsetroot -bg $T -mod 3 3
        sleep 10
done
Complete opposite to Mike's crowded desktop. Fundamentally OpenBSD + iridium browser (a version of chrome). cli as 'file manager' etc. vi as text editor. All data stored under root userid, browser runs under a user userid (restricted). docs, spreadsheets etc. via googledocs, browser also serves as video/music player ...etc. For local docs, write them as html, use the browser to print them to pdf. OpenBSD comes with its own httpd (web) server as part of the base system, along with X ...etc. Has its own calculator (xcalc), but I prefer this one instead (have a local copy of the html code/script).

Installs in around 5 minutes, configuration is around a handfull of lines in each of .xinitrc, .Xdefaults and .cwmrc - but where adding the above doubles up on the amount of .xinitrc configuration code - but I can just about tolerate that amount of bloat :)
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#10 Post by jafadmin »

Mike Walsh wrote:
jafadmin wrote:For extra points, kids, use zulu/gmt as a reference so that it shows the appropriate image to match the time of day @ the subject location.
Hi, jafa.

You're talking UTC here, aren't you? I believ 'Zulu' is what the military call it because it comes across more clearly over the radio...


Mike. :wink:
And pilots .. 8)

Post Reply