#!/bin/sh
 
+logfile=$XDG_DATA_HOME/xorg/xinit.log
 userresources=$HOME/.Xresources
 usermodmap=$HOME/.Xmodmap
-userprofile=$HOME/.xprofile
+userprofile=$XDG_CONFIG_HOME/xinit/xprofile
 sysresources=/etc/X11/xinit/.Xresources
 sysmodmap=/etc/X11/xinit/.Xmodmap
 
+# redirect all further output
+exec 2>&1 >>"$logfile"
+
+printf "\n%s  Reading '~/.xinitrc'\n" $(date --iso-8601=minutes)
+
 # merge in defaults and keymaps
 if [ -f $sysresources ]; then
     xrdb -merge $sysresources
     source "$userprofile"
 fi
 
+echo "Start Awesome"
 exec awesome