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
14.38k stars 1.03k forks source link

Adjust volume incrementally through livelycu... #2307

Closed OGbilboswagins closed 2 days ago

OGbilboswagins commented 6 days ago

Being able to send commands to lively through cli is awesome. Right now I am in the process of creating another new Rainmeter skin suite and have been experimenting with sending commands to it through Rainmeter by use of bangs and such. Right now I am stuck on trying to adjust the volume of the current wallpaper incrementally. I have read through the docs and it mentions being able to use '++5' when adjusting things like saturation, however, only values from 0 to 100 are mentioned for volume. I have been brainstorming about how maybe I can keep track of the volume through Rainmeter with variables independent of Lively but I can't figure out how to reset the volume variable back to the default wallpaper volume on boot or exit without getting too hacky with it. So I decided it would just be easier to talk to you guys about maybe adding an incremental option to the '--volume' param. Or maybe there is already a solution that I haven't run across but I have searched google, ddg & bing with no dice.

I wish a Lively plugin for Rainmeter existed. I'm interested in creating one in the future. I just need to spend a little more screen time with them supplemented with some good old due diligence and maybe some discussions from time to time. But until then I just need to figure out how to control the volume incrementally through Rainmeter.

Thank you all for your hard work and dedication to such an amazing application.

rocksdanister commented 6 days ago

Volume is actually global in-app setting and not wallpaper setting so that's why there is no increment.

I will add increment support in a future update but going forward I am thinking of making volume also wallpaper setting similar to Choose a Fit which was originally in app.

rocksdanister commented 6 days ago

Ops looks like I can't change the volume to string without breaking compatibility since its defined as an integer:

https://github.com/rocksdanister/lively/blob/96d535313768cf11ca2037a4a3d8342c72d6afb0/src/Lively/Lively.Common/AutomationArgs.cs#L30-L33

rocksdanister commented 2 days ago

Should be available in next update.

Syntax is +/- similar to seek wallpaper: https://github.com/rocksdanister/lively/wiki/Command-Line-Controls#seek-wallpaper

rocksdanister commented 21 hours ago

If you are interested, for the Rainmeter plugin you can call Lively directly without the command utility: https://github.com/rocksdanister/lively-commandline-arduino/tree/main/Rotary%20Encoder/C%23%20Sample/Lively.IPC

OGbilboswagins commented 9 hours ago

Man, you are on it. I apologize for not getting back to you quicker. I have been playing around with other things and trying to update my environment.

I have looked through Lively's code a little, but my C skills could use some work to say the least. My hatred for Microsoft gets in the way of things, like setting up and learning github etc. 😄 But I digress...

I saw where volume was defined as an int and not a string and knew I wouldn't be able to control it incrementally without setting up a variable in Rainmeter to keep up with it. I was certain that would break quickly and cause problems without lua, a plugin, a change to Lively's code, or a combination.

Making it a wallpaper setting similar to 'choose fit' is actually a great idea imo and I think you nailed it harkening it to the seek function also. The seek function has the optional monitor index int that can be passed to it, which in my mind wouldn't be necessary for volume, however, it would be nice if volume could continue to be passes as an int, as well as additionally be passed as a string to Lively or livelycu as --value +/-i like seek. Like inside the GUI there could be a slider inside the Choose Display/Wallpaper window for adjustment and could be passed to livelycu as +i .

I'm not completely sure but it seems like when you click the 'customize' button inside Choose Display it is calling up the LivelyInfo.json associated with that particular wallpaper. I think maybe it does this to pull the variables, args etc., as well as their default values, for the desired settings. Their may be times where one may want the wallpaper to start muted by default but that could almost be just a global setting found in preferences, like next to the global volume setting. The global volume setting is perfect because it is more likely that one would desire to manage the volume globally instead of on a per wallpaper basis. Maybe on a per monitor basis but that doesn't make much sense to me either because one wouldn't want two wallpapers playing simultaneously.

I almost think that volume could be a global setting only, setting their defaults in preferences and not in the wallpaper customization section at all. This would clean the code up a little and simplify the way volume is handled in Lively. Though this is not to imply in any way that your code is not clean. It is quite the contrary. Volume just seems scattered and too granular in scope as opposed to centralized and granular in the way it is controlled. This tradeoff might not be worth the hassle though depending on how much of the code would need to be changed but that is up to the coder to decide 😉 . Code and let code is what I always say lol.

Thank you so much for getting back to me so fast. Lively absolutely rocks and I have fun messing with it all of the time. I look forward to the future update with incremental volume support and will continue to play with it while developing this skin suite I am working on. Who knows, maybe a Lively.dll for Rainmeter will be the result. I just need to get more familiar with C, Visual Studio, VS Code, Microsoft, Microsoft, lol, a little more of my hair falls out... before you know it I'm bald. I will get there though as long as I keep queen Cortana happy and lord Copilot lets me keep my life and doesn't add me to 'THE LIST' 😆.

OGbilboswagins commented 8 hours ago

If you are interested, for the Rainmeter plugin you can call Lively directly without the command utility: https://github.com/rocksdanister/lively-commandline-arduino/tree/main/Rotary%20Encoder/C%23%20Sample/Lively.IPC

I read this is the docs, however, my goal, hopefully, is to be able to give the potential end user the choice of using the Lively GUI or just the lighter livelycu.exe with my skin suite. This may not be necessary though and kind of depends on how granular and complex the integration of Lively with my suite becomes. I won't really know until then. The experience for the end user might be best if they use the GUI with my skins but I need to play around with them some more to see and make that determination.

I just got done messing with the HWinfo integration and man was that time consuming. HWinfo recently made the shared memory option a premium option so you have to grab the data from HWinfo through the Windows registry as opposed to grabbing it straight from HWinfo through the plugin. Not hard, it just took forever. I didn't think it would get done and if it ever breaks I probably will too 🤣 .