diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 18 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf | 5 |
2 files changed, 22 insertions, 1 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index 4e6dfdf6..72b451ab 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -851,7 +851,23 @@ void LUtils::LoadSystemDefaults(bool skipOS){ if(setTheme){ LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); } LUtils::writeFile(setdir+"/sessionsettings.conf", sesset, true); LUtils::writeFile(setdir+"/desktopsettings.conf", deskset, true); - //LUtils::writeFile(setdir+"/lumina-open.conf", lopenset, true); + + //Now run any extra config scripts or utilities as needed + tmp = sysDefaults.filter("usersetup_run"); + if(tmp.isEmpty()){ tmp = sysDefaults.filter("usersetup.run"); } + for(int i=0; i<tmp.length(); i++){ + if(tmp[i].startsWith("#") || !tmp[i].contains("=") ){ continue; } + QString var = tmp[i].section("=",0,0).toLower().simplified(); + QString val = tmp[i].section("=",1,1).section("#",0,0).simplified(); + //Change in 0.8.5 - use "_" instead of "." within variables names - need backwards compat for a little while + if(var.contains(".")){ var.replace(".","_"); } + //Now parse the variable and put the value in the proper file + if(var=="usersetup_run"){ + qDebug() << "Running user setup command:" << val; + QProcess::execute(val); + } + } + } bool LUtils::checkUserFiles(QString lastversion){ diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf index 318bb0f9..3d434501 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf @@ -98,3 +98,8 @@ favorites_add_ifexists=~/Videos #QUICKLAUNCH CUSTOMIZATION (requires the use of the "systemstart" panel plugin) #quicklaunch_add=<file/dir path> #Create a quicklaunch shortcut for this file/dir #quicklaunch_add_ifexists=<file/dir path> #Create a quicklaunch shortcut for this file/dir if the file/dir exists + +#Generic scripts/utilities to run for any additional setup procedures +# These are always run after all other settings are saved +#Format: usersetup_run=<generic command to run> +usersetup_run=xdg-user-dirs-update |