mate-session-manager: improve compositor selector
This commit is contained in:
parent
1d282a727e
commit
c0c5ffc2b7
2 changed files with 10 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue