FIX make log file if it does not yet exist

This commit is contained in:
Nathan Dwarshuis 2022-08-03 09:16:40 -04:00
parent f916f874e4
commit 833e7efd19
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
{{ if .desktop -}} {{ if .desktop -}}
initfile="$XDG_CONFIG_HOME/X11/xinitrc" initfile="$XDG_CONFIG_HOME/X11/xinitrc"
logfile="$XDG_DATA_HOME/X11/xinit.log" logdir="$XDG_DATA_HOME/X11"
logfile="$logdir/xinit.log"
mkdir -p "$logdir"
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && \ [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && \
exec startx "$initfile" -- -keeptty > "$logfile" 2>&1 exec startx "$initfile" -- -keeptty > "$logfile" 2>&1
{{- end }} {{- end }}