rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
15k stars 1.06k forks source link

Please add an ability to open app or folder in cefsharp browser. #2084

Closed rzel100 closed 6 months ago

rzel100 commented 9 months ago

Is your feature request related to a problem? Please describe. It is not that a problem. But I just want Lively Wallpaper as good as rainmeter who can open apps or folder from their wallpaper (or widget as you wish to call the rainmeter element that).

Describe the solution you'd like Like you can write this in html.

<a href="openapp:C:PathToExe.exe">Open Notepad</a>

It behave like mailto: on html, Instead this is to open an app. Maybe this StackOverflow Article can help you out. I don't know how to open folder yet. But even if there is only ability to open apps, it is good enough.

Additional context I hope you consider it. Thanks.

rocksdanister commented 9 months ago

Due to security concerns I don't think its good idea to let webpage execute any exe on the system.

For a select number of apps like notepad, chrome etc.. maybe?

Another option is let users map the executable in customise menu as part of LivelyProperties.

rzel100 commented 9 months ago

Yes. I just learn more and realize that you can probably run cmd and do delete c folder or something like that. But yes. mapping the executable on the property is a good idea. Or a shortcut.

I also realize lively can just paste random website to run it. In my mind I just want to create my own very customizable game ui on desktop like imitating the battlefield 5 main menu ui but instead the button is to run my program (well it just chrome etc).

But if the bad is higher than the good, you can close this issue.

vrtxc commented 7 months ago

I've been playing around a bit and a workaround I found is running a local NodeJs server that accepts requests made by the wallpaper. The requests are then run with a simple CMD command. It's a bit more complex than putting it directly into the HTML but it seems to work reliably. This also means that one could do more complex stuff like browse the local file system etc. and configure buttons to do specific things.

rocksdanister commented 7 months ago

That's one way to do it if you don't plan to share the wallpaper with others.

I can't let arbitrary command execution due to security reasons but certain functions can be added with restriction that will work out of the box.

rzel100 commented 6 months ago

First of all. Thanks for this amazing project. I clone lively-cef, Load it on visual studio, And I try to add the stackoverflow code, that I mention in this issue to my cloned project of you and build it and copy the release build to the Lively installation and it seems success now.

I can do what I want now.

Maybe I'll not release it. I'll use it for myself. Thanks. Really, For saying no, Cuz now I learn c#.

rocksdanister commented 6 months ago

Maybe I'll not release it. I'll use it for myself. Thanks. Really, For saying no, Cuz now I learn c#.

Not sure what's with the hostility, I can't implement the original idea from stackoverflow due to security reasons and I also mentioned I have another idea for this feature.

The other idea is very time consuming (creating a customisable menu within the app itself where users can map programs and icons themselves with some defaults) so its been on hold.

You are free to modify and maintain a version lively-cef if that is what you want.. Lively is opensource after all 🤷‍♂️