Coder Social home page Coder Social logo

slack_status_updater's Introduction

Slack status updater

A simple shell script to update your status in slack from the command line, based on presets you provide in a configuration file.

Installation

Copy slack_status.sh to somewhere in your path.

Setup

Before you can use this, you need to add the status updater as a new slack app. To do this:

  • Go to https://api.slack.com/apps/new to create a new app
  • Choose a name for the new app: Slack status updater
  • Select your workspace from the "Development Slack Workspace" dropdown
  • This will bring you to the app configuration section, choose "OAuth and Permissions" from the sidebar on the left under the "Features" section.
  • Scroll down until you see "User token scopes" and click "Add an OAuth scope"
  • Type in users.profile:write and select it from the menu.
  • If you want to use the awayback.sh script that's also in this repository, add the users:write scope as well.
  • Scroll back to the top and click the "Install App to Workspace" button.
  • You will be brought to a screen asking you to allow the app access. Click "Allow"
  • You will be taken back to a screen containing an access token starting with xoxp-. Click the "Copy" button to copy this to the clipboard.

Once you have the token, run slack_status.sh setup and follow the prompts. This will create a configuration file for you.

If you wish, edit the config file to add additional presets.

Usage

  • slack_status.sh PRESET - updates your slack status to the preset
  • slack_status.sh none - resets your slack status to be blank
  • slack_status.sh PRESET ADDITIONAL TEXT - any additional text you type will be added to the end of your slack status.

Example:

$ slack_status.sh test
Updating status to: :check: Testing status updater
$ slack_status.sh none
Updating status to:
$ slack_status.sh vacation
Updating status to: :hotel: On vacation
$ slack_status.sh vacation until June 15
Updating status to: :hotel: On vacation until June 15

Helpers

Zoom helper

There is a helper script for hammerspoon that will automatically set your status appropriately when you are in a zoom meeting.

To install it:

  • Install and set up the slack_status.sh script (make sure it's in your path)
  • Ensure there is a 'zoom' preset (one is created by default during setup)
  • Install hammerspoon (brew cask install hammerspoon) if you don't have it already.
  • Copy the zoom_detect.lua file to ~/.hammerspoon/
  • Add the following line to ~/.hammerspoon/init.lua: local zoom_detect = require("zoom_detect")

Alfred workflow

There is an alfred workflow in helpers/alfred to let you quickly update your slack status from within alfred. See the README in that directory for more information on using it.

slack_status_updater's People

Contributors

mivok avatar jbryson3 avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.