Last active
August 22, 2019 22:23
-
-
Save amenpunk/564b5ef6423b4de2586fdab56232b295 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Si no tienes un playlist generado puedes generarlo de la siguiente manera: | |
# updatedb -l 0 -U [Music PATH] -o music.db | |
# Ejemplo: update -l 0 -u $HOME/Music -o music.db | |
#Adapted from by https://moc.daper.net/comment/6080#comment-6080 | |
if [[ -z $(pgrep mocp) ]]; then | |
sh $HOME/.moc/mocp-tee && mocp -c | |
fi | |
# Select track(s) in external library (if plugged): | |
cd $HOME/Music || exit | |
playlist="$(locate -d "$HOME/music.db" -b "" | rofi -width 100 -dmenu -i -multi-select -p " ♪ ")" | |
# Prevent MOC from fooling if selection cancelled: | |
mocp -c -a -p "$playlist" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment