📜 ⬆️ ⬇️

Improved version of the script that disables Compiz Fusion

What does he do? Determine the desktop environment and select the required window manager (it only works with Gnome and KDE, since they are most popular among compiz fusion users). What is it for? And in order to run the native wm for a while, while compiz is disabled. If the environment is not KDE / Gnome, then wm does not start at all (for games it does not make much sense). Also, if compiz is not installed at all, the script exits, not even trying to run anything (not tested).
Script text:
#! / bin / bash
#Usage: compdisable command
case $ 1 in
"")
echo "Usage: compdisable COMMAND"
;;
*)
test -e / usr / bin / compiz
case $? in
0)
export DESKENV = `ps -e | egrep '(gnome-desktop | kdesktop)' | awk '{print $ 4}' `
case $ DESKENV in
gnome-desktop)
echo "Your desktop environment is GNOME"
export DISPLAYMGR = "metacity"

;;
kdesktop)
echo "Your desktop environment is KDE"
export DISPLAYMGR = "kwin"
;;
*)
echo “Unknown desktop environment detected. Not using the window manager »
export DISPLAYMGR = "false"
;;
esac
echo "Disabling compiz ..."
killall compiz.real -9 2> / dev / null
$ DISPLAYMGR & 2> / dev / null
$ 1 $ 2 $ 3 $ 4 $ 5 $ 6 $ 7 $ 8 $ 9
echo "Enabling compiz ..."
echo "When compiz will start completely, press CTRL + C to exit. Goodbye! ”
killall -9 $ DISPLAYMGR
compiz --replace> / dev / null &
;;
one)
echo "You don't have compiz installed. Goodbye! ”
;;
esac
;;
esac

')

Source: https://habr.com/ru/post/29171/


All Articles