macos-wallpaper icon indicating copy to clipboard operation
macos-wallpaper copied to clipboard

Disable automatic changing of wallpaper image

Open jessemillar opened this issue 6 years ago • 4 comments

When I set my wallpaper using wallpaper to a directory instead of an image (e.g. wallpaper set ~/.trunk/wallpaper/desktop), it automatically checks the "Change picture every X minutes" checkbox. This does not happen when I set the wallpaper to a specific file (e.g. wallpaper set ~/.trunk/wallpaper/desktop/foggy-trees.jpg). Is this an Apple-imposed limitation? Or could there be a CLI flag that allows me to disable that functionality?

Screen Shot 2019-03-15 at 11 39 06 AM

jessemillar avatar Mar 15 '19 17:03 jessemillar

What's the point of setting it to a directory if you don't want it to change automatically?

sindresorhus avatar Mar 15 '19 17:03 sindresorhus

I have a manual script setup that runs periodically to change the wallpaper in response to system events. I'd rather not have it change randomly on me via the OS.

jessemillar avatar Mar 16 '19 02:03 jessemillar

There's no macOS API to control this behavior. It's just happens when we pass a directory as wallpaper.

https://github.com/sindresorhus/macos-wallpaper/blob/c226380cf2529b4fa174162a7a1b5bb12ad51f85/Sources/wallpaper/Wallpaper.swift#L109

One solution could be to programmatically change that system preference after setting the directory as wallpaper.

The setting might also be stored in the wallpaper database, not sure, which we do have access to: https://github.com/sindresorhus/macos-wallpaper/blob/c226380cf2529b4fa174162a7a1b5bb12ad51f85/Sources/wallpaper/Wallpaper.swift#L41-L57

sindresorhus avatar Apr 09 '19 11:04 sindresorhus

HI, cool tool! Wondering if you can change the duration of the rotation? My test Mac sets at 30 mins, but I'd like to save it to 8 hours or on login, etc?

Thanks much!

boettchs avatar May 22 '23 19:05 boettchs