]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
xinitrc: Use ~/.xinitrc.local to disable background images.
authorSimon Ruderich <simon@ruderich.org>
Mon, 15 Oct 2012 19:56:30 +0000 (21:56 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 15 Oct 2012 19:56:30 +0000 (21:56 +0200)
setup.sh
xinitrc

index 6c500a8f4370b51e3b658d2f7b65f289a852d37f..aa010ff616fe7eafd230af3e47cff12daef86a10 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -52,6 +52,9 @@ if installed X; then
     if [ x`os` != xdarwin ]; then
         link xinitrc ~/.xinitrc
     fi
+    if [ -f xinitrc.local ]; then
+        link xinitrc.local ~/.xinitrc.local
+    fi
     link xmodmaprc ~/.xmodmaprc
     link Xdefaults ~/.Xdefaults
     link XCompose ~/.XCompose
diff --git a/xinitrc b/xinitrc
index 201e6369a99fb01f1b79781c6270cd30217cc413..4e5f7bbefe217598697ae93d1d18bc300b3bea41 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -37,16 +37,20 @@ fi
 # Use my X11 key bindings.
 xmodmap "$HOME/.xmodmaprc"
 
+# Default to use a background image. Can be disabled in .xinitrc.local.
+set_background=yes
+
+# Load settings for the local system.
+if test -f "$HOME/.xinitrc.local"; then
+    . "$HOME/.xinitrc.local"
+fi
+
 # Change the background if available.
-if test -f "$HOME/.background"; then
-    # But not on slow machines in the university.
-    HOSTNAME=`hostname`
-    if test "x`echo $HOSTNAME | grep faui0sr`" = x; then
-        if test -x /usr/bin/hsetroot; then
-            hsetroot -full "$HOME/.background"
-        elif test -x /usr/bin/feh; then
-            feh --bg-scale "$HOME/.background"
-        fi
+if test -f "$HOME/.background" && test -n $set_background; then
+    if test -x /usr/bin/hsetroot; then
+        hsetroot -full "$HOME/.background"
+    elif test -x /usr/bin/feh; then
+        feh --bg-scale "$HOME/.background"
     fi
 fi