问题
I'd like to display different wallpapers regarding the physical location where I turn on my laptop. I.e.: at home I want to see Wallpaper-A and at office I want it to be Wallpaper-B.
Is there a way (an App, an AppleScript) that could detect laptop's location (i.e. wifi connection) and then update wallpaper?
I saw an AppleScript that allows to do so regarding time of the day: https://github.com/pipwerks/OS-X-Wallpaper-Changer
回答1:
This works for me on 10.9
set mySSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I|grep \" SSID: \"|cut -c 18-"
if mySSID is equal to "NETWORK_NAME" then
tell application "Finder"
set desktop picture to {"Macintosh HD:Users:USER_NAME:Desktop:IMAGE_NAME.jpg"} as alias
end tell
end if
来源:https://stackoverflow.com/questions/23054358/change-laptop-mac-os-x-wallpaper-upon-location