News for hackers. Stuff that matters.
Re:Show HN: High performance X11 animated wallpapers by glouwbug on Sunday August 02, 2020 @08:46PM (#24033072)
So the animated wallpaper scene on linux is pretty bizarre. There are some popular methods out there like calling `feh --fill-bg` continuously in a bash loop but it sends your CPU usage to an astronomical 40% which drains the laptop battery pretty quickly. I couldn't find a reasonable animated desktop wallpaper setter, so I wrote a little utility in 150 lines or so in C that I call from .xinitrc to randomly pick a fairly unobtrusive desktop scene when I startx.

Quick youtube showcase: https://www.youtube.com/watch?v=6ZTiA885bWM

Re:Show HN: High performance X11 animated wallpapers by jcelerier on Monday August 03, 2020 @03:05AM (#24034902)
for animated stuff I had good results with setting mpv as background. though yours looks like it uses even less CPU, super nice :) will work wonders with https://1041uuu.tumblr.com stuff !

... or at least it would, if I was seeing my desktop background once in a while

Re:Show HN: High performance X11 animated wallpapers by glouwbug on Wednesday August 05, 2020 @03:46PM (#24064779)
True that, MPV is solid. Paperview gives me ~3% cpu usage and ~9% GPU usage on an old x230, while MPV gives me 40% cpu usage for a similar mp4. MPV works great on desktops with mp4s, while paperview is great for laptops and battery life if 15 frame gifs are being rendered (pixel art, of course!)
Re:Show HN: High performance X11 animated wallpapers by yjftsjthsd-h on Monday August 03, 2020 @10:19AM (#24038064)
> ... or at least it would, if I was seeing my desktop background once in a while

One of the very few reasons I miss stacking window managers:)

Re:Show HN: High performance X11 animated wallpapers by jmcqk6 on Monday August 03, 2020 @10:35AM (#24038230)
>setting mpv as background

how does one do this? Just replace the Feh call with mpv?

Re:Show HN: High performance X11 animated wallpapers by jcelerier on Monday August 03, 2020 @10:40AM (#24038288)

    mpv foo.mp4 --wid=0
Re:Show HN: High performance X11 animated wallpapers by Polylactic_acid on Sunday August 02, 2020 @10:29PM (#24033642)
Really it should be something built in to the DE. You need it to stop rendering when the background is covered.
Re:Show HN: High performance X11 animated wallpapers by microcolonel on Sunday August 02, 2020 @10:37PM (#24033691)
You can accomplish this with straight X11, no need for the DE to be aware of it.
Re:Show HN: High performance X11 animated wallpapers by pengaru on Sunday August 02, 2020 @11:33PM (#24033967)
I don't think that's so trivial in a composited world. IIRC once upon a time you could easily get a viewable state from the X server for windows, but with compositing xorg made it basically always true.
Re:Show HN: High performance X11 animated wallpapers by cycloptic on Monday August 03, 2020 @09:52AM (#24037748)
In wayland it's very simple. You would use surface frame callbacks, which aren't supposed to trigger when the window is fully obscured, minimized, or off-screen on another desktop. This mechanism never seems to have made it back into composited X.
Re:Show HN: High performance X11 animated wallpapers by Polylactic_acid on Monday August 03, 2020 @07:16PM (#24044630)
>In wayland it's very simple

This seems to be the trend

Re:Show HN: High performance X11 animated wallpapers by bkor on Monday August 03, 2020 @09:50AM (#24037719)
GNOME has backgrounds which change over the day. That's entirely different from animated though. Reading the GNOME config file, seems the background slowly transitions (fades) from one picture to another. See https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/blob/mast...
Re:Show HN: High performance X11 animated wallpapers by claudiawerner on Monday August 03, 2020 @05:50AM (#24035802)
>There are some popular methods out there like calling `feh --fill-bg` continuously in a bash loop but it sends your CPU usage to an astronomical 40% which drains the laptop battery pretty quickly

Is this true when you have a loop that sleeps for 5 minutes before calling it again? I've always set my wallpapers this way. It's also similar to what I do on Sway. The only alternative I've found is simple enough and still works is using an ad-hoc systemd timer task.

Edit: nevermind, I forgot this is about animated wallpapers. I use a while loop + feh for setting a static wallpaper that changes every 5 minutes.

Re:Show HN: High performance X11 animated wallpapers by IPTN on Monday August 03, 2020 @03:50AM (#24035124)
Did you create those scenes yourself? They look fantastic.
Re:Show HN: High performance X11 animated wallpapers by 0xdeadb00f on Sunday August 02, 2020 @08:59PM (#24033138)
Fantastic work!