#!/bin/bash

# This file is sourced by /etc/X11/fly-dm/Xsession, not executed.

#if kscreen is here, then reset dpi and cursor size because they probably was set in Xsetup
#if [ -f /etc/xdg/autostart/kscreen.desktop ]; then
#  echo "Xft.dpi"      | /usr/bin/xrdb -remove -quiet
#  echo "Xcursor.size" | /usr/bin/xrdb -remove -quiet
#  kscreend&
#  sleep 1 - need?
#fi

if [ -z $FLY_KIOSK_CONFIG_DIR ]; then
  [ -f /etc/xprofile ] && . /etc/xprofile
  [ -f $HOME/.xprofile ] && . $HOME/.xprofile
fi

if [ -d /etc/X11/Xresources ]; then
  for i in /etc/X11/Xresources/*; do
    [ -f $i ] && xrdb -merge $i
  done
elif [ -f /etc/X11/Xresources ]; then
  xrdb -merge /etc/X11/Xresources
fi
[ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources
