shell/+mpd: add mpd-add script
This commit is contained in:
parent
c35ab1c75b
commit
61ceb57fbf
|
@ -2,11 +2,3 @@
|
||||||
if [[ $OSTYPE == darwin* ]]; then
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
alias mpdi='mpd ~/.config/mpd/mpd.conf'
|
alias mpdi='mpd ~/.config/mpd/mpd.conf'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mpca() {
|
|
||||||
local files=()
|
|
||||||
for file in $@; do
|
|
||||||
files+="$(realpath --relative-to="$HOME/music" "$file")"
|
|
||||||
done
|
|
||||||
mpc add ${files[@]}
|
|
||||||
}
|
|
||||||
|
|
9
shell/+mpd/bin/mpd-add
Executable file
9
shell/+mpd/bin/mpd-add
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Add files (relative to working directory) to current playlist.
|
||||||
|
|
||||||
|
local files=()
|
||||||
|
for file in $@; do
|
||||||
|
files+="$(realpath --relative-to="$HOME/music" "$file")"
|
||||||
|
done
|
||||||
|
mpc add ${files[@]}
|
Loading…
Reference in a new issue