A ruby script to set your slack status, including an optional "away" message.
Slack is great, but it's missing a crucial feature for collaboration: you can't set an away message.
This is a short message to let your teammates know your status. For example, "lunch", or "bb 3:30". For a remote team, this subtle communication is crucial, and improves the efficiency of the team.
There is a kludgy, RSI inducing way to achieve this in slack: edit your profile and set your first name to something like "Ryan (lunch)". This works, but it's a lot of mousing around.
This script does it for you, by using an undocumented api to set the first name in your slack profile.
Note: This hack is useful only if your co-worker's slack preferences are set to "display real names". See the Slack Preferences / Messages & Media / Display Options:
First, get your slack api token here
Example setup for Mac OSX:
- Save slack.rb in your home directory
- Open a terminal
chmod +x slack.rb
- Edit
.bashrc
and add the following:
export SLACK_URL=https://yourteam.slack.com
export SLACK_TOKEN=your-slack-token
alias away='~/slack.rb away'
alias lunch='~/slack.rb away lunch'
alias back='~/slack.rb back'
Finally, source .bashrc
{away | back } [message]
away lunch
back
back in meeting