package-helpers-cmxsl/helpers/DATA/mate-session-manager/mate-wm
2022-12-25 14:12:56 -05:00

20 lines
601 B
Bash
Executable file

#!/bin/sh
WINDOW_MANAGER=xterm
[ -f /usr/bin/marco ] && WINDOW_MANAGER=marco
[ -f /usr/bin/marco-no-composite ] && WINDOW_MANAGER=marco-no-composite
# Check for hardware acceleration
if glxinfo -B | grep "OpenGL renderer string" | grep -qv llvmpipe ; then
WINDOW_MANAGER=marco
# Use marco-glx (picom) on non-intel gpu, if available
if glxinfo -B | grep -qiv vendor.*intel; then
if [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-glx ] ; then
WINDOW_MANAGER=marco-glx
fi
fi
fi
gsettings set org.mate.session.required-components windowmanager $WINDOW_MANAGER
exec $WINDOW_MANAGER