commit 1684577f9e446e75476d6126e9bee79beccdc2b0
parent d1dcdd0e59037c2cc809eba77dee6709cb502701
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date: Mon, 14 Sep 2020 20:34:21 -0700
Remove and rename mpc related aliases and functions
Diffstat:
1 file changed, 7 insertions(+), 39 deletions(-)
diff --git a/aliases/.config/aliases b/aliases/.config/aliases
@@ -51,27 +51,20 @@ alias gdc="gd --cached"
alias gcc="git rev-list HEAD --count"
# mpc:
-alias m="mpc"
-alias mc="m current"
-alias ma="m a"
+m() { mpc ${@:-current} ;}
alias mp="m play"
-alias mP="m pause"
-alias mn="m next"
-alias mN="m prev"
-alias ms="m seek"
-alias mu="m update --wait"
-alias mS="m shuffle"
+alias mt="m toggle"
+alias mk="m prev"
+alias mj="m next"
alias ml="m playlist"
-alias mls="m lsplaylist"
-alias mL="m load"
-alias mq="m search any"
-alias mC="m clear"
+alias ms="m search"
+alias ma="mpc add"
# get mpd settings
mpdconfig() { eval echo `grep $1 $XDG_CONFIG_HOME/mpd/mpd.conf | sed -E 's/.*"(.*)\"/\1/g'` ;}
# grep mpc playlists
-mgrep() { grep -h $@ `mpdconfig playlist_directory/*` | sort -u ;}
+mgrep() { grep -h $@ `mpdconfig playlist_directory`/* | sort -u ;}
# add current song to playlist(s)
mato() {
@@ -82,18 +75,6 @@ mato() {
done
}
-# replace m3u playlist with loaded playlist
-mrepl() {
- local dir="`mpdconfig playlist_directory`"
- mv -v "$dir/$1.m3u" "$dir/.$1.m3u" && mpc save "$1"
-}
-
-# find music directories
-mfind() {
- local dir="`mpdconfig music_directory`"
- find "$dir" -type d | grep ${@-""} | sed "s:$dir/?::"
-}
-
# mps wrapper to work in states directory
mps() {
local dir="`mpdconfig music_directory`/.states"
@@ -105,19 +86,6 @@ mps() {
esac
}
-# display tracks which match regex in the current playlist.
-mlq() { ml | egrep -ni ${@:-''} ;}
-
-# play track if their is only one, otherwise act as mlq.
-mlp() {
- local track="$(mlq $@ | cut -d: -f1)"
- if [ `echo "$s" | wc -l` -eq 1 ]; then
- mp ${track:?"No match."}
- else
- mlq $@
- fi
-}
-
# search all history for `regex`
hs() { fc -nl 0 | egrep "$1" ;}