pywal icon indicating copy to clipboard operation
pywal copied to clipboard

Wallpaper setting stop working in MacOS Sonoma

Open albert-ying opened this issue 9 months ago • 5 comments

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

albert-ying avatar Sep 27 '23 15:09 albert-ying

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.

mamantoha avatar Sep 28 '23 14:09 mamantoha

Are there any alternative solutions to it?

ArchYoimiya avatar Oct 05 '23 03:10 ArchYoimiya

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 avatar Oct 05 '23 15:10 mamantoha

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. :)

robwaz avatar Oct 21 '23 04:10 robwaz

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)

yuhonas avatar Jan 03 '24 18:01 yuhonas