Have you ever caught yourself liking tracks on Spotify obsessively to take advantage of their sweet machine learning recommendations? Yeah, me too. But alt-tabbing into the app every 3 minutes sucks. With akttym
you can stay focused on your work and place like on your favorite music with a keyboard shortcut.
Akttym
is a simple script placing heart/like/whatever-they-call-it on currently playing track on Spotify, which combined with global keyboard shortcut allows for complete headless setup.
And yes, there is a typo in the name.
This is a Python3 script, so it works with most Linux distributions and with macOS. I haven't tested it out on Windows, if there's a demand for it, please let me know!
Disclaimer: It only works with on-line playback.
- To install akttym, just simply pip install it from PyPI:
python3 -m pip install akttym
- It comes with empty
config.yaml
. In order to fill it up with your user data, runakttym
for the first time, and it will tell you where the config file is located:
python3 -m akttym
WARNING:root:Config is invalid. username key is empty or does not exist.
Config file can be found at: /Users/evemorgen/Desktop/akttym/akttym/config.yaml
- Create a Spotify app at https://developer.spotify.com/dashboard and copy
client_id
andclient_secret
into config file. Don't forget to add yourusername
as well. - Add
http://localhost:1911/
redirect uri your new spotify app [Edit Settings -> Redirect URIs -> ADD]. - Run the script once again. This time it should open a website in your browser. Accept Spotify privacy stuff, after agreeing to sell your soul, you're good to go.
- It just works! (hopefully).
python3 -m akttym
INFO:root:added Life On Mars? - 2015 Remastered Version to evemorgen's library
- Search for
Automator
app and open it. - Create new service [Qucik Action (Service) -> Choose]
- Drag and drop
run shell script
to workflow window - Select
no input
inService receives
dropdown and fill in command textbox withpython3 -m akttym
- Save created service (
Cmd+S
or [File -> Save]) with nameakttym
- Close Automator and navigate to keyboard shortcuts settings [System preferences -> Keyboard -> Shortcuts -> Services]. At the very bottom of services list you should see newly created service. Double click on it and pick any key combination you like (be aware that you could override any of existing shortcuts)
- Test it out? Profit?
- Enter keyboard settings [System Settings -> Keyboard -> Shortcuts -> custom]
- Click on
+
button and addpython3 -m akttym
command - it works?
Try to chmod 766 /path/to/script/dir
. Akttym needs write permission in directory where it's located
Make sure the right redirect uri (http://localhost:8080/
) is added to the Spotify app.
After clicking Add
button you still have to click Save
button at the very bottom of the page.
- Patryk Galczynski - evemorgen
This project is licensed under the MIT License - see the LICENSE.md file for details