[x11-misc/desktop-acceleration-helpers] remove deprecated code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
AUX 3.0.1/aiglx-setup 226 RMD160 5e7b5f7ac75d51feba45b281bcc54ccb0c4412ad SHA1 ecc62643a29c32b2258717b24c3df4246991aad8 SHA256 af4a0b04005fd2878932f3147649e60766c9d29e7e038ca7c67def82ec4392b7
|
||||
AUX 3.0.1/desktop-acceleration-helpers.conf 18 RMD160 2f80facf3f2a3d51901b445e0dd2316b72f5bf77 SHA1 84788bf41ee26d46418fc784b9eec263b801ec2a SHA256 c3bfe6b211a6c55ac7c0b70fc622f95b09dd7e1e053e0a8a9231ba669c19e838
|
||||
AUX 3.0.1/desktop-acceleration-setup 8952 RMD160 00a432654cbc43ce85f9481aae5c94e8a17e6bcb SHA1 45d609a765cfad01aa5a2f4232395f687f5ec474 SHA256 2e4cd84b361d084589bc0f328ca89bd483f3cc6bea9583d24d15bd1b21b2dc3f
|
||||
EBUILD desktop-acceleration-helpers-3.0.1-r2.ebuild 570 RMD160 d906b96d6b97e295da59fa3a8ed0af37084d937a SHA1 eceed6f67aca4a65f086e55f55398f4efc38174d SHA256 58d1bb2c7541680d31b71b58af26881b0fc4b6e1ca43ba54bbac6b6d5839045b
|
||||
AUX 3.0.2/aiglx-setup 226 RMD160 5e7b5f7ac75d51feba45b281bcc54ccb0c4412ad SHA1 ecc62643a29c32b2258717b24c3df4246991aad8 SHA256 af4a0b04005fd2878932f3147649e60766c9d29e7e038ca7c67def82ec4392b7
|
||||
AUX 3.0.2/desktop-acceleration-helpers.conf 18 RMD160 2f80facf3f2a3d51901b445e0dd2316b72f5bf77 SHA1 84788bf41ee26d46418fc784b9eec263b801ec2a SHA256 c3bfe6b211a6c55ac7c0b70fc622f95b09dd7e1e053e0a8a9231ba669c19e838
|
||||
AUX 3.0.2/desktop-acceleration-setup 5664 RMD160 2b465ddde2d336633fde959403494ea7d020c045 SHA1 39435b1f170c2106fb68d83095468fcd6f1e7a71 SHA256 23b28204e866ba0656ae999c893db3c3a5ede6546bf244db1751819313f2d836
|
||||
EBUILD desktop-acceleration-helpers-3.0.2.ebuild 570 RMD160 d906b96d6b97e295da59fa3a8ed0af37084d937a SHA1 eceed6f67aca4a65f086e55f55398f4efc38174d SHA256 58d1bb2c7541680d31b71b58af26881b0fc4b6e1ca43ba54bbac6b6d5839045b
|
||||
|
||||
+6
-118
@@ -1,11 +1,8 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2007 - SabayonLinux (Fabio Erculiani)
|
||||
# Copyright 2009 - SabayonLinux (Fabio Erculiani)
|
||||
# Desktop Acceleration Helpers
|
||||
|
||||
# TODO:
|
||||
# - put the proper settings icon on the Desktop
|
||||
|
||||
if [ -e "/sbin/lspci" ];then
|
||||
if [ -x "/sbin/lspci" ];then
|
||||
lspci="/sbin/lspci"
|
||||
else
|
||||
lspci="/usr/sbin/lspci"
|
||||
@@ -18,10 +15,7 @@ ccsm_settings="ccsm.desktop"
|
||||
compiz_manager_desktop_file=$compiz_tmpdir$compiz_manager
|
||||
compiz_settings_desktop_file="/usr/share/applications/"$compiz_settings
|
||||
ccsm_settings_desktop_file="/usr/share/applications/"$ccsm_settings
|
||||
xorg_conf="/etc/X11/xorg.conf"
|
||||
desktop_acceleration_helpers_config_file="/etc/desktop-acceleration-helpers.conf"
|
||||
xgl_nvidia=$($lspci | grep ' VGA ' | grep -i nvidia)
|
||||
xgl_ati=$($lspci | grep ' VGA ' | grep ATI)
|
||||
|
||||
|
||||
# Functions
|
||||
@@ -124,76 +118,21 @@ remove_compiz_manager_from_startup() {
|
||||
fi
|
||||
}
|
||||
|
||||
enable_aiglx_in_xorg_conf() {
|
||||
# Enable AIGLX Stuff
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/#//' $xorg_conf
|
||||
sed -i '/"XAANoOffscreenPixmaps"/ s/#//' $xorg_conf
|
||||
sed -i '/"Composite"/ s/#//g' $xorg_conf
|
||||
sed -i 's/"Composite".*".*"/"Composite" "Enable"/' $xorg_conf
|
||||
|
||||
# check if Option Compisite is in xorg.conf
|
||||
option_composite=$(cat $xorg_conf | grep -i "Option.*Composite")
|
||||
if [ -z "$option_composite" ]; then
|
||||
# add it
|
||||
echo '' >> $xorg_conf
|
||||
echo 'Section "Extensions"' >> $xorg_conf
|
||||
echo ' Option "Composite" "Enable"' >> $xorg_conf
|
||||
echo 'EndSection' >> $xorg_conf
|
||||
echo '' >> $xorg_conf
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
disable_aiglx_in_xorg_conf() {
|
||||
# Disable AIGLX Option
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/#//' $xorg_conf
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/Option/#Option/' $xorg_conf
|
||||
sed -i '/"Composite"/ s/#//' $xorg_conf
|
||||
sed -i '/"Composite"/ s/Option/#Option/' $xorg_conf
|
||||
# for security sake
|
||||
sed -i '/"RenderAccel"/ s/#//' $xorg_conf
|
||||
sed -i '/"RenderAccel"/ s/Option/#Option/' $xorg_conf
|
||||
sed -i '/"XAANoOffscreenPixmaps"/ s/#//' $xorg_conf
|
||||
sed -i '/"XAANoOffscreenPixmaps"/ s/Option/#Option/' $xorg_conf
|
||||
}
|
||||
|
||||
enable_nvidia_in_xorg_conf() {
|
||||
# Enable nvidia stuff, no AIGLX option
|
||||
opengl_nvidia=$(eselect opengl show | grep nvidia)
|
||||
if [ -n "$opengl_nvidia" ]; then
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/#//' $xorg_conf
|
||||
sed -i '/"RenderAccel"/ s/#//' $xorg_conf
|
||||
fi
|
||||
sed -i '/"Composite"/ s/#//g' $xorg_conf
|
||||
}
|
||||
|
||||
disable_nvidia_in_xorg_conf() {
|
||||
# Disable nvidia
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/#//' $xorg_conf
|
||||
sed -i '/"AddARGBGLXVisuals"/ s/Option/#Option/' $xorg_conf
|
||||
sed -i '/"Composite"/ s/#//' $xorg_conf
|
||||
sed -i '/"Composite"/ s/Option/#Option/' $xorg_conf
|
||||
sed -i '/"RenderAccel"/ s/#//' $xorg_conf
|
||||
sed -i '/"RenderAccel"/ s/Option/#Option/' $xorg_conf
|
||||
sed -i '/"XAANoOffscreenPixmaps"/ s/#//' $xorg_conf
|
||||
sed -i '/"XAANoOffscreenPixmaps"/ s/Option/#Option/' $xorg_conf
|
||||
}
|
||||
|
||||
show_help=0
|
||||
if [ -z "$2" ] || [ "$1" == "--help" ]; then
|
||||
show_help=1
|
||||
fi
|
||||
if [ "$1" != "aiglx" ] && [ "$1" != "xgl" ] && [ "$1" != "nvidia" ] && [ "$2" != "enable" ] && [ "$2" != "disable" ]; then
|
||||
if [ "$1" != "aiglx" ] && [ "$2" != "enable" ] && [ "$2" != "disable" ]; then
|
||||
show_help=1
|
||||
fi
|
||||
|
||||
if [ "$show_help" == 1 ]; then
|
||||
echo
|
||||
echo "desktop-acceleration-setup - SabayonLinux - Copyright 2007-2009"
|
||||
echo "desktop-acceleration-setup - Sabayon Linux - Copyright 2007-2009"
|
||||
echo
|
||||
echo "This helper enable/disable AIGLX/XGL Subsystem fueled by Compiz."
|
||||
echo "This helper enable/disable AIGLX Subsystem fueled by Compiz."
|
||||
echo " Usage:"
|
||||
echo " # desktop-acceleration-setup aiglx/xgl enable/disable"
|
||||
echo " # desktop-acceleration-setup aiglx enable/disable"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
@@ -224,9 +163,6 @@ if [ "$1" == "aiglx" ]; then
|
||||
# remove old stuff
|
||||
scan_and_remove_old_files
|
||||
|
||||
# Enable AIGLX
|
||||
enable_aiglx_in_xorg_conf
|
||||
|
||||
# Beryl Manager startup file - create file $compiz_manager_desktop_file
|
||||
create_compiz_manager_desktop_file
|
||||
|
||||
@@ -246,54 +182,6 @@ if [ "$1" == "aiglx" ]; then
|
||||
# remove old stuff
|
||||
scan_and_remove_old_files
|
||||
|
||||
# Disable AIGLX
|
||||
disable_aiglx_in_xorg_conf
|
||||
|
||||
# remove compiz-manager
|
||||
remove_compiz_manager_from_startup
|
||||
|
||||
# set No Acceleration in the config file
|
||||
write_acceleration_method none
|
||||
|
||||
echo -e "Done"
|
||||
fi
|
||||
|
||||
elif [ "$1" == "nvidia" ]; then
|
||||
|
||||
if [ "$2" == "enable" ]; then
|
||||
echo "Enabling NVidia system wide..."
|
||||
|
||||
# remove old stuff
|
||||
scan_and_remove_old_files
|
||||
|
||||
# Enable NVidia
|
||||
enable_nvidia_in_xorg_conf
|
||||
|
||||
# Compiz startup file - create file $compiz_manager_desktop_file
|
||||
create_compiz_manager_desktop_file
|
||||
|
||||
# Add Beryl to the startup
|
||||
add_compiz_manager_to_the_startup
|
||||
|
||||
# remove junk
|
||||
if [ -e "$compiz_manager_desktop_file" ]; then
|
||||
rm -f $compiz_manager_desktop_file
|
||||
fi
|
||||
|
||||
|
||||
# set NVidia in the config file
|
||||
write_acceleration_method nvidia
|
||||
|
||||
echo -e "Done"
|
||||
else
|
||||
echo "Disabling NVidia system wide..."
|
||||
|
||||
# remove old stuff
|
||||
scan_and_remove_old_files
|
||||
|
||||
# Disable NVidia
|
||||
disable_nvidia_in_xorg_conf
|
||||
|
||||
# remove compiz-manager
|
||||
remove_compiz_manager_from_startup
|
||||
|
||||
Reference in New Issue
Block a user