2021-02-13 11:28:59 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
userresources=$HOME/.config/X11/Xresources
|
|
|
|
usermodmap=$HOME/.config/X11/Xmodmap
|
|
|
|
|
|
|
|
# merge in defaults and keymaps
|
|
|
|
if [ -f "$userresources" ]; then
|
|
|
|
xrdb -merge "$userresources"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$usermodmap" ]; then
|
|
|
|
xmodmap "$usermodmap"
|
|
|
|
fi
|
|
|
|
|
2021-02-14 15:59:55 -05:00
|
|
|
if ! pgrep -f mpd > /dev/null
|
2021-02-13 11:28:59 -05:00
|
|
|
then
|
|
|
|
mpd &
|
|
|
|
fi
|
|
|
|
picom -b &
|
|
|
|
# $HOME/.local/bin/garbage/off_touch &
|
|
|
|
|
|
|
|
export XDG_SESSION_TYPE=x11
|
|
|
|
export PATH=$HOME/.local/bin/X11:$PATH
|
2021-05-26 09:08:40 -04:00
|
|
|
# $HOME/.config/emacs-config/doom/bin/doom env
|
2021-02-13 11:28:59 -05:00
|
|
|
|
2021-03-06 14:22:26 -05:00
|
|
|
session=${1:-exwm}
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
case $session in
|
|
|
|
bspwm ) exec bspwm ;;
|
|
|
|
spectrwm ) exec spectrwm -c ~/.config/spectrwm/spectrwm-nord.conf ;;
|
2021-03-03 11:50:36 -05:00
|
|
|
exwm )
|
2021-04-12 12:00:49 -04:00
|
|
|
# In case of using seatd. Flatpak apps won't work
|
2021-03-03 11:50:36 -05:00
|
|
|
if [ -z "${XDG_RUNTIME_DIR}" ]
|
|
|
|
then
|
2021-04-12 12:00:49 -04:00
|
|
|
userid=$(id -u ${USER})
|
|
|
|
export XDG_RUNTIME_DIR="$(mktemp -d /tmp/${userid}-runtime-XXXXXX)"
|
2021-03-03 11:50:36 -05:00
|
|
|
if [ ! -d "${XDG_RUNTIME_DIR}" ]
|
|
|
|
then
|
2021-04-12 12:00:49 -04:00
|
|
|
mkdir -p "${XDG_RUNTIME_DIR}"
|
2021-03-03 11:50:36 -05:00
|
|
|
chmod 0700 "${XDG_RUNTIME_DIR}"
|
|
|
|
fi
|
2021-04-12 12:00:49 -04:00
|
|
|
# Assure we use seatd
|
|
|
|
# export LIBSEAT_BACKEND=seatd
|
2021-03-03 11:50:36 -05:00
|
|
|
fi
|
|
|
|
exec dbus-run-session emacs -mm --debug-init -l ~/.config/doom/exwm.el > "${XDG_RUNTIME_DIR}/exwm-$(date "+%Y-%m-%d").log" 2>&1 ;;
|
2021-02-13 11:28:59 -05:00
|
|
|
* ) exec "$1" ;;
|
|
|
|
esac
|