Hello DEV! Today I'm here to show off a fun project that allows you to share whatever music you're currently listening to as a status in Slack.
* Supports both Apple Music & Spotify
This will set your status emoji to a 🎵 (:musical_note:
) and your status text to {Track_Name} by {Artist}
.
Usage
Your musical status will automatically be set as long as:
- You have Slack open
- You are playing a song on Apple Music or Spotify
- Your Slack status is empty OR your status emoji is the 🎵 (
:musical_note:
)
Installation
$ brew tap aedenmurray/tap
$ brew install listeningto
Configuration
To use the Slack API you will need a legacy token. Legacy tokens were deprecated in March of 2020. However, you can still retrieve a legacy token through some quick reverse engineering:
- Go to https://my.slack.com/customize. (You must be logged in)
- Right-click anywhere and open up the developer console.
- In the JavaScript console run this code snippet:
window.prompt("API Token: ", TS.boot_data.api_token)
- Once you have your API token, create a new file in your home directory:
$ nano ~/.slack_token
- Paste your Slack API Token in the file. Save (
^+O
return
) and exit (^+X
)
Footnotes
Your Slack status should update about every 10 seconds.
The Homebrew Formula is defined here.
Discussion (0)