When wallpaper settings are set to change every hour (or whatever time period) and is set to random order, it appears to be impossible to report the get, as a string, the location of the current wallpaper. For instance, my wallpaper is currently showing an image with this path (which I found by hand):
If I run
osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)' to try to get the path of the currently set wallpaper, it reports:
/Library/Desktop Pictures/Bahamas Aerial.jpg
This particular image isn't even in the same folder as the images I have set. However this happens to be the first wallpaper I ever set when I set up this particular mac, merely 2 weeks ago (which is why I remember it).
If I hold opt and command whilst clicking on the Desktop tab of the
Desktop & Screen Saver preference pane, then click on the
Debug button, it reports my wallpaper as
which is different to what is actually set. BUT it also happens to be the last image i CLICKED ON in the wallpaper selection window. It isn't what is currently showing, but you can see how it's kinda related - it's what I started with in this folder before setting the randomiser option.
So how can I get the string filename and/or path of the image that is actually set as the current wallpaper?