Skip to content

Instantly share code, notes, and snippets.

@nathanchere
Created June 18, 2015 00:14
Show Gist options
  • Save nathanchere/b16f8b5c2cf76a5cc06d to your computer and use it in GitHub Desktop.
Save nathanchere/b16f8b5c2cf76a5cc06d to your computer and use it in GitHub Desktop.
Enabling compiz plugins from the command line
backupCompizConfig() {
gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins > ~/.backup/compizplugins.txt
}
addToCompizConf() {
TEMPVAR=$(gconftool-2 --get /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins)
TEMPVAR=",${TEMPVAR:1:-1},"
if [ -z $(echo $TEMPVAR | grep ",$1,") ]; then
echo "'$1' not found; adding to Compiz conf..."
gconftool-2 --set --type=list --list-type=string /apps/compizconfig-1/profiles/Default/general/screen0/options/active_plugins "[${TEMPVAR:1}$1]"
fi
}
#Example usage
addToCompizConf "opengl"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment