Skip to content

Instantly share code, notes, and snippets.

@johnnymatthews
Created October 10, 2019 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnnymatthews/21dd3eedf108061c4b705d87839520ad to your computer and use it in GitHub Desktop.
Save johnnymatthews/21dd3eedf108061c4b705d87839520ad to your computer and use it in GitHub Desktop.
Update your CMUS cache with a keypress.
# 1. Create a file called update-library.sh and add the following lines.
#!/bin/bash
cmus-remote -C clear
cmus-remote -C "add ~/Music"
cmus-remote -C "update-cache -f"
cp ~/Music/Playlists/* ~/.config/cmus/
# 2. Change permissions to make the script executable:
chmod +x ~/Applications/cmus-osx/update-library.sh
# 3. Bind the script to the u key press:
:bind -f common u shell ~/Applications/cmus-osx/update-library.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment