diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-21 08:39:28 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-21 08:39:28 -0400 |
commit | 05015e34e7ff3df2515a5a72323d04b560716088 (patch) | |
tree | 241ab263f7c4126d657dc0d09ca6334c6e35e054 /src-qt5 | |
parent | Setup a recursive xinit call within the start-lumina-desktop binary as needed... (diff) | |
download | lumina-05015e34e7ff3df2515a5a72323d04b560716088.tar.gz lumina-05015e34e7ff3df2515a5a72323d04b560716088.tar.bz2 lumina-05015e34e7ff3df2515a5a72323d04b560716088.zip |
Add support for running generic user setup scripts/tools after parsing luminaDesktop.conf.
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 |