An open API service indexing awesome lists of open source software.

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

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!