How do I get the current wallpaper on a Mac? Just point me to an API function so I can Google more.
Edit: I think I found it. [NSUserDefaults standardUserDefaults] menti
You can do it in shell + Applescript like this:
#!/bin/bash osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)'