You are not logged in.

#1 2017-07-31 10:45:23

fl4m3ph03n1x
Member
Registered: 2017-07-27
Posts: 22

Wallpaper slideshow with transition effects

I have in my openbox a script that I run when I want to switch wallpapers:

feh --randomize --bg-fill /pathToWallpaperFolder/*

This works wonderfully, except for one thing: I also want transition effects !

After some research, I found a Unix thread:
https://unix.stackexchange.com/question … ransitions


In which the second answer has a possible approach:

- Given an image, create 100 variations of it with increasing opacity, and then make feh display those images, cycling between them as time moves on. A rude/incomplete implementation would be:

mv current.bg old.bg
imagemagick convert old.bg -fill black -colorize 50% transition.bg
feh --bg-scale transition.bg
imagemagick convert new.bg -fill black -colorize 50% transition.bg
feh --bg-scale transition.bg
feh --bg-scale new.bg
mv new.bg current.bg

I honestly find this a horrible idea. If I have 5 images, I will endup with 500. Even if I don't create an image per each 1%, and lets say I drop the opacity every 10%, I will end up with 50 files.

There has to be a better way to have a slideshow wallpaper for open box that changes wallpaper with a transition effect... I just don't know which!

TL;DR
Is there a way to create a wallpaper slideshow with transition effects for openbox?

Offline

#2 2017-07-31 10:55:29

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: Wallpaper slideshow with transition effects

i think the problem here is that it would only apply to a feh slideshow, and not the root window.
it IS possible to get dynamic content on your root window; if you have xscreensaver installed, play around with sth like

/usr/lib/xscreensaver/xmatrix -root

to see what i mean.
you can do this with ALL the screensavers in /usr/lib/xscreensaver.
many other apps have a '--root' option, e.g. mplayer, or mpv (for mpv, use '--wid=0').

you then still have to create the slideshow with transitions. not sure how, but my guess is the existing xscreensaver modules should offer sth.

ps:
conky won't like it.

Offline

#3 2017-07-31 13:08:01

damo
....moderator....
Registered: 2015-08-20
Posts: 4,375

Re: Wallpaper slideshow with transition effects

I think the OP needs a fancy DE, not a nice simple WM.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#4 2017-07-31 14:38:53

fl4m3ph03n1x
Member
Registered: 2017-07-27
Posts: 22

Re: Wallpaper slideshow with transition effects

DE as in Development Environment?
I don't need that tongue

I have chosen BL for a reason. It fits my needs. Now that doesn't mean I can't have some fun making it better/fancier big_smile

Following your advice I have found that by using xscreensaver, the behavior I want should be possible:

sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

Then type:

xscreensaver-demo

Select the folder and tweak as you like. Go to Advanced, copy the command, and paste it in a command line:

/usr/lib/xscreensaver/glslideshow -duration 1 -zoom 100 -pan 1 -fade 8 -no-letterbox

Magic.
Now I just need to know how to make it appear in the background, instead of appearing as a separate app.

Offline

#5 2017-07-31 14:51:46

earlybird
ほやほや
Registered: 2015-12-16
Posts: 603
Website

Re: Wallpaper slideshow with transition effects

fl4m3ph03n1x wrote:

DE as in Development Environment?
I don't need that tongue

I have chosen BL for a reason. It fits my needs. Now that doesn't mean I can't have some fun making it better/fancier big_smile

Following your advice I have found that by using xscreensaver, the behavior I want should be possible:

sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra

Then type:

xscreensaver-demo

Select the folder and tweak as you like. Go to Advanced, copy the command, and paste it in a command line:

/usr/lib/xscreensaver/glslideshow -duration 1 -zoom 100 -pan 1 -fade 8 -no-letterbox

Magic.
Now I just need to know how to make it appear in the background, instead of appearing as a separate app.

Try the `-root` parameter.

Offline

#6 2017-07-31 16:40:00

fl4m3ph03n1x
Member
Registered: 2017-07-27
Posts: 22

Re: Wallpaper slideshow with transition effects

Tried a basic example with root.
The result is... not what i expected. It replaces the entire window covering everything, making the whole system unusable.

Are there any other tools you may know about ?

EDIT
I know it is possible to use xscreensaver as wallpaper, at least in unity.

sudo apt-get install gconf-tools
gconftool-2 -type bool -set /apps/nautilus/preferences/show_desktop false /usr/lib/xscreensaver/glmatrix -root

https://askubuntu.com/questions/390087/ … r-in-unity

Is there a way to do something similar for openbox?

Last edited by fl4m3ph03n1x (2017-07-31 16:51:57)

Offline

#7 2017-07-31 16:44:27

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Wallpaper slideshow with transition effects

fl4m3ph03n1x wrote:

DE as in Development Environment?

No, DE as in Desktop Environment, such as GNOME or Plasma (née KDE) — I prefer GNOME myself.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#8 2017-07-31 20:36:15

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: Wallpaper slideshow with transition effects

There is no reason to create any extra files save for performance. Imagemagick convert and feh handle stdout and stdin; use a pipe:

imagemagick convert current.bg TRANSFORM jpg:- | feh --bg-scale -

Replace TRANSFORM with imagemagick commands/options customized for your fade-to-black, fade-and-dissolve, or whatever blend you are trying to achieve.

Iterate this in a for loop 100 times for your 1% transitions without creating a single new file.

# assuming /bin/bash
for ((N=0; N<100; N++)) ; do
    imagemagick convert current.bg TRANSFORM-ON-N jpg:- | feh --bg-scale -
done

These are partial code examples. You will need to customize the feh options and convert TRANSFORM-ON-N commands/options to suit your application. I expect the 1% transition will prove slow/processor intensive; incrementing by 10, 5, or even 2 would be dramatically faster. If the transformed image already fits the display, feh --bg-center would be faster than feh --bg-scale.

Offline

#9 2017-08-01 04:59:57

ohnonot
...again
Registered: 2015-09-29
Posts: 3,191
Website

Re: Wallpaper slideshow with transition effects

^ clever alternative.
not sure how it works performance-wise, maybe xscreensaver with opengl is better suited?

fl4m3ph03n1x wrote:

Tried a basic example with root.
The result is... not what i expected. It replaces the entire window covering everything, making the whole system unusable.

are you sure?
the conkies won't play nice with it, but the tint2 panel should still be there, right-click menu should still work, in other words: usable. i just tried it.
and pretty much exactly what you asked for.

are you actually using a plain openbox environment? or is something managing your desktop?

also see this.

Offline

#10 2017-08-01 10:46:43

fl4m3ph03n1x
Member
Registered: 2017-07-27
Posts: 22

Re: Wallpaper slideshow with transition effects

Hey guys, thanks for the input.

I am using conky thus far, and I would like to keep it. I understand xscreensaver has compatibility issues with it so I would like to stay away from that option.

Which leads me to imagemagick (as suggested by cpoakes)!

So far I tested with the following command:

convert /home/USERNAME/Pictures/wallpapers/wallhaven-72201.jpg -alpha set -channel A -evaluate set 10% png:- | feh -bg-fill -

Which does kinda work ... The one problem I have with this approach is:

1 - it open the feh app, instead of setting the image as a wallpaper.

Is this a consequence of piping the result? Any suggestions would be appreciated !

Last edited by fl4m3ph03n1x (2017-08-01 10:47:14)

Offline

#11 2017-08-01 19:51:37

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Wallpaper slideshow with transition effects

fl4m3ph03n1x wrote:
feh -bg-fill -

Is that a typographical error in the command or a transcription error copying the command here?

It should be:

feh --bg-fill -

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#12 2017-08-02 07:13:11

fl4m3ph03n1x
Member
Registered: 2017-07-27
Posts: 22

Re: Wallpaper slideshow with transition effects

@Head_on_a_Stick

A typo in the command which caused the wallpaper not to be set. Damn .. Thanks for spotting that !

Offline

Board footer

Powered by FluxBB