Skip to content

Instantly share code, notes, and snippets.

@kobakou
Last active August 26, 2019 03:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobakou/a54f806bc3550e646a31837eafdab982 to your computer and use it in GitHub Desktop.
Save kobakou/a54f806bc3550e646a31837eafdab982 to your computer and use it in GitHub Desktop.
add notification
#!/bin/bash
# set AccessPoint uniqe name for switch profile.
apname=SWing
if [ "`networksetup -getairportnetwork en0 | awk '{print $4}'`" = "$apname" ]; then
scselect Intra
osascript -e 'display notification "Intra" with title "NetProf"'
else
scselect Automatic
osascript -e 'display notification "Automatic" with title "NetProf"'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment