Check for files before loading.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 29 Jun 2012 22:57:36 +0300
changeset 470 2d1f71f28130
parent 469 83c0cf64c18d
child 471 8b397639ecc3
Check for files before loading.
.xinitrc
--- a/.xinitrc	Fri Jun 29 14:10:56 2012 +0300
+++ b/.xinitrc	Fri Jun 29 22:57:36 2012 +0300
@@ -8,12 +8,16 @@
   . ~/.bash_custom
 fi
 
-xrdb -merge ~/.Xdefaults
-# xrdb -load ~/.Xdefaults
+if [[ -f ~/.Xdefaults ];; then
+  xrdb -merge ~/.Xdefaults
+  # xrdb -load ~/.Xdefaults
+fi
 
 # Under Cygwin I prefer '-multiwindow' option, so it needn't to setup WM.
 if [[ -z $COMSPEC ]]; then
-  xmodmap ~/.xmodmaprc
+  if [[ ~/.xmodmaprc ]]; then
+    xmodmap ~/.xmodmaprc
+  fi
   xsetroot -gray
   fvwm &
 fi