A mini script to update your Slack status with the song currently playing on Apple Music on macOS.
- Shell script to run on your Mac Terminal.
- Constantly running with custom execution frequency.
- Custom status expiration time.
- Does not update if current Slack status is in custom whitelist.
- If no music is playing, status is cleared.
- Editable random emojis that are selected each time your status changes.
- Clone the repository
- Go to api.slack.com/apps and press "Create New App". Select the workspace and give it a name.
- With the app created, go to "OAuth & Permissions". Now under "Scopes" add these User Token Scopes:
users.profile:write,users.profile:read. - Scroll to the top and click "Install/Reinstall to Workspace".
- Copy the User OAuth Token and paste it next to
API_KEYin the.env.examplefile. - Go to your
AM2Slack.pyfile then copy its path and paste it next toPROGRAM_DIR. - Tweak the
.env.examplefile as desired and rename it to.envwhen done. - Make the script executable by running the following command in your terminal
chmod +x AM2Slack.sh. - (Optional but recommended) Create a virtual environment.
- Install project dependencies
pip install -r requirements.txt - Make sure
watchcommand is installed. If it's not, install it withbrew install watch - Run the program with
./AM2Slack.sh