From 06239aa7d7136a814549b09573798546fb697722 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 8 Sep 2016 02:10:01 +0200 Subject: Add MPD config --- dotfiles.mk | 8 ++++++++ emacs/.emacs.d/GNUmakefile | 7 ++----- mpd/.config/mpd/.gitignore | 1 + mpd/.config/mpd/mpd.org | 38 ++++++++++++++++++++++++++++++++++++++ mpd/.local/share/mpd/.gitignore | 2 ++ mpd/GNUmakefile | 6 ++++++ 6 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 dotfiles.mk create mode 100644 mpd/.config/mpd/.gitignore create mode 100644 mpd/.config/mpd/mpd.org create mode 100644 mpd/.local/share/mpd/.gitignore create mode 100644 mpd/GNUmakefile diff --git a/dotfiles.mk b/dotfiles.mk new file mode 100644 index 0000000..c9ff16b --- /dev/null +++ b/dotfiles.mk @@ -0,0 +1,8 @@ +EMACS = /usr/bin/emacs + +define tangle = + $(EMACS) -batch \ + -eval "(package-initialize)"\ + -load ob-tangle \ + -eval "(org-babel-tangle-file \"\$<\" \"$(notdir $@)\" \"$(1)\")" +endef diff --git a/emacs/.emacs.d/GNUmakefile b/emacs/.emacs.d/GNUmakefile index ea979f1..71187dc 100644 --- a/emacs/.emacs.d/GNUmakefile +++ b/emacs/.emacs.d/GNUmakefile @@ -1,4 +1,4 @@ -EMACS = /usr/bin/emacs +include ../../dotfiles.mk AUTOLOADS_FILE = site-lisp/site-autoloads.el UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-% @@ -7,10 +7,7 @@ SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el))) all: init.elc $(AUTOLOADS_FILE) $(SITE_LISPS) %.el: %.org - $(EMACS) -batch -eval "(progn \ - (package-initialize) \ - (require 'ob-tangle) \ - (org-babel-tangle-file \"$<\" \"$@\" \"emacs-lisp\"))" + $(call tangle,emacs-lisp) %.elc: %.el $(EMACS) -batch \ diff --git a/mpd/.config/mpd/.gitignore b/mpd/.config/mpd/.gitignore new file mode 100644 index 0000000..fee9217 --- /dev/null +++ b/mpd/.config/mpd/.gitignore @@ -0,0 +1 @@ +*.conf diff --git a/mpd/.config/mpd/mpd.org b/mpd/.config/mpd/mpd.org new file mode 100644 index 0000000..b88370f --- /dev/null +++ b/mpd/.config/mpd/mpd.org @@ -0,0 +1,38 @@ +I keep my music in =~/music/ogg=. Playlists go right next to it. + +#+BEGIN_SRC conf-space + music_directory "~/music/ogg" + playlist_directory "~/music/playlists" +#+END_SRC + +Store log, state and pid files in =~/.local/share/mpd= + +#+BEGIN_SRC conf-space + log_file "~/.local/share/mpd/mpd.log" + pid_file "~/.local/share/mpd/mpd.pid" + db_file "~/.local/share/mpd/mpd.db" + state_file "~/.local/share/mpd/mpdstate" +#+END_SRC + +Use pulseaudio to play the music. When I didn't specify this +explicitly it'd use Alsa instead. + +#+BEGIN_SRC conf-space + audio_output { + type "pulse" + name "MPD Pulse" + } +#+END_SRC + +Add an output for visualization. I don't use this often as usually it +bugs me a lot when it starts to lose sync, but it's still fun from +time to time. + +#+BEGIN_SRC conf-space + audio_output { + type "fifo" + name "Visualizer" + path "/tmp/mpd.fifo" + format "44100:16:2" + } +#+END_SRC diff --git a/mpd/.local/share/mpd/.gitignore b/mpd/.local/share/mpd/.gitignore new file mode 100644 index 0000000..5dc786d --- /dev/null +++ b/mpd/.local/share/mpd/.gitignore @@ -0,0 +1,2 @@ +# This file is only here to keep the mpd config happy. +* diff --git a/mpd/GNUmakefile b/mpd/GNUmakefile new file mode 100644 index 0000000..392c8bb --- /dev/null +++ b/mpd/GNUmakefile @@ -0,0 +1,6 @@ +include ../dotfiles.mk + +all: .config/mpd/mpd.conf + +%.conf: %.org + $(call tangle,conf-space) -- cgit v1.2.3-54-g00ecf