Files
dotfiles/x/xinitrc

41 lines
760 B
Plaintext
Raw Normal View History

#!/bin/bash
2015-09-25 16:25:48 +02:00
export LOGDIR="$HOME/.var/log"
LOGFILE="$LOGDIR/xinitrc.log"
log() {
echo "[$(date +%FT%T)] $*" >> "$LOGFILE"
}
2015-11-01 01:37:32 +01:00
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
2014-06-14 00:26:03 +02:00
start_wm() {
2015-09-25 16:25:48 +02:00
log "starting i3"
exec i3 -c "$HOME/.i3/config" >> "$LOGDIR/i3/i3.log"
2014-06-14 00:26:03 +02:00
}
2015-11-01 02:30:09 +01:00
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
}
2014-06-14 00:26:03 +02:00
2015-11-01 02:30:09 +01:00
autostart
2015-09-25 16:25:48 +02:00
2014-06-14 00:26:03 +02:00
start_wm