From: Mark Wooding Date: Mon, 12 Apr 2010 23:27:48 +0000 (+0100) Subject: Merge branch 'master' of metalzone:etc/profile X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/c035e794d622d7074c8fa94e18cb5ddfea7c36a1?hp=8ab9747e4a9942d928af6ccb9d6ead42ad5b13ea Merge branch 'master' of metalzone:etc/profile * '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. --- diff --git a/bin/mdw-build b/bin/mdw-build index 65ea3b0..34b6383 100755 --- a/bin/mdw-build +++ b/bin/mdw-build @@ -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 diff --git a/dot/emacs b/dot/emacs index c53cdaa..98852a4 100644 --- a/dot/emacs +++ b/dot/emacs @@ -770,7 +770,9 @@ (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. 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/dot/xinitrc b/dot/xinitrc index 3ae854b..151b9a4 100755 --- a/dot/xinitrc +++ b/dot/xinitrc @@ -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 --- 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 @@ -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.