From 352a33c76a2833d353c707d95d7561f93a03cb8a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 18 Jun 2017 16:18:17 +1200 Subject: Refactor mpd/ncmpcpp stuff completely This has been neglected. Switch to per-user mpd process instantiated on login via .profile.d. Cut back ncmpcpp config until I have time to write one that's compatible with 0.8. --- Makefile | 8 +++++++- lint/sh.sh | 3 ++- mpd/mpdconf | 15 +++++++++++++++ mpd/profile.d/mpd.sh | 2 ++ ncmpcpp/config | 25 +------------------------ 5 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 mpd/mpdconf create mode 100644 mpd/profile.d/mpd.sh diff --git a/Makefile b/Makefile index 3b552fc1..65e85ffc 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ install-ksh \ install-less \ install-login-shell \ + install-mpd \ install-mutt \ install-mysql \ install-ncmcpp \ @@ -386,12 +387,17 @@ install-less: cp -p -- less/lesskey $(HOME)/.lesskey lesskey +install-mpd: install-sh + mkdir -p -- $(HOME)/.profile.d $(HOME)/.mpd $(HOME)/.mpd/playlists + cp -p .. mpd/profile.d/mpd.sh $(HOME)/.profile.d + cp -p -- mpd/mpdconf $(HOME)/.mpdconf + install-mutt: mkdir -p -- $(HOME)/.muttrc.d $(HOME)/.cache/mutt cp -p -- mutt/muttrc $(HOME)/.muttrc cp -p -- mutt/muttrc.d/src $(HOME)/.muttrc.d -install-ncmcpp: +install-ncmcpp: install-mpd mkdir -p -- $(HOME)/.ncmpcpp cp -p -- ncmpcpp/config $(HOME)/.ncmpcpp diff --git a/lint/sh.sh b/lint/sh.sh index 632585bf..ccf4cc7f 100644 --- a/lint/sh.sh +++ b/lint/sh.sh @@ -1 +1,2 @@ -find sh -type f -print -exec shellcheck -e SC1090 -s sh -- {} + +find sh ksh/shrc.d mpd/profile.d \ + -type f -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/mpd/mpdconf b/mpd/mpdconf new file mode 100644 index 00000000..3dca8b6d --- /dev/null +++ b/mpd/mpdconf @@ -0,0 +1,15 @@ +bind_to_address "~/.mpd/socket" + +db_file "~/.mpd/database" +log_file "~/.mpd/log" + +music_directory "/mnt/media/shares/music" +playlist_directory "~/.mpd/playlists" +pid_file "~/.mpd/pid" +state_file "~/.mpd/state" +sticker_file "~/.mpd/sticker.sql" + +audio_output { + type "pulse" + name "PulseAudio" +} diff --git a/mpd/profile.d/mpd.sh b/mpd/profile.d/mpd.sh new file mode 100644 index 00000000..e8ab36c6 --- /dev/null +++ b/mpd/profile.d/mpd.sh @@ -0,0 +1,2 @@ +# Start an mpd process if one isn't already running +[ -s "$HOME"/.mpd/pid ] || mpd diff --git a/ncmpcpp/config b/ncmpcpp/config index eb4f2120..7e865a8f 100644 --- a/ncmpcpp/config +++ b/ncmpcpp/config @@ -2,30 +2,7 @@ ncmpcpp_directory = "~/.ncmpcpp" # Server specifics -mpd_host = "localhost" -mpd_port = "6600" -mpd_communication_mode = "notifications" -mpd_connection_timeout = "5" -mpd_crossfade_time = "5" +mpd_host = "~/.mpd/socket" # No mouse, it confuses tmux/urxvt, and I never use it anyway mouse_support = "no" - -# Visualization -visualizer_fifo_path = "/tmp/mpd.fifo" -visualizer_in_stereo = "yes" -visualizer_look = "*|" -visualizer_output_name = "FIFO" -visualizer_sync_interval = "30" -visualizer_type = "spectrum" - -# Use columns everywhere -browser_display_mode = "columns" -playlist_display_mode = "columns" -playlist_editor_display_mode = "columns" -search_engine_display_mode = "columns" -song_columns_list_format = "(40)[]{t|f} (25)[blue]{a} (25)[red]{b} (10)[green]{lr}" - -# Don't let me actually delete anything -allow_physical_directories_deletion = "no" -allow_physical_files_deletion = "no" -- cgit v1.2.3