Where does macOS store the desktop picture change time?

99 views Asked by At

I want to determine programmatically whether a user has enabled automatic desktop picture change in the background & screensaver preferences or not (and also the change time).

I know that recent versions of macOS store desktop picture information in the sqlite3 database ~/Library/Application Support/Dock/desktoppicture.db. But it lacks any details regarding the picture change settings.

In older versions of macOS there existed a plist file com.apple.desktop.plist, but it seems to be no longer in use.

Does anyone know where macOS stores this information nowadays?

1

There are 1 answers

0
vadian On

Is AppleScript an option?

tell application "System Events"
    set pictureRotation to picture rotation of desktops
    set changeIntervals to change interval of desktops
end tell

Both results are a list because you can have multiple displays.

pictureRotation contains the information whether the user has checked "Change Picture" (0 or 1).
changeIntervals contains the interval in seconds.