I would like to write a simple Apple Script or Automator workflow that changes the desktop background to a solid color (ideally grey). I googled around extensively, but only found Scripts that change the background to a wallpaper and sot just a simple color. I know that I could just use a solid color wallpaper as a workaround, but in the system preferences I can also just pick a solid color, so I figured, that this must (should?) be possible via a Script at well.
One of thescripzts I found to change the wallpaper is as follows:
tell application “System Events”
tell every desktop
set picture to “path_to_wallpaper.jpg”
end tell
end tell
Does anyone here have an idea or pointer for me? Manny thanks in advance.
This should work, provided that you have automatic changing of Desktop pictures off in the Desktop settings.
set pictureTXT to "/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Dark.png"
tell application "System Events"
set picture of every desktop to pictureTXT
end tell
That’s correct, as far as I know there is no way in AppleScript to manipulate the appearance of these Spaces. If you want to do that, you need to manipulate the configuration (plist) file directly. Not my cup of tea.