Animated Gif wallpaper

A home for all kinds of Puppy related projects
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#16 Post by greengeek »

puppyluvr wrote: As for the wallpaper request I found it is possible.
Using xwinwrap from here:
http://tech.shantanugoel.com/resources/ ... inwrap.zip.
I havent had any success with this yet. Anyone else getting this going ok yet? Will keep trying.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#17 Post by goingnuts »

I got xwinwrap working - sort of. Below script runs OK but I need to give focus to ROX background for the image to turn up (click on the background)...Thats a ROX-thing - running without ROX shows image immediately on the root-background

Code: Select all

#!/bin/sh
# Uses xwinwrap to display given animated .gif in the center of the screen
#original from https://sathisharthars.wordpress.com/tag/xwinwrap/
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 image.gif
exit 1
fi

#get screen resolution
SCRH=$(xrandr | awk '/current/ { print $8 }')
SCRW=$(xrandr | awk '/current/ { print $10 }')
SCRW=${SCRW%\,}

#get gif resolution
IMGHW=$(gifsicle -I $1 | grep logical | cut -d " " -f5)
IMGH=${IMGHW%x*}
IMGW=${IMGHW#*x}

#calculate position
POSH=$((($SCRH/2)-($IMGH/2)))
POSW=$((($SCRW/2)-($IMGW/2)))

xwinwrap -g ${IMGHW}+${POSH}+${POSW} -ov -ni -s -nf -- gifview -w WID $1 -a

exit

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#18 Post by puppyluvr »

:D Helli,
Its amazing what a single question can produce here!!!
8)
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#19 Post by ETP »

Even later to the party :) I stumbled accross this site this morning and took a fancy to the rotating globe:

http://eventregistry.org/

Incorrectly assuming at first that it was an animated gif I googled "Puppy Linux animated desktop" which
brought me to this thread. Upon returning to the above site it transpired that it uses I think, a series
of png files. A different approach was therefore needed which for the record I am including here.

That involved capturing a 47 second 30fps mkv video using SSR and then using mpv to play a looped video of the recording.
The wallpaper was set to match the background of the video.
mpv has about 470 cli commands including --geometry so it is possible to play such a video anywhere on screen and
to resize it. CPU usage is only 1%.

As I wanted it center screen I however called another script to do that.

A one minute 1080p unlisted YT video of the result follows together with copies of the scripts:

https://youtu.be/7FThgscLkTI

Code: Select all

#!/bin/sh
#
# This is mpv_test_globe.sh      ETP 10th July 2017.
#
#sleep 20 # Uncomment & adjust period as required if this script is placed in /root/Startup
#
/usr/bin/mpv --no-border --loop /root/Downloads/globe.mkv &
#
# Extra script called to ensure any window is always centered on screen. ETP JUly 2017
#
sleep 1.5
bash /root/noob/center_active_window.sh

Code: Select all

#!/bin/sh
# This is /root/noob/center_active_window.sh  ETP 2nd May 2017.
# Call it from the end of any other launch script using the bash command to center app window on any screen.
# Bash is used in order to allow command substitution. Add a sleep of 2 or 3 seconds to allow app such as
# vlc to launch before calling it. (See example in /root/noob/BBC_News_Live_720p
#
#
IFS='x' read screenWidth screenHeight < <(xdpyinfo | grep dimensions | grep -o '[0-9x]*' | head -n1)

width=$(xdotool getactivewindow getwindowgeometry --sh | head -4 | tail -1 | sed 's/[^0-9]*//')
height=$(xdotool getactivewindow getwindowgeometry --sh | head -5 | tail -1 | sed 's/[^0-9]*//')

newPosX=$((screenWidth/2-width/2))
newPosY=$((screenHeight/2-height/2))

xdotool getactivewindow windowmove "$newPosX" "$newPosY"
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

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

#20 Post by rufwoof »

Thanks for sharing that ETP.

I had to add a inf (for infinite loops) parameter to the loop option. I used openshot to create a 3D title (rotate), but that had a grey background. I edited the rotate.py script as per this posting hoping for a transparent background, but it was black.

I've also been playing around with Mike's type desktop theming/layout. What with that animation and gkrellm presenting system monitoring updates ... quite a busy desktop

Fun stuff to whileaway some humid time in front of the ac. Thanks.
Attachments
s.jpg
(40.38 KiB) Downloaded 890 times

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

Re: Animated Gif wallpaper

#21 Post by rufwoof »

greengeek wrote:I would like my Puppy to have an animated gif as it's desktop wallpaper. Is this possible? If not can anyone suggest a way it could be attempted?

ps: If it isn't possible to have the whole wallpaper as an animated gif I would probably settle for having a portion of the desktop displaying an animated gif if it could be displayed without borders or title bar - eg: I could have a black desktop with an animated gif in the centre.
(Probably the gif portion would be incapable of supporting icons - but I could live with that if theres no other way).
This works ...

Code: Select all

mplayer -loop 0 -rootwin some-animated.gif
But eats resources, and you have to have the desktop (rox) off ... so no desktop icons (I use pcmanfm --desktop for desktop icon management and ran killall pcmanfm).

Attached image shows giffy.gif (a largish animated gif I downloaded) with that mplayer command running and with pcmanfm --desktop (i.e. rox pin) off.
Attachments
s.jpg
(29.41 KiB) Downloaded 865 times

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

#22 Post by rufwoof »

Needs mplayer and rtmpdump and desktop turned off (just xorg and jwm, no rox pinboard or other desktop)

Code: Select all

mplayer -vf scale -zoom -xy 1280 -loop 0 -rootwin mms://media4.abc.net.au/broadbandkids/20070521_1500/story1hi.wmv
Image

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

#23 Post by rufwoof »

I use .jwmrc as the single control file (settings and startup), messy at present, but I've swapped out the desktop icons manager (pcmanfm --desktop) and instead call a script (that I've called wallpaper)

Code: Select all

   <StartupCommand>setxkbmap -option terminate:ctrl_alt_bksp</StartupCommand>

<!--   <StartupCommand>sleep 8s && pcmanfm --desktop</StartupCommand>  -->
   <StartupCommand>sleep 8s &&exec /home/user/Desktop/Docs/scripts/wallpaper</StartupCommand>
 
   <StartupCommand>numlockx</StartupCommand>
   <StartupCommand>sleep 8s && osmo</StartupCommand>
   <StartupCommand>sleep 4s && xrandr --output DVI-I-2 --mode 1280x768 --output DVI-I-1 --off;sleep 2s &&xrandr --output DVI-I-2 --mode 1280x720_60.00 --output DVI-I-1 --off</StartupCommand>
   <StartupCommand>sleep 8s && radiotray</StartupCommand>
   <StartupCommand>sleep 4s && libreoffice --quickstart</StartupCommand>
   <StartupCommand>sleep 4s && wicd-client --tray</StartupCommand>
   <StartupCommand>sleep 4s && volumeicon</StartupCommand>
that wallpaper script contains

Code: Select all

#!/bin/bash

cd /home/user/Desktop/Docs/scripts
echo lady-gaga-poker-face.mp4 >playlist
echo lady-gaga-judas1.mp4 >>playlist
echo lady-gaga-bad-romance.mp4 >>playlist
echo gossip-heavy-cross.mp4 >>playlist
mplayer -vf scale -zoom -xy 1280 -loop 0 -rootwin -playlist playlist
which just loops through the playlist indefinitely (loop 0) using the root window as the display (I scaled it to my screen resolution level of 1280x720 (720p)).

i.e. the wallpaper is animated in the sense that its a mplayer playlist of vids.

A neat thing is you can just add the desktop icons back in, in my case by running pcmanfm --desktop and the normal icon type desktop appears (and the vids still keep playing, but are sound only). Then stop the desktop ... and the vids appear again. i.e. toggle the desktop (icons) on and off as desired.

I think in rox you could do similar by setting

Code: Select all

rox --pinboard=xxxx
and unsetting (assign a empty value

Code: Select all

rox --pinboard=
Pulseaudio and pavucontrol is quite handy as a single frame shows all of the different channels that are playing and you can dial-up/down the individual channels (maybe turn down the 'wallpaper' to turn up the radio ... or a currently playing youtube ...etc.).

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

#24 Post by rufwoof »

For ROX (tested under tahr 6.0.6 32 bit pae built from WoofCE with mplayer added in)

Turn the pinboard off with

Code: Select all

rox --pinboard=
And back on again with

Code: Select all

rox -p=$HOME/Choices/ROX-Filer/PuppyPin
So if you've set a animation or video to play on the 'desktop', such as

echo $HOME/LadyGagaJudas.mp4 >$HOME/playlist
mplayer -vf scale -zoom -xy 1280 -loop 0 -rootwin -playlist $HOME/playlist

You can toggle between seeing the normal (rox pin) desktop icons, or the video/animation that's playing

Could be useful for a Puppy News type setup, perhaps where a weekly/monthly/whatever news video is downloaded and set to loop play on the normally hidden desktop, but where a toggle button/icon displays/hides that.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#25 Post by greengeek »

Edited first post to also link to the following similar thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=113495

see also http://murga-linux.com/puppy/viewtopic. ... 184#954184

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#26 Post by Puppyt »

Ditto to what greengeek has noted - the two threads showing synchronicity and that great minds are evidently thinking alike - even as different approaches are used for the same aim.
It's all well above my ken, but I was wondering whether the approach outlined in this thread could be similarly used as a screensaver, calling up whatever the mediaplayer might be using in the background? I am using Wary5.5 on an old P3 laptop for the invalided live-in mother-in-law, and have deadbeef etc playing internet country music stations for her. It would be handy to have a large-text crawler of the track details etc. I can't find a mediaplayer that has such a function - perhaps I haven't looked hard enough. Just a thought. Feel free to ignore - cheers
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

Post Reply