shell/mpd: run mpc through socket

This commit is contained in:
Henrik Lissner 2016-12-26 00:27:25 -05:00
parent 92252c19ca
commit 22fe7c3165
5 changed files with 6 additions and 7 deletions

View file

@ -9,8 +9,7 @@ state_file "~/.config/mpd/mpdstate"
gapless_mp3_playback "yes"
restore_paused "yes"
bind_to_address "127.0.0.1"
port "6600"
bind_to_address "~/.config/mpd/mpd.sock"
audio_output {
type "alsa"

View file

@ -9,9 +9,7 @@ state_file "~/.config/mpd/mpdstate"
gapless_mp3_playback "yes"
restore_paused "yes"
bind_to_address "127.0.0.1"
port "6600"
user "hlissner"
bind_to_address "~/.config/mpd/mpd.sock"
audio_output {
type "osx"

View file

@ -5,7 +5,7 @@ ncmpcpp_directory = ~/.ncmpcpp
lyrics_directory = ~/music/.db/lyrics
##### connection settings #####
#mpd_host = localhost
mpd_host = "~/.config/mpd/mpd.sock"
#mpd_port = 6600
#mpd_connection_timeout = 5

View file

@ -3,6 +3,8 @@ if [[ $OSTYPE == darwin* ]]; then
alias mpdi='mpd ~/.config/mpd/mpd.conf'
fi
alias mpc='mpc -h "$HOME/.config/mpd/mpd.sock"'
mpca() {
local files=()
for file in $@; do

View file

@ -5,7 +5,7 @@ if ! pgrep mpd >/dev/null; then
exit 1
fi
info=$(mpc current)
info=$(mpc -h "$HOME/.config/mpd/mpd.sock" current)
if [[ -z $info ]]; then
>&2 echo "nothing is playing."
exit