Created
October 10, 2019 15:41
-
-
Save johnnymatthews/21dd3eedf108061c4b705d87839520ad to your computer and use it in GitHub Desktop.
Update your CMUS cache with a keypress.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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