aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-09-08 02:10:01 +0200
committerGravatar Tom Willemse2016-09-08 02:10:01 +0200
commit06239aa7d7136a814549b09573798546fb697722 (patch)
treed54457f57762fff1f52b2b205f88caa5840f9e53
parent4bc5c06c646905e9b904f6a7c9619593cbde6981 (diff)
downloadnew-dotfiles-06239aa7d7136a814549b09573798546fb697722.tar.gz
new-dotfiles-06239aa7d7136a814549b09573798546fb697722.zip
Add MPD config
-rw-r--r--dotfiles.mk8
-rw-r--r--emacs/.emacs.d/GNUmakefile7
-rw-r--r--mpd/.config/mpd/.gitignore1
-rw-r--r--mpd/.config/mpd/mpd.org38
-rw-r--r--mpd/.local/share/mpd/.gitignore2
-rw-r--r--mpd/GNUmakefile6
6 files changed, 57 insertions, 5 deletions
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)