chiark / gitweb /
Merge remote branch 'ponder'
authorMark Wooding <mdw@distorted.org.uk>
Mon, 12 Apr 2010 18:32:29 +0000 (19:32 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 12 Apr 2010 18:32:29 +0000 (19:32 +0100)
* ponder:
  setup, pulseaudio, git: Add PulseAudio configuration; substituted dotfiles.

dot/gitconfig.in [moved from git/gitconfig with 100% similarity]
dot/pulse-default.pa.in [new file with mode: 0644]
setup

similarity index 100%
rename from git/gitconfig
rename to dot/gitconfig.in
diff --git a/dot/pulse-default.pa.in b/dot/pulse-default.pa.in
new file mode 100644 (file)
index 0000000..b1187b1
--- /dev/null
@@ -0,0 +1,14 @@
+### -*-conf-*-
+###
+### PulseAudio configuration
+
+## Include system configuration.  This fairly sane on most systems.
+.include /etc/pulse/default.pa
+
+## Take over the system feep.  We can just about twiddle the feep sample
+## using the Gnome thing, because it fiddles the symlink in this directory.
+## PulseAudio only rechecks the link after evicting the sample from its
+## cache, but that's good enough.  What is annoying is that we have to
+## hardwire the home directory here.
+load-sample-dir-lazy @home@/.local/share/sounds/__custom
+load-module module-x11-bell sample=bell-window-system.ogg
diff --git a/setup b/setup
index abf2e24b16e63cb802064a41cc95b9eaae23c24a..499841e3197e64f151c27102a9bc012b2057bd27 100755 (executable)
--- a/setup
+++ b/setup
@@ -167,6 +167,32 @@ for d in $dotfiles; do
 done
 echo " all done."
 
+## Substitute things which need substituting.
+dotfilessubst="
+  gitconfig
+  pulse-default.pa.in:.pulse/default.pa"
+echo "Installing dotfiles with substitutions..."
+for d in $dotfilessubst; do
+  case $d in
+    *:*) target=${d#*:} d=${d%%:*};;
+    *) target=.$d d=$d.in;;
+  esac
+  ft=$HOME$sub/$target
+  dir=${ft%/*}
+  mkdir -p $dir
+  sed "
+1i\
+### generated by $here/setup; do not edit!\
+
+/@home@/ s\a\a$HOME\ag
+/@releasekey@/ s\a\a$(bin/mdw-conf release-key 481334C2)\ag
+/@gitignore@/ s\a\a$(bin/mdw-conf gitignore $here/git/gitignore)\ag
+" dot/$d >$ft.new
+  mv $ft.new $ft
+  echo "  $target"
+done
+echo "  all done."
+
 ## Symlink backgrounds.
 backgrounds="
   jue-peek.jpg
@@ -191,20 +217,6 @@ if [ "$xstuff" ]; then
   echo "       all done."
 fi
 
-###--------------------------------------------------------------------------
-### Process the Git configuration.
-
-echo -n "Installing Git configuration:"
-sed "
-1i\
-### generated by $here/setup; do not edit!\
-
-/@releasekey@/ s::$(bin/mdw-conf release-key 481334C2):g
-/@gitignore@/ s::$(bin/mdw-conf gitignore $here/git/gitignore):g
-" git/gitconfig >$HOME/.gitconfig.new
-mv $HOME/.gitconfig.new $HOME/.gitconfig
-echo " done."
-
 ###--------------------------------------------------------------------------
 ### Install useful scripts included in this package.