shell/mpd: run mpc through socket
This commit is contained in:
parent
92252c19ca
commit
22fe7c3165
|
@ -9,8 +9,7 @@ state_file "~/.config/mpd/mpdstate"
|
||||||
gapless_mp3_playback "yes"
|
gapless_mp3_playback "yes"
|
||||||
restore_paused "yes"
|
restore_paused "yes"
|
||||||
|
|
||||||
bind_to_address "127.0.0.1"
|
bind_to_address "~/.config/mpd/mpd.sock"
|
||||||
port "6600"
|
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "alsa"
|
type "alsa"
|
||||||
|
|
|
@ -9,9 +9,7 @@ state_file "~/.config/mpd/mpdstate"
|
||||||
gapless_mp3_playback "yes"
|
gapless_mp3_playback "yes"
|
||||||
restore_paused "yes"
|
restore_paused "yes"
|
||||||
|
|
||||||
bind_to_address "127.0.0.1"
|
bind_to_address "~/.config/mpd/mpd.sock"
|
||||||
port "6600"
|
|
||||||
user "hlissner"
|
|
||||||
|
|
||||||
audio_output {
|
audio_output {
|
||||||
type "osx"
|
type "osx"
|
||||||
|
|
|
@ -5,7 +5,7 @@ ncmpcpp_directory = ~/.ncmpcpp
|
||||||
lyrics_directory = ~/music/.db/lyrics
|
lyrics_directory = ~/music/.db/lyrics
|
||||||
|
|
||||||
##### connection settings #####
|
##### connection settings #####
|
||||||
#mpd_host = localhost
|
mpd_host = "~/.config/mpd/mpd.sock"
|
||||||
#mpd_port = 6600
|
#mpd_port = 6600
|
||||||
#mpd_connection_timeout = 5
|
#mpd_connection_timeout = 5
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ if [[ $OSTYPE == darwin* ]]; then
|
||||||
alias mpdi='mpd ~/.config/mpd/mpd.conf'
|
alias mpdi='mpd ~/.config/mpd/mpd.conf'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
alias mpc='mpc -h "$HOME/.config/mpd/mpd.sock"'
|
||||||
|
|
||||||
mpca() {
|
mpca() {
|
||||||
local files=()
|
local files=()
|
||||||
for file in $@; do
|
for file in $@; do
|
||||||
|
|
|
@ -5,7 +5,7 @@ if ! pgrep mpd >/dev/null; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info=$(mpc current)
|
info=$(mpc -h "$HOME/.config/mpd/mpd.sock" current)
|
||||||
if [[ -z $info ]]; then
|
if [[ -z $info ]]; then
|
||||||
>&2 echo "nothing is playing."
|
>&2 echo "nothing is playing."
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in a new issue