51 lines
985 B
Bash
Executable file
51 lines
985 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
echo "xloadresources" >> "$HOME/.xstartup_log"
|
|
|
|
ENV_TYPE="${1}"
|
|
|
|
if [[ -z "$ENV_TYPE" ]]; then
|
|
ENV_TYPE=""
|
|
else
|
|
ENV_TYPE=".${ENV_TYPE}"
|
|
fi
|
|
|
|
sysresources="/etc/X11/xinit/.Xresources"
|
|
sysmodmap="/etc/X11/xinit/.Xmodmap"
|
|
userresources="$HOME/.Xresources"
|
|
usercolors="$HOME/.Xresources.colors"
|
|
userenv="$HOME/.Xresources${ENV_TYPE}.env"
|
|
usermodmap="$HOME/.Xmodmap"
|
|
|
|
if [ -f "$sysresources" ]; then
|
|
xrdb -merge "$sysresources" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -f "$sysmodmap" ]; then
|
|
xmodmap "$sysmodmap" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -f "$userresources" ]; then
|
|
xrdb -merge "$userresources" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -f "$usercolors" ]; then
|
|
xrdb -merge "$usercolors" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -f "$userenv" ]; then
|
|
xrdb -merge "$userenv" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -f "$usermodmap" ]; then
|
|
xmodmap "$usermodmap" >/dev/null 2>&1
|
|
fi
|
|
|
|
if [ -d "/etc/X11/xinit/xinitrc.d" ] ; then
|
|
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
|
[ -x "$f" ] && . "$f"
|
|
done
|
|
unset f
|
|
fi
|
|
|