58 lines
1.1 KiB
Bash
58 lines
1.1 KiB
Bash
#!/bin/sh
|
|
# `/etc/X11/xinit/xinitrc`:
|
|
#
|
|
# #!/bin/sh
|
|
# if [ -f ~/.config/X11/xinit/xinitrc ] ; then
|
|
# . ~/.config/X11/xinit/xinitrc
|
|
# else
|
|
# . /etc/X11/Xsession
|
|
# fi
|
|
|
|
OPTIONFILE=/etc/X11/Xsession.options
|
|
|
|
SYSRESOURCES=/etc/X11/Xresources
|
|
USRRESOURCES="$XDG_CONFIG_HOME"/X11/Xresources
|
|
|
|
SYSSESSIONDIR=/etc/X11/Xsession.d
|
|
USERXSESSION="$XDG_DATA_HOME"/xsession
|
|
USERXSESSIONRC="$XDG_CONFIG_HOME"/xsessionrc
|
|
ALTUSERXSESSION="$XDG_DATA_HOME"/Xsession
|
|
ERRFILE="$XDG_CACHE_HOME"/X11/xsession-errors
|
|
|
|
if ! [ -d "${ERRFILE%/*}" ] || ! touch "$ERRFILE"; then
|
|
if mkdir -p "${ERRFILE%/*}"; then
|
|
if ! touch "$ERRFILE"; then
|
|
return 1
|
|
fi
|
|
else
|
|
return 1
|
|
fi
|
|
fi
|
|
|
|
exec >>"$ERRFILE" 2>&1
|
|
|
|
for res in "$SYSRESOURCES" "$USRRESOURCES"; do
|
|
if [ -f "$res" ]; then
|
|
xrdb -merge "$res"
|
|
fi
|
|
done
|
|
unset res
|
|
|
|
sys_xinit_d="/etc/X11/xinit/xinitrc.d"
|
|
usr_xinit_d="$XDG_CONFIG_HOME/X11/xinit/xinitrc.d"
|
|
|
|
for dir in "$sys_xinit_d" "$usr_xinit_d"; do
|
|
if [ -d "$dir" ]; then
|
|
for f in "$dir"/?*.sh; do
|
|
if [ -x "$f" ]; then
|
|
. "$f"
|
|
fi
|
|
done
|
|
unset f
|
|
fi
|
|
done
|
|
unset dir
|
|
|
|
while true; do
|
|
i3 >/dev/null 2>&1
|
|
done
|