From: Simon Ruderich Date: Mon, 15 Oct 2012 19:56:30 +0000 (+0200) Subject: xinitrc: Use ~/.xinitrc.local to disable background images. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=73ff664c0b33699029cab0f6c40c10cc78e90a04;p=config%2Fdotfiles.git xinitrc: Use ~/.xinitrc.local to disable background images. --- diff --git a/setup.sh b/setup.sh index 6c500a8..aa010ff 100755 --- 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 201e636..4e5f7bb 100755 --- 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