Set desktop picture
Sets the desktop picture on one screen or on every screen.
Set the desktop picture to path
Keyboard Maestro: SetDesktopImage
Details #
Sets the desktop picture to the image at path. ~ is your home folder, and the path can use variables. The file must exist.
Without screen, every desktop gets the picture. With screen set to 1 or more, only that desktop does. Numbers of 0 or less count as not given.
The step has no output.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
path | text | Yes | The picture file. Required. The step fails with "no picture at … to use as the desktop" if it is not there. | |
scaling | text | Accepted so imported macros keep it, but it is not applied. Any value other than FillScreen adds a note to the result saying macOS chooses the scaling. | ||
screen | number | The desktop number, starting at 1. Leave it out for every desktop. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
Replace the path first, since this really changes your wallpaper:
- Set the desktop picture to “wallpaper.jpg”
- Show “Wallpaper changed”
Gotchas #
The picture is set through System Events, so Switchboard Engine needs Automation permission for it. Without it the step fails and points to System Settings > Privacy & Security > Automation.
In a dry run the step is simulated.