From fa1b7476df8a8ad807d7f8977557ba5164e7f7e8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 13 Mar 2019 09:23:52 -0400 Subject: Add a new system config entry: theme.fluxbox This will change the fluxbox style/theme to the designated item. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 79151273..7c10cc96 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -408,6 +408,15 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ if(val.endsWith("%")){ val = QString::number( (screenGeom.height()*val.section("%",0,0).toDouble())/100 )+"px"; } themesettings[4] = val; } + else if(var=="theme_fluxbox"){ + QString fbinit = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-init"; + QStringList contents = LUtils::readFile(fbinit); + int index = contents.indexOf( contents.filter("session.styleFile:").join("") ); + QString line = "session.styleFile:\t"+val; + if(index>=0){ contents[index] = line; } + else{ contents << line; } + LUtils::writeFile(fbinit, contents, true); + } } //qDebug() << " - Now Color:" << themesettings[1] << setTheme; -- cgit