Skip to content

chriszarate/SlackNotifier.spoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Hammerspoon Slack notifier

Check the Slack API periodically and provide a count of unread DMs and mentions in a menubar app. Click on the menubar icon to snooze.

screenshot

Loading the spoon

Clone this repo in ~/.hammerspoon/Spoons/. (After doing so, the path to this readme should be ~/.hammerspoon/Spoons/SlackNotifier.spoon/readme.md.

Now load the spoon from your Hammerspoon config:

hs.loadSpoon('SlackNotifier')
spoon.SlackNotifier:start({
  cookieToken = "xoxd-xxxx",
  workspaceToken = "xoxc-xxxx",
})

Configuration

  • interval: Interval in seconds to refresh the menu (default 60)
  • cookieToken: Token found in your cookies when authenticated against your Slack workspace in the browser (required)
    • Using Chrome devtools, go to Application > Cookies > https://app.slack.com
    • Copy the value for d. It should start with xoxd-.
    • If it contains URL-encoded characters (%..), you will need to URL-decode it: copy( encodeURIComponent( 'token' ) ).
  • workspaceToken: Token found in request payload when authenticated against your Slack workspace in the browser (required).
    • Using Chrome devtools, go to Network, reload the page, and filter for slack.com/api/, select a POST request, and click the Payload tab.
    • Look for token in the payload. It should start with xoxc-.

About

Show unread Slack DMs and mentions via Hammerspoon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages