https://github.com/juggernaut/slack-snooper
Automatically sets your Slack status based on your connected WiFi
https://github.com/juggernaut/slack-snooper
Last synced: about 1 year ago
JSON representation
Automatically sets your Slack status based on your connected WiFi
- Host: GitHub
- URL: https://github.com/juggernaut/slack-snooper
- Owner: juggernaut
- Created: 2018-11-14T23:15:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T23:25:00.000Z (over 7 years ago)
- Last Synced: 2025-03-26T14:28:31.833Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slack Snooper
Automatically sets your Slack status based on your connected WiFi.
## Installation (OS X only)
1. Create a config.json that tells the script what status to set when connected to which WiFi networks (see config.json.example as an example)
2. Add a `launchd` script that will watch relevant files when your connected SSID changes and execute the script. Create an xml file at
`~/Library/LaunchAgents/local.slacksnooper.plist`:
```
Label
local.slackstatus
LowPriorityIO
WorkingDirectory
YOUR-SLACK-SNOOPER-INSTALL-DIR
EnvironmentVariables
TOKEN
YOUR-SUPERSECRET-SLACK-TOKEN
ProgramArguments
/usr/local/bin/python
slack_snooper.py
StandardErrorPath
/tmp/slack-snooper.err
StandardOutPath
/tmp/slack-snooper.out
WatchPaths
/etc/resolv.conf
/Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
/Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist
RunAtLoad
```
Make sure you replace `YOUR-SLACK-SNOOPER-INSTALL-DIR` and `YOUR-SUPERSECRET-SLACK-TOKEN` appropriately.
3. Next, load it using:
```
sudo launchctl load ~/Library/LaunchAgents/local.slacksnooper.plist
```
And that's it!