dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.34k stars 325 forks source link

Wallpaper setting stop working in MacOS Sonoma #715

Open albert-ying opened 1 year ago

albert-ying commented 1 year ago

The wal -i "wallpaper.png" stopped setting the wallpaper on MacOS Sonoma

mamantoha commented 1 year ago

https://github.com/dylanaraps/pywal/blob/master/pywal/wallpaper.py#L133

This was done by modifying the ~/Library/Application Support/Dock/desktoppicture.db, but it seems that MacOS Somona no longer relies on this file.

jay0ma commented 12 months ago

Are there any alternative solutions to it?

mamantoha commented 12 months ago

AppleScript

tell application "System Events"
  tell every desktop
    set picture to POSIX file "/path/to/wallpaper.jpeg"
  end tell
end tell

But this solution seems to change the wallpaper only in the current space 😿 .

robwaz commented 11 months ago

Sorry about that. Apple changed how wallpapers works with Sonoma and I hadn't updated to it yet to see what they did.

Unfortunately this repo is no longer receiving updates and I do not believe anyone can claim it. If you need Sonoma support, you can try my fork located here. https://github.com/robwaz/pywal

If you do use this fork and run into an issue, please file it against my fork. These changes are "best effort" based on how things seem to work. I have no issue on my Mac though. :)

yuhonas commented 9 months ago

AppleScript

tell application "System Events"
  tell every desktop
    set picture to POSIX file "/path/to/wallpaper.jpeg"
  end tell
end tell

But this solution seems to change the wallpaper only in the current space 😿 .

@mamantoha try something like https://gist.github.com/yuhonas/2c329f010665885e91ff9ae39a6e8042 which enumerates through all the desktops and set's the wallpaper based on user input (but could be hardcoded obviously)