Files
dotfiles/x/xinitrc

40 lines
729 B
Bash
Executable File

#!/bin/bash
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"
fi
done
fi
}
autostart
start_wm