Merge branch 'master' of metalzone:etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Mon, 12 Apr 2010 23:27:48 +0000 (00:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 12 Apr 2010 23:27:48 +0000 (00:27 +0100)
* 'master' of metalzone:etc/profile:
  dot/xinitrc: Punt a bunch of application startup stuff to `gnome-session'.
  setup, pulseaudio, git: Add PulseAudio configuration; substituted dotfiles.
  dot/emacs: Twiddle `{shell,comint}-file-name-chars'.
  bin/mdw-build: Insert missing space.

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

index 65ea3b0..34b6383 100755 (executable)
@@ -149,7 +149,7 @@ assign srcpath $(pwd)
 
 ## Construct the output directory.
 assign releasepath $srcpath/dist-$build
-chmod -R +w $releasepath 2>/dev/null|| :
+chmod -R +w $releasepath 2>/dev/null || :
 rm -rf $releasepath 2>/dev/null || :
 mkdir $releasepath
 case $verbose in
index c53cdaa..98852a4 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (setq shell-prompt-pattern "^[^]#$%>»}\n]*\\([]#$%»}]\\|>>?\\) *")
 (setq comint-password-prompt-regexp
       (concat "\\(\\([Ee]nter \\|[Oo]ld \\|[Nn]ew \\|[a-zA-Z0-9_]*'s \\|^\\)"
-             "[Pp]assword\\|pass phrase\\):"))
+             "[Pp]assword\\|pass phrase\\):")
+      comint-file-name-chars "~/A-Za-z0-9+@:_.$#%,={}-"
+      shell-file-name-chars comint-file-name-chars)
 
 ;; Notice passwords, and make C-a work right.
 
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
index 3ae854b..151b9a4 100755 (executable)
@@ -93,9 +93,6 @@ initialize () {
 
   ## Key mappings.
   xmodmap -e 'keysym BackSpace = BackSpace BackSpace'
-
-  ## Gnome settings.
-  case $vnc in no) run bginit gnome-settings-daemon ;; esac
 }
 
 ###--------------------------------------------------------------------------
@@ -146,41 +143,9 @@ start-window-manager () {
 
 start-clients-local () { :; }
 
-scsv=$(pick_program screensaver gnome-screensaver xscreensaver)
-case $scsv in
-  xscreensaver)
-    scsvopts="-no-splash"
-    ;;
-  *)
-    scsvopts=""
-    ;;
-esac
-
 start-clients () {
-  ## Mail notification.
-  run bginit mail-notification
-
-  ## Gnome session.  With great reluctance.  At least it doesn't actually do
-  ## anything.
-  run bginit gnome-session
-
-  ## Policykit authentication agent.
-  agent=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
-  if [ -x $agent ]; then run bginit $agent; fi
-
-  ## System monitor.
-  case $vnc in no) run bginit gkrellm ;; esac
-
-  ## Screensaver.
-  case $vnc in
-    no)
-      run init xscreensaver-command -exit
-      run bginit $scsv $scsvopts
-      ;;
-  esac
-
-  ## Panel.
-  case $vnc in no) run bginit gnome-panel ;; esac
+  ## Gnome session.
+  case $vnc in no) run bginit gnome-session ;; esac
 
   ## Local clients.
   start-clients-local
diff --git a/setup b/setup
index abf2e24..499841e 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
@@ -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="