Change laptop Mac OS X wallpaper upon location [closed]

亡梦爱人 提交于 2019-12-11 10:17:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!