From 403dc17837643174f2ff25d1ae14a48ae37508c7 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 12 Apr 2010 16:30:30 +0100 Subject: [PATCH] setup, pulseaudio, git: Add PulseAudio configuration; substituted dotfiles. Add a notion of a `substituted dotfile', which is installed by applying a simple sed(1) script to a skeleton rather than messing with symbolic links. Install some basic PulseAudio configuration. Pulse needs this hacking because it doesn't let us refer to our home directory without an absolute pathname, which is a total nuisance. Adopt .gitconfig under this scheme. The source moves to dot/gitconfig.in now. --- git/gitconfig => dot/gitconfig.in | 0 dot/pulse-default.pa.in | 14 ++++++++++++++ setup | 40 +++++++++++++++++++++++++-------------- 3 files changed, 40 insertions(+), 14 deletions(-) rename git/gitconfig => dot/gitconfig.in (100%) create mode 100644 dot/pulse-default.pa.in diff --git a/git/gitconfig b/dot/gitconfig.in 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 index 0000000..b1187b1 --- /dev/null +++ b/dot/pulse-default.pa.in @@ -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 162ede5..94dc65d 100755 --- 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$HOMEg +/@releasekey@/ s$(bin/mdw-conf release-key 481334C2)g +/@gitignore@/ s$(bin/mdw-conf gitignore $here/git/gitignore)g +" dot/$d >$ft.new + mv $ft.new $ft + echo " $target" +done +echo " all done." + ## Symlink backgrounds. backgrounds=" jue-peek.jpg @@ -192,20 +218,6 @@ if [ "$xstuff" ]; then 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. scripts=" -- 2.11.0