# $Id: 30x11-common_xresources 305 2005-07-03 18:51:43Z dnusinow $

# This file is sourced by Xsession(5), not executed.

# If xrdb (from xbase-clients) is installed, merge system-wide X resources.
# Then merge the user's X resources, if the options file is so configured.
if /usr/bin/which xrdb >/dev/null 2>&1; then
  if [ -d "$SYSRESOURCES" ]; then
    RESOURCEFILES=$(run-parts --list $SYSRESOURCES)
    if [ -n "$RESOURCEFILES" ]; then
      for RESOURCEFILE in $RESOURCEFILES; do
        xrdb -merge $RESOURCEFILE
      done
    fi
  fi

  if grep -qs ^allow-user-resources "$OPTIONFILE"; then
    if [ -f "$USRRESOURCES" ]; then
      xrdb -merge $USRRESOURCES
    fi
  fi
else
  # Comment out this command if you desire a legacy-free X environment, and find
  # the warning spurious.
  message "warning: xrdb command not found; X resources not merged."
fi

# vim:set ai et sts=2 sw=2 tw=80:
