Skip to content

Instantly share code, notes, and snippets.

@yuhonas
Created January 3, 2024 11:59
Show Gist options
  • Save yuhonas/2c329f010665885e91ff9ae39a6e8042 to your computer and use it in GitHub Desktop.
Save yuhonas/2c329f010665885e91ff9ae39a6e8042 to your computer and use it in GitHub Desktop.
Using apple script prompt the user for an image file then set it on every desktop
tell application (path to frontmost application as text)
try
set imageFile to (choose file with prompt "Select an image file:" of type "public.image") as text
end try
end tell
tell application "System Events"
repeat with desktopIndex from 1 to count of desktops
tell desktop desktopIndex
set picture to imageFile
end tell
end repeat
end tell
@architeacher
Copy link

Is there way to set that to a folder and enable the rotation every x seconds? I have searched the internet and all the solutions did not work on Sonoma version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment