diff options
author | Ken Moore <moorekou@gmail.com> | 2016-07-18 14:04:01 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-07-18 14:04:01 -0400 |
commit | 4571b222e2d3f525a2fa2fbb23dc03d50e5daaa9 (patch) | |
tree | ae65d24d2302652196dfd9cc77d96348e2e91c33 /src-qt5 | |
parent | [INTERFACE CHANGE] (diff) | |
download | lumina-4571b222e2d3f525a2fa2fbb23dc03d50e5daaa9.tar.gz lumina-4571b222e2d3f525a2fa2fbb23dc03d50e5daaa9.tar.bz2 lumina-4571b222e2d3f525a2fa2fbb23dc03d50e5daaa9.zip |
Add an "enableCompositing" flag to the sessionsettings.conf file which determines if the compositor (compton, xcompmgr) is supposed to be started or not.
NOTE: This is a hidden option (not available in lumina-config). To disable the compositor the user will need to edit ~/.config/lumina-desktop/sessionsettings.conf by hand and add the following line:
enableCompositing=false
Then restart Lumina for the changes to take effect.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/lumina-session/session.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index a2abc044..47f1cf34 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -10,6 +10,7 @@ #include <QProcess> #include <QProcessEnvironment> #include <QDebug> +#include <QSettings> #include <LuminaUtils.h> #include <LuminaOS.h> @@ -92,23 +93,25 @@ void LSession::start(){ startProcess("wm", cmd, QStringList() << confDir+"/fluxbox-init" << confDir+"/fluxbox-keys"); } //Compositing manager - if(LUtils::isValidBinary("compton")){ - QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; - if(!QFile::exists(set)){ - QStringList dirs = QString(getenv("XDG_CONFIG_DIRS")).split(":"); - for(int i=0; i<dirs.length(); i++){ - if(QFile::exists(dirs[i]+"/compton.conf")){ QFile::copy(dirs[i]+"/compton.conf", set); break; } - else if(QFile::exists(dirs[i]+"/compton.conf.sample")){ QFile::copy(dirs[i]+"/compton.conf.sample", set); break; } + QSettings settings("lumina-desktop","sessionsettings"); + if(settings.value("enableCompositing",true).toBool()){ + if(LUtils::isValidBinary("compton")){ + QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; + if(!QFile::exists(set)){ + QStringList dirs = QString(getenv("XDG_CONFIG_DIRS")).split(":"); + for(int i=0; i<dirs.length(); i++){ + if(QFile::exists(dirs[i]+"/compton.conf")){ QFile::copy(dirs[i]+"/compton.conf", set); break; } + else if(QFile::exists(dirs[i]+"/compton.conf.sample")){ QFile::copy(dirs[i]+"/compton.conf.sample", set); break; } + } } - } - if(!QFile::exists(set)){ - qDebug() << "Using default compton settings"; - startProcess("compositing","compton"); - }else{ - startProcess("compositing","compton --config \""+set+"\"", QStringList() << set); - } - }else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); } - + if(!QFile::exists(set)){ + qDebug() << "Using default compton settings"; + startProcess("compositing","compton"); + }else{ + startProcess("compositing","compton --config \""+set+"\"", QStringList() << set); + } + }else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); } + } //Desktop Next startProcess("runtime","lumina-desktop"); //ScreenSaver |