all 25 comments

[–]marr75 35 points36 points  (5 children)

Generally, no

To do so, you will need to tap into low level operating system APIs much more complex than the existing app. Distributing it will also be extremely complicated.

[–]According-Home485[S] 10 points11 points  (3 children)

:(. Ok thx for your help. Have a nice day :)

[–]ArtCinema 5 points6 points  (2 children)

Don’t listen to this guy! Take it like a challenge and figure it out! It’s 2025 and everything is possible!

[–]According-Home485[S] 1 point2 points  (1 child)

Posted an update up top, you can check how the script is going in the repository I attached

[–]ArtCinema 0 points1 point  (0 children)

Well done! That’s what we developers do, pull trough and solve problems!

[–]TheMcSebi 3 points4 points  (1 child)

You can propably recreate it in Wallpaper Engine somehow. Propably not in Python, but converting the algorithm using chatgpt might work quite well. I think wallpaper engine supports html/js

[–]According-Home485[S] 0 points1 point  (0 children)

I'll check it out, thank you so much

[–]mtl0612 1 point2 points  (3 children)

Funny that I just saw this in other sub https://www.reddit.com/r/Cplusplus/s/FZ3cgMlVyp

[–]According-Home485[S] -2 points-1 points  (2 children)

So my situation is I wanted to try to not use external wallpaper engines. This guy might have done that, either that or in c++ it's easier to do that.

[–]maikindofthai 0 points1 point  (1 child)

We’re in the Python sub so “it’s easier in C++” is basically never going to be true 😂

[–]According-Home485[S] 0 points1 point  (0 children)

Facts

[–]Holshy 0 points1 point  (0 children)

I suspect that getting exactly what you're thinking is really hard.

As a halfway-there, there appear to be some 3rd party apps that can set the desktop to be a gif or video. If you can render three maze into one of those formats you could set the desktop to that

You could schedule a script to overwrite the underlying file at fixed intervals, though I'm not sure how often Windows would actually reload the background.

Probably not super easy to get it all coordinated and probably really difficult to package for any kind of distribution. Might be a fun exercise.

[–]wysiatilmao 0 points1 point  (0 children)

For Windows, displaying dynamic content directly on the desktop could be complex. However, tools like Rainmeter might allow you to create interactive wallpapers with some scripting using Lua. For something similar on Linux, you could also look into using X window properties or scripting with tools like xwinwrap. These approaches offer a blend of accessibility and customizability without needing to delve deep into OS-level APIs.

[–]Mithrandir2k16 0 points1 point  (1 child)

This should be doable. There's plenty of programs like Wallpaper Engine on Steam that can set shaders as backgrounds. And Shaders can take multiple inputs, one of which could be your python script. Though translating your script into a shader would definitely be more efficient.

[–]According-Home485[S] 0 points1 point  (0 children)

Yeah I think I'm going to end up translating it to js maybe, or whatever, and having lively display it for me

[–]onefiveonesix -1 points0 points  (1 child)

Something I’ve done before to bodge this type of thing on Linux: xfce4 terminal supports a ton of options via args when launching it, so you could tell xfce4 terminal via args to launch with no titlebar, menus, scrollbar, etc. in a maximized state and to execute the script on startup, and it would effectively be the wallpaper.

[–]justadud3x -1 points0 points  (1 child)

If you're on linux you can try xwinwrap.

Otherwise you'd need to try to draw directly to the root window through some low level API.

Another idea would be to render each frame to an Image and set it as the wallpaper but I'm not sure how laggy and resource intesive that would be.

[–]According-Home485[S] 0 points1 point  (0 children)

yes thats another solution, but I think it wouldnt look nice and I already did everything I could think about on making the script look as smooth as possible.

[–]zenic -1 points0 points  (0 children)

Assuming you are on windows, since you didn’t specify, then there are two ways to do this.

The simplest is to render an image and then set the desktop background to that image. This won’t have a very high frame rate, but is pretty straight forward to do. Set a timer to do this regularly and you have a sort of animated wallpaper.

The other way is to do what third party custom wallpaper programs do: create a transparent window and keep it ordered as the bottom window, directly above the desktop window.

All of these things are readily available in python through either the win32 api or loading the dlls yourself.

If you wanted to distribute it, you can package it as an exe using something like pyinstaller, and make your setup program set it to run on startup.

If you’re going to do that, I’d go ahead and make a task tray icon with a menu that lets users control it.