xinitrc: Read a local script.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 12 Dec 2008 16:50:45 +0000 (16:50 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 12 Dec 2008 16:50:45 +0000 (16:50 +0000)
Reads .xinitrc-local if it exists.  There's a hook start-clients-local
for adding local things.  For example, crybaby wants a bunch of laptop-
related goodies such as nm-applet and gnome-power-manager.

xinitrc

diff --git a/xinitrc b/xinitrc
index 6141ab5..588dac6 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -116,6 +116,8 @@ start-window-manager () {
 ###--------------------------------------------------------------------------
 ### Random useful clients.
 
+start-clients-local () { :; }
+
 start-clients () {
   ## Mail notification.
   run bginit mail-notification
@@ -133,6 +135,9 @@ start-clients () {
 
   ## Panel.
   case $vnc in no) run bginit gnome-panel ;; esac
+
+  ## Local clients.
+  start-clients-local
 }
 
 ###--------------------------------------------------------------------------
@@ -289,6 +294,10 @@ EOF
 ###--------------------------------------------------------------------------
 ### Actually start things up.
 
+if [ -f $HOME/.xinitrc-local ]; then
+  . $HOME/.xinitrc-local
+fi
+
 case "$start" in
   yes)
     info "starting standard clients"