Files
dotfiles/x/xinitrc
2018-08-16 07:29:06 +02:00

42 lines
800 B
Bash

#!/bin/bash
export LOGFILE="$LOGDIR/xinitrc.log"
log() {
echo "[$(date +%FT%T)] $*" >> "$LOGFILE"
}
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ -f /etc/xprofile ] && source /etc/xprofile
[ -f ~/.xprofile ] && source ~/.xprofile
start_wm() {
log "starting i3"
exec i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log"
}
autostart() {
if [ -d "$HOME/.autostart" ] ; then
log "Looking for autostart files."
for f in "$HOME/.autostart/"*.sh ; do
if [ -x "$f" ] ; then
log "Executing autostart file \"$f\""
"$f" >>"${LOGFILE}" 2>&1
fi
done
fi
}
exec >> "$LOGFILE" 2>&1
set -x
log "the"
autostart
log "fuck"
start_wm