2021-02-13 11:28:59 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Start user dbus session alongside a Wayland compositor
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
export XDG_SESSION_TYPE=wayland
|
|
|
|
export QT_QPA_PLATFORM=wayland-egl
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|
|
|
export CLUTTER_BACKEND=wayland
|
|
|
|
export ELM_DISPLAY=wl
|
|
|
|
# SDL - not working for most games
|
|
|
|
#export SDL_VIDEODRIVER=wayland
|
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
|
|
|
|
|
|
|
export PATH=$HOME/.local/bin/Wayland:$PATH
|
|
|
|
|
|
|
|
# river configures xkb through env vars
|
|
|
|
if [ "$1" = "river" ]
|
|
|
|
then
|
|
|
|
export XKB_DEFAULT_LAYOUT="us,jp"
|
2021-02-17 14:43:58 -05:00
|
|
|
export XKB_DEFAULT_OPTIONS="grp:rshift_toggle"
|
2021-02-13 11:28:59 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
export XDG_CURRENT_DESKTOP=$1
|
2021-02-15 17:35:54 -05:00
|
|
|
# $HOME/.config/emacs/bin/doom env
|
2021-02-13 11:28:59 -05:00
|
|
|
exec dbus-run-session "$@" > "${XDG_RUNTIME_DIR}/$1-$(date "+%Y-%m-%d").log" 2>&1
|