Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Option to randomize wallpapers every 5 minutes #69

Open
chrissolanilla opened this issue Aug 3, 2024 · 7 comments
Open

Feature: Option to randomize wallpapers every 5 minutes #69

chrissolanilla opened this issue Aug 3, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@chrissolanilla
Copy link

Hi, I really like the easy of use that waypaper provides. One thing that I usually have when it comes to wall papers is for it to randomly change to a different image after a certain amount of time. Usually I achieve this with a script. When it comes to other operating systems that are not Linux, they support this out of the box sometimes. I would like to propose this idea, and will try to fork my own copy of this repository but with an additional button or option to randomize the wallpaper after some time like 1 minute, 5 minutes, 30 minutes, 1 hour.

@anufrievroman
Copy link
Owner

anufrievroman commented Aug 3, 2024

Hi, thank you for the suggestion. One issue with that is to do that we need to have a running process, i.e. either the GUI should keep running or we need a daemon that will keep counting the time, which is essentially the same as just a bash script:

while true; do sleep 600; waypaper --random; done

Currently, I am not really convinced that we need to convert waypaper into a daemon-like program just for this one feature. Maybe documentation with example of a script to achieve this would be enough.

@chrissolanilla
Copy link
Author

Thank you for telling me a simple way to do the bash script. I was thinking maybe the program could create a bash script for the user, but I understand why you may be adverse to the idea of this feature.

@chrissolanilla
Copy link
Author

I have finished my fork of this project and have opened a pull request. The details are in the pull request. It would mean a lot to me if you accepted the pull request, thanks.

@anufrievroman
Copy link
Owner

anufrievroman commented Nov 18, 2024

Hi, it's been a while. I actually have another idea how to implement randomization on set time without creating more daemons or this kind of things. There is a backend called wpaperd which supports an option of changing wallpaper every set amount of time. So, we could just implement this backend and control this duraiton parameter in the UI of waypaper.

Also, now we moved quite far in the code base, so I'll need to decline your pull request as it cannot be merged anymore. But I think we will implement this functionality in the next version.

Edit: actually that wpaperd turns out to be not very convenient for cli manipulations, and it doesn't start without a proper config. So maybe I'll return to the plan of implementing a daemon that updates wallpaper every specified interval.

@anufrievroman anufrievroman added the enhancement New feature or request label Nov 18, 2024
@jgregoire
Copy link

Have you considered setting up an external timer with cron or systemd?

Linux has these features for just such a task. :)

@anufrievroman
Copy link
Owner

@jgregoire that's might be a good idea. Assuming that we want this to be a functionality of the app (not external script), we need the ability to run a command waypaper --random even N minutes, and we need the ability to both start/stop it from the GUI with a button and automatically start it with waypaper --restore (i.e. when it's launched at the start of the system). How would you do this with cron?

@jgregoire
Copy link

Been too long since I've used a distro without systemd, but IIRC the GUI would have to add an entry to crontab, and delete or comment it out to disable it.

Systemd is easy. Just provide a timer file and a service file to the user. I can write those up and test if that's helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants