Skip to content

macOS Network Event Watcher; detect and react to changes of network environment

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

ChrisJ60/nweventwatcher

Repository files navigation

nweventwatcher

A macOS utility that watches for changes to the system's network environment and executes user defined commands based on the changes. It can also detect and react to wake-from-sleep events and changes between battery and AC power.

Tested on macOS Mojave and Catalina. May work on earlier versions.

Documentation

Please see the User Guide.

License

You may not use the identified files except in compliance with the Universal Permissive License, Version 1.0 (the "License.")

You may obtain a copy of the License at https://oss.oracle.com/licenses/upl. A copy of the license is also reproduced in LICENSE.md and LICENSE.txt.

Contact

You may contact the author at [email protected]

Scripts

The package consists of the following scripts:

Script Description
new The NetWork Event Watcher main script.
getmyip Determines the system's IP address, in various flavours.
getwifinetworks Determines the names (SSIDs) of any connected WiFi networks.
getnwinterfaces Determines the names of the system's network interfaces, in various flavours.
getNwEnv An example getNwEnv script.

Dependencies

Network Event Watcher requires the following third-party components:

  • The 'terminal-notifier' utility which is used to send notifications (https://github.com/julienXX/terminal-notifier). An easy way to install this is using Homebrew (https://brew.sh):

    brew install terminal-notifier

    If 'terminal-notifier' is not installed then the notification feature will not work.

  • The 'sleepwatcher' utility which is used to detect system wake and power events (https://www.bernhard-baehr.de). An easy way to install this is using Homebrew (https://brew.sh):

    brew install sleepwatcher

    You do NOT need to configure 'sleepwatcher' to run automatically.

    If 'sleepwatcher' is not installed then:

    • A less accurate, higher overhead mechanism will be used to detect system sleep/wake events and this may result in occasional missed events or false positives.

    • Detection of power source changes is not enabled so the '@battery' environment will not trigger any events.

About

macOS Network Event Watcher; detect and react to changes of network environment

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages