locationchanger icon indicating copy to clipboard operation
locationchanger copied to clipboard

Change the location when not connected to any wifi (just wired)

Open tleveque23 opened this issue 7 years ago • 3 comments

It would be very great if the location can be change automatically when no wifi network is connected. In my case, I am connected to my wifi network at home, then on my iPhone in the train, but at the office, I don't use any wifi. I am connected by ethernet. So I need to change the location to not use my own home dns.

tleveque23 avatar Oct 15 '18 20:10 tleveque23

Hi Thierry,

Unfortunately, OS X doesn't update com.apple.airport.preferences.plist when AirPort goes off, it doesn't seem possible to detect it by observing changes in that file. I like the feature, if you're up to implementing it, feel welcome.

eprev avatar Oct 16 '18 07:10 eprev

Perhaps it could watch for preferences.plist along with com.apple.airport.preferences.plist.

eprev avatar Oct 16 '18 17:10 eprev

I don't know. I am not a OsX developper. Just Java and Angular........ I am just a user. There is also probably other way to know if connected to a wire network. Like looking at the interfaces. You can probably do something like: networksetup -listnetworkserviceorder | grep 'Hardware Port' Then use the interface name in the result with ifconfig to look at its status.....

tleveque23 avatar Oct 16 '18 20:10 tleveque23