summaryrefslogtreecommitdiff
blob: 70373de76aee072d8abb8b6a618ddcb2858fdeaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# compiz-start script
#
# hacky autodetection of neccessary options for XGL/AIGLX/NVIDIA
#
# Hanno Boeck, http://www.hboeck.de/
#
# Licensed under the same conditions as compiz itself (MIT or GPL)

GLX_WITH_DIRECT=`glxinfo|grep -c GLX_EXT_texture_from_pixmap`
GLX_WITH_INDIRECT=`LIBGL_ALWAYS_INDIRECT=1 glxinfo|grep -c GLX_EXT_texture_from_pixmap`
GLX_RENDER=`glxinfo|grep -c "OpenGL renderer string: Mesa GLX Indirect"`


COMPIZ_OPTIONS="--replace --use-cow"

if [ $GLX_WITH_DIRECT -eq 3 ]; then
	if [ $GLX_RENDER -eq 0 ]; then
		echo NVIDA detected
		export __GL_YIELD="NOTHING" 
	else
		echo XGL detected
	fi
elif [ $GLX_WITH_INDIRECT -eq 3 ]; then
	echo AIGLX detected
	export LIBGL_ALWAYS_INDIRECT=1
	COMPIZ_OPTIONS="$COMPIZ_OPTIONS --strict-binding"
fi

gtk-window-decorator --replace &
compiz $COMPIZ_OPTIONS gconf move resize minimize place decoration wobbly fade cube rotate scale switcher zoom dbus