You can use this script to run a simple pomodoro timer that plays music from Spotify while you work from the command line on Mac.
- Spotify desktop app (obviously)
- Macvim is used as the default editor, you can use anything else (I've also tested it with sublime)
- Clone this repo
- Change the permissions for
pomodify.sh
andspotify
usingchmod 700
- Change the logger file path (or comment out all lines related to logging)
- Open Spotify app
- Change the Spotify playlist URI in
pomodify.sh
file. The default is a coding playlist that I love. - Run the script using
./pomodify.sh
. You could also add an alias to the.bash_profile
.
- You can point the script to any Spotify playlist of your choice
- The music plays when you work (default 25 minute work sessions)
- The music pauses for 5 mins during the break time
- A logger file opens up during the break time, you can type anything you like here
- The process repeats until you hit Ctrl + C
You can disable this by commenting out the appropriate lines if you'd like, but the main idea was to keep a log of the task that was done, or copying some nagging thoughts onto the dump file, or anything else you want.
I've used MacVim as the default editor here coz vim is lightweight and is configurable (like, you can open it in such a way that the cursor is always at the end)
- The inspiration for this was
christiangenco
's comment on this HN thread. - The credit for spotify cli integration ENTIRELY goes to
@hnarayanan
and the other contributors of shpotify.
Meh.