mate-session-manager: improve compositor selector

This commit is contained in:
Ruben Rodriguez 2022-12-25 14:12:56 -05:00
parent 1d282a727e
commit c0c5ffc2b7
2 changed files with 10 additions and 3 deletions

View file

@ -4,8 +4,15 @@ WINDOW_MANAGER=xterm
[ -f /usr/bin/marco ] && WINDOW_MANAGER=marco
[ -f /usr/bin/marco-no-composite ] && WINDOW_MANAGER=marco-no-composite
if glxinfo | grep -q Accelerated.*yes && [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-xrender ] ; then
WINDOW_MANAGER=marco-xrender
# 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