Introduced mpDris2 client for local MPD

This commit is contained in:
Eric Teunis de Boone 2020-03-17 13:22:31 +01:00
parent 10189191f7
commit 0ca7a16d52
5 changed files with 61 additions and 20 deletions

View File

@ -16,6 +16,8 @@
~/.ncmpcpp/config: ncmpcpp/config ~/.ncmpcpp/config: ncmpcpp/config
~/.ncmpcpp/bindings: ncmpcpp/bindings ~/.ncmpcpp/bindings: ncmpcpp/bindings
~/.mpd/mpd.conf: mpd/mpd.conf ~/.mpd/mpd.conf: mpd/mpd.conf
~/.config/mpDris2/mpDris2.conf: mpd/mpDris2.conf
~/.config/systemd/mpDris2.service: mpd/mpDris2.service
~/.profile: profile.sh ~/.profile: profile.sh
~/.ssh/config: ssh/config ~/.ssh/config: ssh/config
~/.tmux: tmux ~/.tmux: tmux

18
mpd/mpDris2.conf Normal file
View File

@ -0,0 +1,18 @@
# mpDris2 Configuration
# Default values are commented out
[Connection]
# You can also export $MPD_HOST and/or $MPD_PORT to change the server.
host = ~/.config/mpd/socket
#port = 6600
#password =
[Library]
music_dir = ~/Music
cover_regex = ^(album|cover|\.?folder|front).*\.(gif|jpeg|jpg|png)$
[Bling]
mmkeys = True
notify = False
# Urgency of the notification: 0 for low, 1 for medium and 2 for high.
#notify_urgency = 0

13
mpd/mpDris2.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=mpDris2 - Music Player Daemon D-Bus bridge
Wants=mpd.service
After=mpd.service
Requires=dbus.service
[Service]
Restart=on-failure
ExecStart=/usr/bin/mpDris2
BusName=org.mpris.MediaPlayer2.mpd
[Install]
WantedBy=default.target

View File

@ -1,16 +1,20 @@
# INET binding pid_file "~/.config/mpd/pid"
bind_to_address "localhost" state_file "~/.config/mpd/mpdstate"
port "6600" playlist_directory "~/.config/mpd/playlists"
sticker_file "~/.config/mpd/sticker.sql"
log_file "~/.config/mpd/log"
# UNIX binding # UNIX binding
bind_to_address "~/.mpd/socket" bind_to_address "~/.config/mpd/socket"
# INET binding
#bind_to_address "localhost"
#port "6600"
# Select one of the two options
## Use Local database # Select one of the two options below
db_file "~/.mpd/database"
music_directory "~/Music"
## Use Remote Database and Files ## Use Remote Database and Files
#database { #database {
@ -18,16 +22,20 @@ music_directory "~/Music"
# host "remote" # host "remote"
# port "6600" # port "6600"
#} #}
#music_directory "smb://remote"
### Use Local database
#db_file "~/.config/mpd/database"
#music_directory "~/Music" #music_directory "~/Music"
pid_file "~/.mpd/pid"
state_file "~/.mpd/mpdstate" # Enable Neighbour plugins
playlist_directory "~/.mpd/playlists" neighbors {
sticker_file "~/.mpd/sticker.sql" plugin "smbclient"
log_file "~/.mpd/log" }
# Audio Outputs ## Audio Outputs
audio_output { audio_output {
type "pulse" type "pulse"
name "User Pulse Audio" name "User Pulse Audio"
@ -38,6 +46,6 @@ audio_output {
audio_output { audio_output {
type "fifo" type "fifo"
name "my_fifo" name "my_fifo"
path "/tmp/mpd.fifo" path "~/.config/mpd/mpd.fifo"
format "44100:16:2" format "44100:16:2"
} }

View File

@ -12,7 +12,7 @@
## file which defines that while launching ncmpcpp. ## file which defines that while launching ncmpcpp.
## ##
# #
ncmpcpp_directory = ~/.ncmpcpp ncmpcpp_directory = ~/.config/ncmpcpp
# #
## ##
## Directory for storing downloaded lyrics. It ## Directory for storing downloaded lyrics. It
@ -24,7 +24,7 @@ lyrics_directory = ~/.lyrics
# #
##### connection settings ##### ##### connection settings #####
# #
mpd_host = locksmith.nm.deboone.nl mpd_host = ~/.config/mpd/socket
# #
mpd_port = 6600 mpd_port = 6600
# #
@ -52,7 +52,7 @@ mpd_music_dir = /var/lib/mpd/music
## } ## }
## ##
# #
#visualizer_fifo_path = /tmp/mpd.fifo visualizer_fifo_path = ~/.config/mpd/mpd.fifo
# #
## ##
## Note: Below parameter is needed for ncmpcpp ## Note: Below parameter is needed for ncmpcpp
@ -62,12 +62,12 @@ mpd_music_dir = /var/lib/mpd/music
## are some problems with it. ## are some problems with it.
## ##
# #
#visualizer_output_name = Visualizer feed visualizer_output_name = Visualizer feed
# #
## ##
## If you set format to 44100:16:2, make it 'yes'. ## If you set format to 44100:16:2, make it 'yes'.
## ##
#visualizer_in_stereo = yes visualizer_in_stereo = yes
# #
## ##
## Multiply received samples by given value. Very ## Multiply received samples by given value. Very