Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (22 sloc) 660 Bytes
# shellrc.sc
# Source this to add additional shell features for mpv.
alias mpvnova='mpv --no-video'
alias mpvshuf='mpvnova --shuffle --loop=inf'
mpvp() {
mpvshuf --playlist <(cat $*)
}
playcurrentdir() {
mpvshuf --playlist <(find "$PWD" -type f -follow \
-not -path '*/\.*' -not -path '*.m3u' -exec realpath -s {} \;)
}
alias pcd='playcurrentdir'
playdir() {
if [[ $# == 0 ]]; then
echo "playdir requires one or more directories on input."
else
mpvshuf --playlist <(find "$@" -type f -follow \
-not -path '*/\.*' -exec realpath -s {} \;)
fi
}
alias pd='playdir'
alias random-mpv="find . -type f | shuf | head -n 1 | xargs mpv"