mate-session-manager: enable marco-picom when usable
This commit is contained in:
parent
93ef594004
commit
f00f59a1df
2 changed files with 12 additions and 26 deletions
|
|
@ -40,22 +40,9 @@ for n in "$@" ; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
glxinfo |grep "OpenGL renderer"| grep -vi Gallium | grep -q .
|
|
||||||
IS_X_COMPOSITED=$?
|
|
||||||
|
|
||||||
# WINDOW_MANAGER overrides all
|
# WINDOW_MANAGER overrides all
|
||||||
if [ -z "$WINDOW_MANAGER" ] ; then
|
if [ -z "$WINDOW_MANAGER" ] ; then
|
||||||
WINDOW_MANAGER=`gsettings get org.mate.session.required-components windowmanager 2> /dev/null | sed s/\'//g`
|
WINDOW_MANAGER=`gsettings get org.mate.session.required-components windowmanager 2> /dev/null | sed -r -e "s/^'([^']*)'$/\\1/"`
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x$WINDOW_MANAGER" = "xmarco-compton" ] && [ $IS_X_COMPOSITED != 0 ]; then
|
|
||||||
WINDOW_MANAGER=marco-no-composite
|
|
||||||
gsettings set org.mate.session.required-components windowmanager marco-no-composite
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x$WINDOW_MANAGER" = "xmarco-compton" ] && [ $IS_X_COMPOSITED = 0 ]; then
|
|
||||||
WINDOW_MANAGER=marco-compton
|
|
||||||
gsettings set org.mate.session.required-components windowmanager marco-compton
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Migrate compiz to compiz-manager if possible and needed
|
# Migrate compiz to compiz-manager if possible and needed
|
||||||
|
|
@ -74,25 +61,20 @@ fi
|
||||||
# Avoid looping if the session configuration tells us to use mate-wm or if
|
# Avoid looping if the session configuration tells us to use mate-wm or if
|
||||||
# the user forces mate-wm via WINDOW_MANAGER
|
# the user forces mate-wm via WINDOW_MANAGER
|
||||||
if [ "x$WINDOW_MANAGER" = "xmate-wm" ]; then
|
if [ "x$WINDOW_MANAGER" = "xmate-wm" ]; then
|
||||||
if [ $IS_X_COMPOSITED = 0 ]; then
|
WINDOW_MANAGER=""
|
||||||
WINDOW_MANAGER="marco-compton"
|
|
||||||
gsettings set org.mate.session.required-components windowmanager marco-compton
|
|
||||||
else
|
|
||||||
WINDOW_MANAGER="marco-no-composite"
|
|
||||||
gsettings set org.mate.session.required-components windowmanager marco-no-composite
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$WINDOW_MANAGER" ] ; then
|
if [ -z "$WINDOW_MANAGER" ] ; then
|
||||||
# Create a list of window manager we can handle, trying to only use the
|
# Create a list of window manager we can handle, trying to only use the
|
||||||
# compositing ones when it makes sense
|
# compositing ones when it makes sense
|
||||||
|
|
||||||
|
xdpyinfo 2> /dev/null | grep -q "^ *Composite$" 2> /dev/null
|
||||||
|
IS_X_COMPOSITED=$?
|
||||||
|
|
||||||
KNOWN_WM="sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
|
KNOWN_WM="sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
|
||||||
|
|
||||||
if [ $IS_X_COMPOSITED -eq 0 ] ; then
|
if [ $IS_X_COMPOSITED -eq 0 ] ; then
|
||||||
KNOWN_WM="marco-compton mutter compiz-manager compiz beryl $KNOWN_WM"
|
KNOWN_WM="mutter compiz-manager compiz beryl $KNOWN_WM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# marco is still the default wm in MATE
|
# marco is still the default wm in MATE
|
||||||
KNOWN_WM="marco $KNOWN_WM"
|
KNOWN_WM="marco $KNOWN_WM"
|
||||||
|
|
||||||
|
|
@ -174,6 +156,10 @@ case `basename $WINDOW_MANAGER` in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ $IS_X_COMPOSITED -eq 0 ] && [ $WINDOW_MANAGER = marco ] && [ -x /usr/bin/marco-picom ] ; then
|
||||||
|
WINDOW_MANAGER=marco-picom
|
||||||
|
fi
|
||||||
|
|
||||||
exec $WINDOW_MANAGER $OPT1 $OPT2 $OPT3 $OPT4
|
exec $WINDOW_MANAGER $OPT1 $OPT2 $OPT3 $OPT4
|
||||||
|
|
||||||
echo "ERROR: No window manager could run!"
|
echo "ERROR: No window manager could run!"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 Ruben Rodriguez <ruben@trisquel.info>
|
# Copyright (C) 2017-2022 Ruben Rodriguez <ruben@trisquel.info>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
VERSION=4
|
VERSION=5
|
||||||
|
|
||||||
. ./config
|
. ./config
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue