Update Slack status based on your location (using Wi-Fi SSID).
- macOS 10.12 Sierra
- Bash
- curl
I'm waiting your PR :)
git clone https://github.com/kuy/slack-loc.git
cd slack-loc
Create scripts/config.sh
from scripts/config.sh.example
and known_ssids
from known_ssids.example
.
TOKENS
: Bash array of all Slack API tokens. See below.DEFAULT_EMOJI
: Slack status emoji when no known Wi-Fi SSID can be foundDEFAULT_STATUS
: Slack status text when no known Wi-Fi SSID can be found- The
known_ssids
file is a semi-colon seperated value file of the format:- Note: remember Slack-emoji-codes are surrounded in colons
SSID;EMOJI_CODE;STATUS_TEXT
Here: https://api.slack.com/custom-integrations/legacy-tokens
If you don't have a token, create new app for an integration.
./macos/enable.sh
./macos/disable.sh
Disable the job, append below lines, and re-enable it.
<key>StandardOutPath</key>
<string>/Users/<< USERNAME >>/stdout.txt</string>
<key>StandardErrorPath</key>
<string>/Users/<< USERNAME >>/stderr.txt</string>
Please post error message to GitHub issue.
MIT
Yuki Kodama / @kuy