35 lines
649 B
Bash
35 lines
649 B
Bash
#!/bin/bash
|
|
|
|
export LOGFILE="$XDG_RUNTIME_DIR/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"
|
|
systemctl --user import-environment
|
|
systemctl --user start windowmanager.target
|
|
sleep 1
|
|
systemctl --user start autostart.target
|
|
sleep inf
|
|
}
|
|
|
|
autostart() {
|
|
log "Starting systemd user target \"autostart.target\""
|
|
}
|
|
|
|
exec >> "$LOGFILE" 2>&1
|
|
autostart
|
|
start_wm
|