Komorebi-Fork / komorebi

A beautiful and customisable wallpaper manager for Linux
GNU General Public License v3.0
278 stars 18 forks source link

[Feature Request] Improving compatibility for "Wallpaper Engine" Web #26

Open hexxone opened 4 years ago

hexxone commented 4 years ago

Hi there, I have been researching for a while now on how to get Wallpaper Engine (WE) - Web Wallpapers running on Linux in the best way possible. Gladly I stumbled upon this amazing project :)

My idea would be adding some things to komorebi in order to achieve better compatibility with WE stuff on Linux :) I'd be willing to contribute towards that, even though my current programming-knowledge is more on the Windows-side. I thought about problems that might occur aswell as solutions to them and would be glad to get some opinions.

  1. Add passive audio supplier, basically a js callback function that receives audio samples directly from the system, without the need for the user to initiate it. More details on the Wallpaper's side can be found here: https://steamcommunity.com/sharedfiles/filedetails/?id=786006047 A way for implementing this might be using this: https://www.openhub.net/p/pulseaudio ?

  2. Add RGB device control / mapping Some infos on the Wallpaper's side:
    https://wallpaper-engine.fandom.com/wiki/Web_Wallpaper_iCUE_Reference For easy control & compatibility maybe use this lib: https://gitlab.com/CalcProgrammer1/OpenRGB ? Three solutions came to my mind: A) make this a feature for ALL wallpapers (not web only) by "projecting" a downscaled image from the current wallpaper on to the devices? Would probably require additional user menu, but could ignore to build a WE-API specific interface B) make this a feature for WEB wallpapers only, since the usage of the "WE-API" is pretty different from "OpenRGB" though, building an interface between these would be a lot of work I guess C) do BOTH previous options... even more work and issues to overcome, but with least compromise in functionality

  3. Add user settings-menu Essentially, Wallpaper from WE have a project.json -file which contains the project name, worhsop-id, title, tags, settings, etc. Wallpaper Engine provides these settings as a GUI to the user inside of the application: https://imgur.com/a/2P7ZRyR However it's not that hard to generate a version of this menu yourself. Either add the menus with native gtk or by injecting a variant of the below js should be possible ? I started doing it a while ago, even though imperfect: https://github.com/Hexxonite/audiorbits/blob/master/js/wewwa.js https://experiment.hexxon.me

  4. More compatibility There are other types of wallpapers, which might be worth adding aswell, (Scene & Video) but the priority on those would be a bit lower for me.

As to "why" I or you would want to do that? I think WE is an amazing piece of software, but it's sadly only running on Windows due to proprietary drivers and APIs. Adding said things would make a whole range of new Wallpapers available for komorebi/Linux users and would hopefully motivate them to do more RGB and Gaming stuff on Linux. Oh and did I mention it would be the first of it's kind? ^^

I'd really appreciate some tips or feedback if you think this would be feasible in general, or if there would be alternative and better ways for doing those things :) Thanks if you have read this far !

Kangie commented 4 years ago

It seems like a pretty cool piece of kit, from what I've (briefly) browsed at work today.

To summarise though:

Have I got the gist of this feature request?

Kangie commented 4 years ago

Thinking about it a bit more, the OpenRGB stuff looks pretty cool; not so much as a 'in your case' thing, but it would be great to have lighting behind your monitor adjust to what's happening on the wallpaper, etc. It certainly makes sense to do this globally.

I can see now how the audio input fits into this. Honestly it all sounds like it's within the "scope" of Komorebi, so I'd welcome any contributions around this functionality.

hexxone commented 4 years ago

To summarise though:

  • You'd like to add Wallpaper Engine wallpaper support to Komorebi
  • This includes an audio monitor (for RGB / intensity control?), and API/Controls for the RGB controller
  • Komorebi should parse the WE project.json file for a WE wallpaper and pull config data from it

Have I got the gist of this feature request?

Pretty much :) With one small clarification, Originally the "audio monitor" would deliver the data [128 long fft array] directly to any Web-Wallpaper which has registered the function (window.wallpaperRegisterAudioListener(myCallback)). Independently, the LED API is made available (internally called:window.cue, alias: window.led), which is basically a 1:1 interface of the following lines: https://github.com/CorsairOfficial/cue-sdk/blob/master/src/include/CUESDK.h#L243 Means: any wallpaper could only visualize the audio data OR only utilize LED, but also do both if available.

Thinking about it a bit more, the OpenRGB stuff looks pretty cool; not so much as a 'in your case' thing, but it would be great to have lighting behind your monitor adjust to what's happening on the wallpaper, etc. It certainly makes sense to do this globally.

That's what I also thought. It might be hard to get both global LED and WE-LED working hand-in-hand, but I think some wallpapers are really doing cool stuff with it and it may be worth a try ^^

I can see now how the audio input fits into this. Honestly it all sounds like it's within the "scope" of Komorebi, so I'd welcome any contributions around this functionality.

Thanks for the feedback. I'll do a fork for now and make some experiments in the coming days :)

aMyTimed commented 2 years ago

got an update?