Skip to content
/ slack-loc Public

Update Slack status based on your location (using Wi-Fi SSID).

Notifications You must be signed in to change notification settings

kuy/slack-loc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-loc

Update Slack status based on your location (using Wi-Fi SSID).

Requirements

  • macOS 10.12 Sierra
  • Bash
  • curl

Linux?

I'm waiting your PR :)

Installation

1. Download

git clone https://github.com/kuy/slack-loc.git
cd slack-loc

2. Configure

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 found
  • DEFAULT_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

Get your "Legacy" token

Here: https://api.slack.com/custom-integrations/legacy-tokens

If you don't have a token, create new app for an integration.

3. Enable

./macos/enable.sh

Uninstall

./macos/disable.sh

Trouble Shooting

Doesn't working

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.

License

MIT

Author

Yuki Kodama / @kuy

About

Update Slack status based on your location (using Wi-Fi SSID).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages