x11: add sanity check for starting exwm

This commit is contained in:
FollieHiyuki 2021-03-03 19:50:36 +03:00
parent 312c2df5fe
commit 2f350e4145
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
2 changed files with 13 additions and 2 deletions

View File

@ -28,6 +28,17 @@ session=${1:-spectrwm}
case $session in
bspwm ) exec bspwm ;;
spectrwm ) exec spectrwm -c ~/.config/spectrwm/spectrwm-nord.conf ;;
exwm ) exec dbus-run-session -- emacs -mm --debug-init -l ~/.config/doom/exwm.el ;;
exwm )
# In case no elogind
if [ -z "${XDG_RUNTIME_DIR}" ]
then
export XDG_RUNTIME_DIR="/tmp/$(mktemp -d $(id -u ${USER})-runtime-XXXXXX)"
if [ ! -d "${XDG_RUNTIME_DIR}" ]
then
mkdir "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
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 ;;
* ) exec "$1" ;;
esac

View File

@ -229,7 +229,7 @@
:leader "e 1" #'mpc-toggle-single
:leader "e r" #'mpc-toggle-repeat
:leader "e z" #'mpc-toggle-shuffle
:leader "e l" #'mpc-playlist)
:leader "e l" #'mpc-playlist-add)
;; EMMS
;; (use-package! emms