aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-07-05 13:35:24 -0400
committerKen Moore <ken@pcbsd.org>2016-07-05 13:35:24 -0400
commitc26f775e189e077936b1953a0b10814ff7ca5970 (patch)
treef8173947ebb7988dc076091c0887840e96e46c3d /src-qt5
parentFix the TrueOS default settings. (diff)
downloadlumina-c26f775e189e077936b1953a0b10814ff7ca5970.tar.gz
lumina-c26f775e189e077936b1953a0b10814ff7ca5970.tar.bz2
lumina-c26f775e189e077936b1953a0b10814ff7ca5970.zip
Setup the compton init system to use a special config file just for Lumina. This allows use to integrate an editor for that config file into lumina-config later.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core/lumina-session/session.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index 912eb4a7..7f9983dd 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -69,9 +69,25 @@ void LSession::start(){
// FLUXBOX BUG BYPASS: if the ~/.fluxbox dir does not exist, it will ignore the given config file
//if(!QFile::exists(QDir::homePath()+"/.fluxbox")){ QDir dir; dir.mkpath(QDir::homePath()+"/.fluxbox"); }
//startProcess("wm", "fluxbox -rc "+QDir::homePath()+"/.lumina/fluxbox-init -no-slit -no-toolbar");
+
//Compositing manager
- if(LUtils::isValidBinary("compton")){ startProcess("compositing","compton"); }
- else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); }
+ 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+"\"");
+ }
+ }else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); }
+
//Desktop Next
startProcess("runtime","lumina-desktop");
//ScreenSaver
bgstack15