1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2024-12-30 12:43:32 +01:00

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/bindings: ncmpcpp/bindings
~/.mpd/mpd.conf: mpd/mpd.conf
~/.config/mpDris2/mpDris2.conf: mpd/mpDris2.conf
~/.config/systemd/mpDris2.service: mpd/mpDris2.service
~/.profile: profile.sh
~/.ssh/config: ssh/config
~/.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
bind_to_address "localhost"
port "6600"
pid_file "~/.config/mpd/pid"
state_file "~/.config/mpd/mpdstate"
playlist_directory "~/.config/mpd/playlists"
sticker_file "~/.config/mpd/sticker.sql"
log_file "~/.config/mpd/log"
# 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
db_file "~/.mpd/database"
music_directory "~/Music"
# Select one of the two options below
## Use Remote Database and Files
#database {
@ -18,16 +22,20 @@ music_directory "~/Music"
# host "remote"
# port "6600"
#}
#music_directory "smb://remote"
### Use Local database
#db_file "~/.config/mpd/database"
#music_directory "~/Music"
pid_file "~/.mpd/pid"
state_file "~/.mpd/mpdstate"
playlist_directory "~/.mpd/playlists"
sticker_file "~/.mpd/sticker.sql"
log_file "~/.mpd/log"
# Enable Neighbour plugins
neighbors {
plugin "smbclient"
}
# Audio Outputs
## Audio Outputs
audio_output {
type "pulse"
name "User Pulse Audio"
@ -38,6 +46,6 @@ audio_output {
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
path "~/.config/mpd/mpd.fifo"
format "44100:16:2"
}

View file

@ -12,7 +12,7 @@
## file which defines that while launching ncmpcpp.
##
#
ncmpcpp_directory = ~/.ncmpcpp
ncmpcpp_directory = ~/.config/ncmpcpp
#
##
## Directory for storing downloaded lyrics. It
@ -24,7 +24,7 @@ lyrics_directory = ~/.lyrics
#
##### connection settings #####
#
mpd_host = locksmith.nm.deboone.nl
mpd_host = ~/.config/mpd/socket
#
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
@ -62,12 +62,12 @@ mpd_music_dir = /var/lib/mpd/music
## 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'.
##
#visualizer_in_stereo = yes
visualizer_in_stereo = yes
#
##
## Multiply received samples by given value. Very