Anthonyy232 / Paperize

Paperize is a dynamic wallpaper changer application built for Android using Kotlin, Jetpack Compose, and Material 3
https://anthonyy232.github.io/Paperize/
GNU General Public License v3.0
299 stars 13 forks source link

An option to change wallpapers based on System Theme (Dark/Light) #34

Open Username1-a opened 1 month ago

Username1-a commented 1 month ago

Just would be cool if additional scheduling option was available – changing wallpapers/albums based on System Theme (with that you could have light wallpapers on light theme and dark wallpapers on dark theme)

Anthonyy232 commented 1 month ago

Are you suggesting to have separate albums for light/dark, or having the option for the app to automatically pick a dark/light wallpaper depending on the system theme? If I'm misunderstanding, let me know! Can't promise I'll implement it as it may not be what I have in mind for the app though.

For the former: Consider this app, I've used it before and it works fine. It doesn't support albums but maybe that is something you can suggest to the author to implement as he is quite active. https://github.com/rajaumair7890/Darklify

For the latter: I might be able to implement this, but it may not be completely accurate. There may be some algorithm out there to detect this, but just off the top of my head, maybe something that classifies pixels as light or dark, and then consider the majority count. This sounds interesting and I might give it a try. May you expand on the expected behavior? Does the wallpaper switch immediately when changing device mode, or only when the wallpaper is intended to change (ex: wallpaper changes every 15 minutes, every 15 minutes it checks whether to choose a light or a dark wallpaper)?

Username1-a commented 1 month ago

@Anthonyy232 Thank you for such response To clarify, here's a little image mockup of what the feature could look like: Wallpapers App Paperize Dark Mockup Wallpapers App Paperize Light Mockup

Basically, just an option to set currently viewed Album to follow either a Dark or Light System theme (and of course to disable that functionality if the user doesn't want to use that) should be pretty straightforward (no need to touch any other in-album options like wallpaper time interval scheduling)

Good luck

Anthonyy232 commented 1 month ago

Nice mockups! If you marked an album for light mode, would you be able to select another album for dark mode? Should the album and the wallpaper be changed instantly if the device changes system theme? I just want to get a full grasp on what the expected behavior is, so there is no confusion. Thanks!

Username1-a commented 1 month ago

@Anthonyy232 Sorry for the delay

would you be able to select another album for dark mode?

Sure, it will probably be pretty straightforward for user to first select one album and set it for either light or dark system theme and then vise-versa when selecting other album

Should the album and the wallpaper be changed instantly if the device changes system theme?

Yeah, sure, that would be perfect

Anthonyy232 commented 1 month ago

Okay, sure, I'll see if I can make this work. By the way, I might not finish this for a couple days/weeks -- summer laziness 🤣

Purely visual, haven't done any logic yet, would this work?

image

Username1-a commented 1 month ago

@Anthonyy232 Looks great, good luck to you with this feature, take your time

Anthonyy232 commented 1 month ago

What behavior would you expect if only one album is selected for either dark or light? Currently, I think if the user has only added one album, I may not even show the option enable the sync with system theme. However, if they do have more than one album but if they have selected one album to be either the dark or the light mode album, and haven't selected another album to be the other one, I'm not entirely sure what should occur.

I think I could either: -- automatically select another album at random to be the other one (so if user has manually selected album 0 as light mode, the app will select a random album to be the dark mode album) -- the wallpaper changer only activates during that mode (if user selects album 0 as light mode, the wallpaper changer will only change wallpaper if the device is in light mode, regardless if it is scheduled every 1 hour)

Username1-a commented 1 month ago

Currently, I think if the user has only added one album, I may not even show the option enable the sync with system theme

Sure, that's makes perfect sense (Though, in this case maybe better greying-out the option instead of hiding it, so the user would instantly know that such functionality is possible?)

However, if they do have more than one album but if they have selected one album to be either the dark or the light mode album, and haven't selected another album to be the other one, I'm not entirely sure what should occur

As another variant, perhaps consider just not setting/enabling wallpaper (if the user only selected album for 1 theme) until the user specifically selects both albums for dark and light theme

(Or just set the album wallpaper that user selected for only 1 theme and just keep it without changes per system theme, until user enables the other album for an opposite theme, then per system theme behavior kicks in)

To breakdown, I think it could go something like this:

1) User installs and opens the app 2) Creates only one album yet in Library tab (Album №1) 3) Selects that Album #1 in Wallpaper tab 4) Sees that the option for per system theme album customization is greyed-out 5) Creates second (Album №2) or more albums in Library tab 6) Selects Album №1 in Wallpaper tab and enables per system theme customization for it, for example, sets that Album №1 for Light theme 7) App is setting Album №1 as wallpaper and keeps it without changes when device system theme changes 8) User selects Album №2 in Wallpaper tab and sets it for Dark theme 9) App is now properly changes wallpaper albums based on device system theme

Anthonyy232 commented 1 month ago

Good point. I think to keep it simple, I will simply disable the wallpaper changer until the user selects a second album for the other theme. When the user has created only one album, I will gray out the the option. When the user has only selected one, I will disable the wallpaper changer until either they turn off the setting or select another album for the other theme. May need to use some tooltips or visual indicators.

Username1-a commented 1 month ago

@Anthonyy232 Yeah, that's much better

dessalines commented 1 month ago

Most people don't actively separate their wallpapers into light and dark folders, so a much more user friendly approach, might be to use a library to detect the overall brightness of the upcoming image, and skip to the next one if it's not considered dark (if in dark mode)

Anthonyy232 commented 1 month ago

I think that might be a good idea to try. It certainly simplifies things if it works well enough. I'd have to test it but I like that sound of that.

Username1-a commented 1 month ago

@dessalines The approach with manually created folders is much more streamlined and simple, though (probably simpler to develop, too), so it's better to first work with this UX as a base

Plus, most people don't actively do this because not that many wallpaper apps or Android OS OEM skins even have such a feature, not many of them let you have separate wallpaper for a dark and a light mode to begin with (which is a shame, only iOS allows this afaik) – for example, this app might be the first one to actually let the user have 2 separate slideshows for a dark and a light mode

dessalines commented 1 month ago

There are some launchers (like niagara), that can analyze your wallpaper, and change its text color based on it. For them its impossible to manually tag wallpapers with light or dark.