aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-qt5/core-utils/lumina-config/mainUI.cpp19
-rw-r--r--src-qt5/core-utils/lumina-search/MainUI.cpp3
-rw-r--r--src-qt5/core/libLumina/LuminaOS-Debian.cpp6
-rw-r--r--src-qt5/core/libLumina/LuminaOS-DragonFly.cpp12
-rw-r--r--src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp12
-rw-r--r--src-qt5/core/libLumina/LuminaOS-Gentoo.cpp6
-rw-r--r--src-qt5/core/libLumina/LuminaOS-Linux.cpp6
-rw-r--r--src-qt5/core/libLumina/LuminaOS-OpenBSD.cpp6
-rw-r--r--src-qt5/core/libLumina/LuminaOS-kFreeBSD.cpp6
-rw-r--r--src-qt5/core/libLumina/LuminaThemes.cpp34
-rw-r--r--src-qt5/core/libLumina/LuminaUtils.cpp47
-rw-r--r--src-qt5/core/libLumina/themes/Glass.qss.template5
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp21
-rw-r--r--src-qt5/core/lumina-desktop/WMProcess.cpp21
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf2
-rw-r--r--src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-init-rc3
-rw-r--r--src-qt5/core/lumina-desktop/main.cpp13
-rw-r--r--src-qt5/core/lumina-open/LFileDialog.cpp36
-rw-r--r--src-qt5/core/lumina-open/LFileDialog.h2
-rw-r--r--src-qt5/core/lumina-session/session.cpp2
-rw-r--r--src-qt5/core/lumina-wm-INCOMPLETE/LScreenSaver.cpp2
-rw-r--r--src-qt5/core/lumina-wm-INCOMPLETE/main.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp6
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.h2
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp3
26 files changed, 126 insertions, 153 deletions
diff --git a/src-qt5/core-utils/lumina-config/mainUI.cpp b/src-qt5/core-utils/lumina-config/mainUI.cpp
index bd2bf695..4bb07c9a 100644
--- a/src-qt5/core-utils/lumina-config/mainUI.cpp
+++ b/src-qt5/core-utils/lumina-config/mainUI.cpp
@@ -23,10 +23,9 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI()){
panadjust = false;
DEFAULTBG = LOS::LuminaShare()+"desktop-background.jpg";
//Be careful about the QSettings setup, it must match the lumina-desktop setup
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- settings = new QSettings( QSettings::UserScope, "LuminaDE", "desktopsettings", this);
- appsettings = new QSettings( QSettings::UserScope, "LuminaDE", "lumina-open", this);
- sessionsettings = new QSettings( QSettings::UserScope, "LuminaDE","sessionsettings", this);
+ settings = new QSettings( QSettings::UserScope, "lumina-desktop", "desktopsettings", this);
+ appsettings = new QSettings( QSettings::UserScope, "lumina-desktop", "lumina-open", this);
+ sessionsettings = new QSettings( QSettings::UserScope, "lumina-desktop","sessionsettings", this);
qDebug() << "Settings File:" << settings->fileName();
desktop = new QDesktopWidget();
ui->spin_screen->setMinimum(1);
@@ -994,7 +993,7 @@ void MainUI::checkmenuicons(){
//===========
void MainUI::loadKeyboardShortcuts(){
ui->tree_shortcut->clear();
- QStringList info = readFile(QDir::homePath()+"/.lumina/fluxbox-keys");
+ QStringList info = readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-keys");
//First take care of the special Lumina options
QStringList special;
special << "Exec lumina-open -volumeup::::"+tr("Audio Volume Up") \
@@ -1041,7 +1040,7 @@ void MainUI::saveKeyboardShortcuts(){
current << it->whatsThis(1)+" :"+it->whatsThis(0); //Full Fluxbox command line
}
- QStringList info = readFile(QDir::homePath()+"/.lumina/fluxbox-keys");
+ QStringList info = readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-keys");
for(int i=0; i<info.length(); i++){
if(info[i].isEmpty() || info[i].startsWith("#") || info[i].startsWith("!")){ continue; }
if(current.filter(info[i].section(":",1,10)).length() > 0){
@@ -1056,7 +1055,7 @@ void MainUI::saveKeyboardShortcuts(){
for(int i=0; i<current.length(); i++){
if(!current[i].section(" :",0,0).isEmpty()){ info << current[i]; }
}
- bool ok = overwriteFile(QDir::homePath()+"/.lumina/fluxbox-keys", info);
+ bool ok = overwriteFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-keys", info);
if(!ok){ qDebug() << "Warning: Could not save ~/.lumina/fluxbox-keys"; }
}
@@ -1464,7 +1463,7 @@ void MainUI::checkdefaulticons(){
// Session Page
//===========
void MainUI::loadSessionSettings(){
- QStringList FB = readFile(QDir::homePath()+"/.lumina/fluxbox-init");
+ QStringList FB = readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-init");
QString val;
//Do the window placement
val = FB.filter("session.screen0.windowPlacement:").join("").section(":",1,1).simplified();
@@ -1604,7 +1603,7 @@ void MainUI::loadSessionSettings(){
void MainUI::saveSessionSettings(){
//Do the fluxbox settings first
- QStringList FB = readFile(QDir::homePath()+"/.lumina/fluxbox-init");
+ QStringList FB = readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-init");
// - window placement
int index = FB.indexOf( FB.filter("session.screen0.windowPlacement:").join("") );
QString line = "session.screen0.windowPlacement:\t"+ui->combo_session_wloc->itemData( ui->combo_session_wloc->currentIndex() ).toString();
@@ -1627,7 +1626,7 @@ void MainUI::saveSessionSettings(){
else{ FB[index] = line; } //replace the current setting with the new one
//Save the fluxbox settings
- bool ok = overwriteFile(QDir::homePath()+"/.lumina/fluxbox-init", FB);
+ bool ok = overwriteFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/fluxbox-init", FB);
if(!ok){ qDebug() << "Warning: Could not save ~/.lumina/fluxbox-init"; }
//Now do the start apps
diff --git a/src-qt5/core-utils/lumina-search/MainUI.cpp b/src-qt5/core-utils/lumina-search/MainUI.cpp
index 363d788e..99b04b2b 100644
--- a/src-qt5/core-utils/lumina-search/MainUI.cpp
+++ b/src-qt5/core-utils/lumina-search/MainUI.cpp
@@ -46,8 +46,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(closeShort, SIGNAL(activated()), this, SLOT( close() ) );
//Setup the settings file
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- settings = new QSettings("LuminaDE", "lumina-search",this);
+ settings = new QSettings("lumina-desktop", "lumina-search",this);
searcher->startDir = settings->value("StartSearchDir", QDir::homePath()).toString();
searcher->skipDirs = settings->value("SkipSearchDirs", QStringList()).toStringList();
updateDefaultStatusTip();
diff --git a/src-qt5/core/libLumina/LuminaOS-Debian.cpp b/src-qt5/core/libLumina/LuminaOS-Debian.cpp
index cb8e9cdd..b893be50 100644
--- a/src-qt5/core/libLumina/LuminaOS-Debian.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-Debian.cpp
@@ -61,8 +61,8 @@ QStringList LOS::ExternalDevicePaths(){
int LOS::ScreenBrightness(){
//Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -84,7 +84,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
diff --git a/src-qt5/core/libLumina/LuminaOS-DragonFly.cpp b/src-qt5/core/libLumina/LuminaOS-DragonFly.cpp
index 919c88e5..2ebc62a0 100644
--- a/src-qt5/core/libLumina/LuminaOS-DragonFly.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-DragonFly.cpp
@@ -112,8 +112,8 @@ QStringList LOS::ExternalDevicePaths(){
int LOS::ScreenBrightness(){
//Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -139,7 +139,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(!success){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
//Read the current volume
@@ -147,7 +147,7 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1
int out = audiovolume;
if(out < 0){
//First time session check: Load the last setting for this user
- QString info = LUtils::readFile(QDir::homePath()+"/.lumina/.currentvolume").join("");
+ QString info = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume").join("");
if(!info.isEmpty()){
out = info.simplified().toInt();
audiovolume = out; //unset this internal flag
@@ -164,7 +164,7 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1
else{ out = R; }
if(out != audiovolume){
//Volume changed by other utility: adjust the saved value as well
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentvolume", QStringList() << QString::number(out), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume", QStringList() << QString::number(out), true);
}
audiovolume = out;
}
@@ -190,7 +190,7 @@ void LOS::setAudioVolume(int percent){
//Run Command
audiovolume = percent; //save for checking later
LUtils::runCmd("mixer vol "+QString::number(L)+":"+QString::number(R));
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentvolume", QStringList() << QString::number(percent), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume", QStringList() << QString::number(percent), true);
}
}
diff --git a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
index 6f03767b..568ac910 100644
--- a/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp
@@ -71,8 +71,8 @@ int LOS::ScreenBrightness(){
else if( !LUtils::isValidBinary("xbrightness") ){ return -1; } //incomplete install
//Now perform the standard brightness checks
if(screenbrightness==-1){ //memory value
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){ //saved file value
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){ //saved file value
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -114,7 +114,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(!success){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
//Read the current volume
@@ -122,7 +122,7 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1
int out = audiovolume;
if(out < 0){
//First time session check: Load the last setting for this user
- QString info = LUtils::readFile(QDir::homePath()+"/.lumina/.currentvolume").join("");
+ QString info = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume").join("");
if(!info.isEmpty()){
out = info.simplified().toInt();
audiovolume = out; //unset this internal flag
@@ -139,7 +139,7 @@ int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1
else{ out = R; }
if(out != audiovolume){
//Volume changed by other utility: adjust the saved value as well
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentvolume", QStringList() << QString::number(out), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume", QStringList() << QString::number(out), true);
}
audiovolume = out;
}
@@ -165,7 +165,7 @@ void LOS::setAudioVolume(int percent){
//Run Command
audiovolume = percent; //save for checking later
LUtils::runCmd("mixer vol "+QString::number(L)+":"+QString::number(R));
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentvolume", QStringList() << QString::number(percent), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentvolume", QStringList() << QString::number(percent), true);
}
}
diff --git a/src-qt5/core/libLumina/LuminaOS-Gentoo.cpp b/src-qt5/core/libLumina/LuminaOS-Gentoo.cpp
index 3a9c7320..5ed40be8 100644
--- a/src-qt5/core/libLumina/LuminaOS-Gentoo.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-Gentoo.cpp
@@ -61,8 +61,8 @@ QStringList LOS::ExternalDevicePaths(){
int LOS::ScreenBrightness(){
//Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -84,7 +84,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
diff --git a/src-qt5/core/libLumina/LuminaOS-Linux.cpp b/src-qt5/core/libLumina/LuminaOS-Linux.cpp
index c40cbd60..1bc200af 100644
--- a/src-qt5/core/libLumina/LuminaOS-Linux.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-Linux.cpp
@@ -58,8 +58,8 @@ QStringList LOS::ExternalDevicePaths(){
int LOS::ScreenBrightness(){
//Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -81,7 +81,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
diff --git a/src-qt5/core/libLumina/LuminaOS-OpenBSD.cpp b/src-qt5/core/libLumina/LuminaOS-OpenBSD.cpp
index 30a02078..0d04b52d 100644
--- a/src-qt5/core/libLumina/LuminaOS-OpenBSD.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-OpenBSD.cpp
@@ -61,8 +61,8 @@ int LOS::ScreenBrightness(){
if( !info.filter(QRegExp("VirtualBox|KVM")).isEmpty() ){ return -1; }
//Now perform the standard brightness checks
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -81,7 +81,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
//Read the current volume
diff --git a/src-qt5/core/libLumina/LuminaOS-kFreeBSD.cpp b/src-qt5/core/libLumina/LuminaOS-kFreeBSD.cpp
index 8414db1a..680e0164 100644
--- a/src-qt5/core/libLumina/LuminaOS-kFreeBSD.cpp
+++ b/src-qt5/core/libLumina/LuminaOS-kFreeBSD.cpp
@@ -62,8 +62,8 @@ QStringList LOS::ExternalDevicePaths(){
int LOS::ScreenBrightness(){
//Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
if(screenbrightness==-1){
- if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
- int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness")){
+ int val = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -85,7 +85,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp
index 9d33960f..d9ca537b 100644
--- a/src-qt5/core/libLumina/LuminaThemes.cpp
+++ b/src-qt5/core/libLumina/LuminaThemes.cpp
@@ -33,7 +33,7 @@ QStringList LTHEME::availableSystemThemes(){
}
QStringList LTHEME::availableLocalThemes(){ //returns: [name::::path] for each item
- QDir dir(QDir::homePath()+"/.lumina/themes");
+ QDir dir( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes");
QStringList list = dir.entryList(QStringList() <<"*.qss.template", QDir::Files, QDir::Name);
for(int i=0; i<list.length(); i++){
//Format the output entry [<name>::::<fullpath>]
@@ -54,7 +54,7 @@ QStringList LTHEME::availableSystemColors(){ //returns: [name::::path] for each
}
QStringList LTHEME::availableLocalColors(){ //returns: [name::::path] for each item
- QDir dir(QDir::homePath()+"/.lumina/colors");
+ QDir dir(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors");
QStringList list = dir.entryList(QStringList() <<"*.qss.colors", QDir::Files, QDir::Name);
for(int i=0; i<list.length(); i++){
//Format the output entry [<name>::::<fullpath>]
@@ -108,13 +108,13 @@ QStringList LTHEME::availableSystemCursors(){ //returns: [name] for each item
//Save a new theme/color file
bool LTHEME::saveLocalTheme(QString name, QStringList contents){
- QString localdir = QDir::homePath()+"/.lumina/themes/";
+ QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themes/";
if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); }
return LUtils::writeFile(localdir+name+".qss.template", contents, true);
}
bool LTHEME::saveLocalColors(QString name, QStringList contents){
- QString localdir = QDir::homePath()+"/.lumina/colors/";
+ QString localdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/colors/";
if(!QFile::exists(localdir)){ QDir dir; dir.mkpath(localdir); }
return LUtils::writeFile(localdir+name+".qss.colors", contents, true);
}
@@ -122,7 +122,7 @@ bool LTHEME::saveLocalColors(QString name, QStringList contents){
//Return the currently selected Theme/Colors/Icons
QStringList LTHEME::currentSettings(){ //returns [theme path, colorspath, iconsname, font, fontsize]
QStringList out; out << "" << "" << "" << "" << "";
- QStringList settings = LUtils::readFile(QDir::homePath()+"/.lumina/themesettings.cfg");
+ QStringList settings = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg");
for(int i=0; i<settings.length(); i++){
if(settings[i].startsWith("THEMEFILE=")){ out[0] = settings[i].section("=",1,1).simplified(); }
else if(settings[i].startsWith("COLORFILE=")){ out[1] = settings[i].section("=",1,1).simplified(); }
@@ -172,7 +172,7 @@ bool LTHEME::setCurrentSettings(QString themepath, QString colorpath, QString ic
contents << "ICONTHEME="+iconname;
contents << "FONTFAMILY="+font;
contents << "FONTSIZE="+fontsize;
- bool ok = LUtils::writeFile(QDir::homePath()+"/.lumina/themesettings.cfg", contents, true);
+ bool ok = LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg", contents, true);
return ok;
}
@@ -275,9 +275,9 @@ QStringList LTHEME::cursorInformation(QString name){
QStringList LTHEME::CustomEnvSettings(){ //view all the key=value settings
static QStringList info = QStringList();
static QDateTime lastcheck = QDateTime();
- if(lastcheck.isNull() || lastcheck < QFileInfo(QDir::homePath()+"/.lumina/envsettings.conf").lastModified()){
+ if(lastcheck.isNull() || lastcheck < QFileInfo(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf").lastModified()){
lastcheck = QDateTime::currentDateTime();
- info = LUtils::readFile(QDir::homePath()+"/.lumina/envsettings.conf");
+ info = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf");
}
return info;
}
@@ -287,8 +287,8 @@ void LTHEME::LoadCustomEnvSettings(){
QStringList info = LTHEME::CustomEnvSettings();
if(info.isEmpty()){
//Ensure the file exists, and create it otherwise;
- if(!QFile::exists(QDir::homePath()+"/.lumina/envsettings.conf")){
- LUtils::writeFile(QDir::homePath()+"/.lumina/envsettings.conf", QStringList() << "", true);
+ if(!QFile::exists( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf")){
+ LUtils::writeFile( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf", QStringList() << "", true);
}
}
for(int i=0; i<info.length(); i++){
@@ -316,7 +316,7 @@ bool LTHEME::setCustomEnvSetting(QString var, QString val){
}
}
if(!changed){ info << var+"="+val; }
- return LUtils::writeFile(QDir::homePath()+"/.lumina/envsettings.conf", info, true);
+ return LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf", info, true);
}
QString LTHEME::readCustomEnvSetting(QString var){
@@ -429,8 +429,8 @@ LuminaThemeEngine::LuminaThemeEngine(QApplication *app){
//setenv("XCURSOR_THEME", cursors.toLocal8Bit(),1);
watcher = new QFileSystemWatcher(this);
- watcher->addPath( QDir::homePath()+"/.lumina/envsettings.conf" );
- watcher->addPath( QDir::homePath()+"/.lumina/themesettings.cfg" );
+ watcher->addPath( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf" );
+ watcher->addPath( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg" );
watcher->addPaths( QStringList() << theme << colors << QDir::homePath()+"/.icons/default/index.theme" ); //also watch these files for changes
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) );
connect(syncTimer, SIGNAL(timeout()), this, SLOT(reloadFiles()) );
@@ -452,7 +452,7 @@ void LuminaThemeEngine::watcherChange(QString file){
void LuminaThemeEngine::reloadFiles(){
//Check the Theme file/settings
- if(lastcheck < QFileInfo(QDir::homePath()+"/.lumina/themesettings.cfg").lastModified().addSecs(1) ){
+ if(lastcheck < QFileInfo(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/themesettings.cfg").lastModified().addSecs(1) ){
QStringList current = LTHEME::currentSettings();
if(application->applicationFilePath().section("/",-1)=="lumina-desktop"){
application->setStyleSheet( LTHEME::assembleStyleSheet(current[0], current[1], current[3], current[4]) );
@@ -495,13 +495,13 @@ void LuminaThemeEngine::reloadFiles(){
//Environment Changes
- if( lastcheck < QFileInfo(QDir::homePath()+"/.lumina/envsettings.conf").lastModified()){
+ if( lastcheck < QFileInfo(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf").lastModified()){
LTHEME::LoadCustomEnvSettings();
emit EnvChanged();
}
lastcheck = QDateTime::currentDateTime();
//Now update the watched files to ensure nothing is missed
- watcher->removePaths( QStringList() << theme << colors << QDir::homePath()+"/.icons/default/index.theme" << QDir::homePath()+"/.lumina/envsettings.conf");
- watcher->addPaths( QStringList() << theme << colors << QDir::homePath()+"/.icons/default/index.theme" << QDir::homePath()+"/.lumina/envsettings.conf");
+ watcher->removePaths( QStringList() << theme << colors << QDir::homePath()+"/.icons/default/index.theme" << QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf");
+ watcher->addPaths( QStringList() << theme << colors << QDir::homePath()+"/.icons/default/index.theme" << QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/envsettings.conf");
}
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp
index 4911b9fa..73f16274 100644
--- a/src-qt5/core/libLumina/LuminaUtils.cpp
+++ b/src-qt5/core/libLumina/LuminaUtils.cpp
@@ -442,7 +442,7 @@ bool LUtils::validQuickPlugin(QString ID){
QString LUtils::findQuickPluginFile(QString ID){
if(ID.startsWith("quick-")){ ID = ID.section("-",1,50); } //just in case
//Give preference to any user-supplied plugins (overwrites for system plugins)
- QString path = QDir::homePath()+"/.lumina/quickplugins/quick-"+ID+".qml";
+ QString path = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/quickplugins/quick-"+ID+".qml";
if( QFile::exists(path) ){return path; }
path = LOS::LuminaShare()+"quickplugins/quick-"+ID+".qml";
if( QFile::exists(path) ){return path; }
@@ -450,7 +450,7 @@ QString LUtils::findQuickPluginFile(QString ID){
}
QStringList LUtils::listQuickPlugins(){
- QDir dir(QDir::homePath()+"/.lumina/quickplugins");
+ QDir dir(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/quickplugins");
QStringList files = dir.entryList(QStringList() << "quick-*.qml", QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
dir.cd(LOS::LuminaShare()+"quickplugins");
files << dir.entryList(QStringList() << "quick-*.qml", QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
@@ -486,16 +486,16 @@ QStringList LUtils::infoQuickPlugin(QString ID){ //Returns: [Name, Description,
QStringList LUtils::listFavorites(){
static QDateTime lastRead;
QDateTime cur = QDateTime::currentDateTime();
- if(lastRead.isNull() || lastRead<QFileInfo(QDir::homePath()+"/.lumina/favorites/fav.list").lastModified()){
- fav = LUtils::readFile(QDir::homePath()+"/.lumina/favorites/fav.list");
+ if(lastRead.isNull() || lastRead<QFileInfo( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/favorites.list").lastModified()){
+ fav = LUtils::readFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/favorites.list");
fav.removeAll(""); //remove any empty lines
fav.removeDuplicates();
lastRead = cur;
- if(fav.isEmpty()){
+ /*if(fav.isEmpty()){
//Make sure the favorites dir exists, and create it if necessary
QDir dir(QDir::homePath()+"/.lumina/favorites");
if(!dir.exists()){ dir.mkpath(QDir::homePath()+"/.lumina/favorites"); }
- }
+ }*/
}
return fav;
@@ -503,7 +503,7 @@ QStringList LUtils::listFavorites(){
bool LUtils::saveFavorites(QStringList list){
list.removeDuplicates();
- bool ok = LUtils::writeFile(QDir::homePath()+"/.lumina/favorites/fav.list", list, true);
+ bool ok = LUtils::writeFile(QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/favorites.list", list, true);
if(ok){ fav = list; } //also save internally in case of rapid write/read of the file
return ok;
}
@@ -545,7 +545,7 @@ void LUtils::removeFavorite(QString path){
}
void LUtils::upgradeFavorites(int fromoldversionnumber){
- if(fromoldversionnumber <= 8004){ // < pre-0.8.4>, sym-links in the ~/.lumina/favorites dir}
+ /*if(fromoldversionnumber <= 8004){ // < pre-0.8.4>, sym-links in the ~/.lumina/favorites dir}
//Include 0.8.4-devel versions in this upgrade (need to distinguish b/w devel and release versions later somehow)
QDir favdir(QDir::homePath()+"/.lumina/favorites");
QFileInfoList symlinks = favdir.entryInfoList(QDir::Files | QDir::Dirs | QDir::System | QDir::NoDotAndDotDot);
@@ -568,7 +568,7 @@ void LUtils::upgradeFavorites(int fromoldversionnumber){
if(newentry){
LUtils::saveFavorites(favfile);
}
- } //end check for version <= 0.8.4
+ }*/ //end check for version <= 0.8.4
}
@@ -824,7 +824,7 @@ void LUtils::LoadSystemDefaults(bool skipOS){
//qDebug() << " - Final Theme Color:" << themesettings[1];
//Ensure that the settings directory exists
- QString setdir = QDir::homePath()+"/.lumina/LuminaDE";
+ QString setdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop";
if(!QFile::exists(setdir)){
QDir dir;
dir.mkpath(setdir);
@@ -845,11 +845,12 @@ bool LUtils::checkUserFiles(QString lastversion){
bool newversion = ( oldversion < nversion ); //increasing version number
bool newrelease = ( lastversion.contains("-devel", Qt::CaseInsensitive) && QApplication::applicationVersion().contains("-release", Qt::CaseInsensitive) ); //Moving from devel to release
+ QString confdir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/";
//Check for the desktop settings file
- QString dset = QDir::homePath()+"/.lumina/LuminaDE/desktopsettings.conf";
+ QString dset = confdir+"desktopsettings.conf";
bool firstrun = false;
- if(!QFile::exists(dset) || oldversion < 5000){
- if( oldversion < 5000 ){ QFile::remove(dset); qDebug() << "Current desktop settings obsolete: Re-implementing defaults"; }
+ if(!QFile::exists(dset) || oldversion < 100000){
+ if( oldversion < 100000 && nversion>=100000 ){ system("rm -rf ~/.lumina"); qDebug() << "Current desktop settings obsolete: Re-implementing defaults"; }
else{ firstrun = true; }
LUtils::LoadSystemDefaults();
}
@@ -858,7 +859,7 @@ bool LUtils::checkUserFiles(QString lastversion){
LUtils::upgradeFavorites(oldversion);
}
//Convert any "userbutton" and "appmenu" panel plugins to the new "systemstart" plugin (0.8.7)
- if(oldversion <= 8007 && (newversion || newrelease) && nversion < 8008){
+ /*if(oldversion <= 8007 && (newversion || newrelease) && nversion < 8008){
QSettings dset(QSettings::UserScope, "LuminaDE","desktopsettings");
QStringList plugKeys = dset.allKeys().filter("panel").filter("/pluginlist");
for(int i=0; i<plugKeys.length(); i++){
@@ -888,10 +889,10 @@ bool LUtils::checkUserFiles(QString lastversion){
if(QFile::exists(QDir::homePath()+"/.lumina/pluginsettings/desktopsettings.conf")){
QFile::remove(QDir::homePath()+"/.lumina/pluginsettings/desktopsettings.conf");
}
- }
+ }*/
//Convert to the XDG autostart spec as necessary (Change occured with 0.8.5)
- if(QFile::exists(QDir::homePath()+"/.lumina/startapps") ){
+ /*if(QFile::exists(QDir::homePath()+"/.lumina/startapps") ){
QStringList cmds = LUtils::readFile(QDir::homePath()+"/.lumina/startapps");
for(int i=0; i<cmds.length(); i++){
cmds[i] = cmds[i].remove("lumina-open").simplified(); //remove the file opener
@@ -900,15 +901,13 @@ bool LUtils::checkUserFiles(QString lastversion){
LXDG::setAutoStarted(true, cmds[i]);
}
QFile::remove(QDir::homePath()+"/.lumina/startapps"); //delete the old file
- }
+ }*/
- //Check for the default applications file for lumina-open
- dset = QDir::homePath()+"/.lumina/LuminaDE/lumina-open.conf";
- if(!QFile::exists(dset)){
+ //Check the fluxbox configuration files
+ dset = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/";
+ if(!QFile::exists(dset+"fluxbox-init")){
firstrun = true;
}
- //Check the fluxbox configuration files
- dset = QDir::homePath()+"/.lumina/";
bool fluxcopy = false;
if(!QFile::exists(dset+"fluxbox-init")){ fluxcopy=true; }
else if(!QFile::exists(dset+"fluxbox-keys")){fluxcopy=true; }
@@ -917,7 +916,9 @@ bool LUtils::checkUserFiles(QString lastversion){
qDebug() << "Copying default fluxbox configuration files";
if(QFile::exists(dset+"fluxbox-init")){ QFile::remove(dset+"fluxbox-init"); }
if(QFile::exists(dset+"fluxbox-keys")){ QFile::remove(dset+"fluxbox-keys"); }
- QFile::copy(LOS::LuminaShare()+"fluxbox-init-rc", dset+"fluxbox-init");
+ QString finit = LUtils::readFile(LOS::LuminaShare()+"fluxbox-init-rc").join("\n");
+ finit.replace("${XDG_CONFIG_HOME}", QString(getenv("XDG_CONFIG_HOME")));
+ LUtils::writeFile(dset+"fluxbox-init", finit.split("\n"));
QFile::copy(LOS::LuminaShare()+"fluxbox-keys", dset+"fluxbox-keys");
QFile::setPermissions(dset+"fluxbox-init", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup);
QFile::setPermissions(dset+"fluxbox-keys", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup);
diff --git a/src-qt5/core/libLumina/themes/Glass.qss.template b/src-qt5/core/libLumina/themes/Glass.qss.template
index 13e54df3..de032668 100644
--- a/src-qt5/core/libLumina/themes/Glass.qss.template
+++ b/src-qt5/core/libLumina/themes/Glass.qss.template
@@ -457,7 +457,7 @@ QProgressBar::chunk:horizontal{
margin-bottom: 2px;
}
-LDPlugin#applauncher QToolButton{
+LDPlugin#applauncher QToolButton, LDPlugin, LDPlugin#desktopview QListWidget::item{
background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(234, 236, 243, 30), stop:1 rgba(229, 229, 229, 70));
border-width: 3px;
border-style: solid;
@@ -468,7 +468,7 @@ LDPlugin#applauncher QToolButton{
border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255, 255, 255, 30), stop:0.724868 rgba(255, 255, 255, 60), stop:1 rgba(255, 255, 255, 10));
color: white;
}
-LDPlugin#applauncher QToolButton:hover{
+LDPlugin#applauncher QToolButton:hover, LDPlugin#desktopview QListWidget::item:hover{
background-color: qradialgradient(spread:reflect, cx:0.113757, cy:0.875, radius:0.7, fx:0.045, fy:0.954545, stop:0 rgba(234, 236, 243, 100), stop:1 rgba(229, 229, 229, 150));
border-width: 3px;
border-style: solid;
@@ -477,7 +477,6 @@ LDPlugin#applauncher QToolButton:hover{
border-bottom-color: qradialgradient(spread:pad, cx:0.5, cy:0, radius:0.5, fx:0.5, fy:0, stop:0 rgba(255, 255, 255, 30), stop:0.724868 rgba(255, 255, 255, 60), stop:1 rgba(255, 255, 255, 10));
border-left-color: qradialgradient(spread:pad, cx:1, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255, 255, 255, 30), stop:0.724868 rgba(255, 255, 255, 60), stop:1 rgba(255, 255, 255, 10));
border-right-color: qradialgradient(spread:pad, cx:0, cy:0.5, radius:0.5, fx:1, fy:0.5, stop:0 rgba(255, 255, 255, 30), stop:0.724868 rgba(255, 255, 255, 60), stop:1 rgba(255, 255, 255, 10));
- color: white;
color: %%TEXTHIGHLIGHTCOLOR%%;
}
QWidget#LuminaPanelColor{
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp
index 134cada1..772ead8a 100644
--- a/src-qt5/core/lumina-desktop/LDesktop.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktop.cpp
@@ -24,7 +24,7 @@ LDesktop::LDesktop(int deskNum, bool setdefault) : QObject(){
usewinmenu=false;
//Setup the internal variables
- settings = new QSettings(QSettings::UserScope, "LuminaDE","desktopsettings", this);
+ settings = new QSettings(QSettings::UserScope, "lumina-desktop","desktopsettings", this);
//qDebug() << " - Desktop Settings File:" << settings->fileName();
if(!QFile::exists(settings->fileName())){ settings->setValue(DPREFIX+"background/filelist",QStringList()<<"default"); settings->sync(); }
bgWindow = 0;
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index 9444edd6..5de9920d 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -92,9 +92,8 @@ void LSession::setupSession(){
//Setup the QSettings default paths
splash.showScreen("settings");
if(DEBUG){ qDebug() << " - Init QSettings:" << timer->elapsed();}
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- sessionsettings = new QSettings("LuminaDE", "sessionsettings");
- DPlugSettings = new QSettings("pluginsettings","desktopsettings");
+ sessionsettings = new QSettings("lumina-desktop", "sessionsettings");
+ DPlugSettings = new QSettings("lumina-desktop","pluginsettings/desktopsettings");
//Load the proper translation files
if(sessionsettings->value("ForceInitialLocale",false).toBool()){
//Some system locale override it in place - change the env first
@@ -150,11 +149,13 @@ void LSession::setupSession(){
qDebug() << " - Initialize file system watcher";
if(DEBUG){ qDebug() << " - Init QFileSystemWatcher:" << timer->elapsed();}
watcher = new QFileSystemWatcher(this);
- //watcher->addPath( QDir::homePath()+"/.lumina/stylesheet.qss" );
- watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/sessionsettings.conf" );
- watcher->addPath( QDir::homePath()+"/.lumina/LuminaDE/desktopsettings.conf" );
- watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-init" );
- watcher->addPath( QDir::homePath()+"/.lumina/fluxbox-keys" );
+ QString confdir = sessionsettings->fileName().section("/",0,-2);
+ watcher->addPath( sessionsettings->fileName() );
+ watcher->addPath( confdir+"/desktopsettings.conf" );
+ watcher->addPath( confdir+"/fluxbox-init" );
+ watcher->addPath( confdir+"/fluxbox-keys" );
+ //Try to watch the localized desktop folder too
+ if(QFile::exists(QDir::homePath()+"/"+tr("Desktop"))){ watcher->addPath( QDir::homePath()+"/"+tr("Desktop") ); }
watcher->addPath( QDir::homePath()+"/Desktop" );
//connect internal signals/slots
@@ -322,8 +323,8 @@ void LSession::watcherChange(QString changed){
if(changed.endsWith("fluxbox-init") || changed.endsWith("fluxbox-keys")){ refreshWindowManager(); }
else if(changed.endsWith("sessionsettings.conf") ){ sessionsettings->sync(); emit SessionConfigChanged(); }
else if(changed.endsWith("desktopsettings.conf") ){ emit DesktopConfigChanged(); }
- else if(changed == QDir::homePath()+"/Desktop"){
- desktopFiles = QDir(QDir::homePath()+"/Desktop").entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
+ else if(changed == QDir::homePath()+"/Desktop" || changed == QDir::homePath()+"/"+tr("Desktop") ){
+ desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); }
emit DesktopFilesChanged();
}
diff --git a/src-qt5/core/lumina-desktop/WMProcess.cpp b/src-qt5/core/lumina-desktop/WMProcess.cpp
index 29dff542..aa01b730 100644
--- a/src-qt5/core/lumina-desktop/WMProcess.cpp
+++ b/src-qt5/core/lumina-desktop/WMProcess.cpp
@@ -10,7 +10,7 @@
WMProcess::WMProcess() : QProcess(){
connect(this,SIGNAL(finished(int, QProcess::ExitStatus)),this,SLOT(processFinished(int, QProcess::ExitStatus)) );
this->setProcessChannelMode(QProcess::MergedChannels);
- QString log = QDir::homePath()+"/.lumina/logs/wm.log";
+ QString log = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/logs/wm.log";
if(QFile::exists(log)){ QFile::remove(log); }
this->setStandardOutputFile(log);
//ssaver = new QProcess(0);
@@ -74,23 +74,8 @@ QString WMProcess::setupWM(){
QString WM = LSession::handle()->sessionSettings()->value("WindowManager", "fluxbox").toString();
QString cmd="echo WM Disabled";
//leave the option to add other window managers here (for testing purposes)
- if(WM=="openbox"){
- QString confDir = QDir::homePath()+"/.config/openbox";
- if(!QFile::exists(confDir)){ QDir dir(confDir); dir.mkpath(confDir); }
- if(!QFile::exists(confDir+"lumina-rc.xml")){
- QFile::copy(":/openboxconf/lumina-rc.xml",confDir+"/lumina-rc.xml");
- QFile::setPermissions(confDir+"/lumina-rc.xml", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup);
- }
- if(!QFile::exists(confDir+"lumina-menu.xml")){
- QFile::copy(":/openboxconf/lumina-menu.xml",confDir+"/lumina-menu.xml");
- QFile::setPermissions(confDir+"/lumina-menu.xml", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup);
- }
- //Now copy the configuration files around as necessary
- //if(QFile::exists(confDir+"/rc.xml")){ QFile::rename(confDir+"/rc.xml",confDir+"/openbox-rc.xml"); }
- //QFile::copy(confDir+"/lumina-rc.xml",confDir+"/rc.xml");
- cmd = "openbox --debug --sm-disable --config-file "+confDir+"/lumina-rc.xml";
- }else if(WM=="fluxbox"){
- QString confDir = QDir::homePath()+"/.lumina";
+ if(WM=="fluxbox"){
+ QString confDir = QString( getenv("XDG_CONFIG_HOME"))+"/lumina-desktop";
if(!QFile::exists(confDir)){ QDir dir(confDir); dir.mkpath(confDir); }
if(!QFile::exists(confDir+"/fluxbox-init")){
QFile::copy(":/fluxboxconf/fluxbox-init-rc",confDir+"/fluxbox-init");
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
index dd1cc8a3..4eabfb70 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
@@ -48,7 +48,7 @@ mime_default_application/x-shellscript=lumina-textedit.desktop
#THEME SETTINGS
theme_themefile=Glass #Name of the theme to use (disable for Lumina-Default)
-theme_colorfile=Black #Name of the color spec file to use for theming
+theme_colorfile=Grey-Dark #Name of the color spec file to use for theming
theme_iconset=oxygen #Name of the icon theme to use
theme_font=Arial #Name of the font family to use
theme_fontsize=10pt #Default size of the fonts to use on the desktop (can also use a percentage of the screen height (<number>%) )
diff --git a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-init-rc b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-init-rc
index 15283468..5fabfd7b 100644
--- a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-init-rc
+++ b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-init-rc
@@ -73,10 +73,9 @@ session.cacheLife: 5
session.ignoreBorder: false
session.tabsAttachArea: Window
session.tabPadding: 0
-session.keyFile: ~/.lumina/fluxbox-keys
+session.keyFile: ${XDG_CONFIG_HOME}/lumina-desktop/fluxbox-keys
session.configVersion: 13
session.autoRaiseDelay: 250
session.cacheMax: 200
session.imageDither: True
session.forcePseudoTransparency: True
-
diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp
index 50ad7ef4..35561073 100644
--- a/src-qt5/core/lumina-desktop/main.cpp
+++ b/src-qt5/core/lumina-desktop/main.cpp
@@ -26,7 +26,7 @@
#define DEBUG 0
-QFile logfile(QDir::homePath()+"/.lumina/logs/runtime.log");
+/*QFile logfile;
void MessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg){
QString txt;
switch(type){
@@ -45,12 +45,14 @@ void MessageOutput(QtMsgType type, const QMessageLogContext &context, const QStr
txt = QString("FATAL: %1").arg(msg);
txt += "\nContext: "+QString(context.file)+" Line: "+QString(context.line)+" Function: "+QString(context.function);
break;
+ default:
+ txt = msg;
}
QTextStream out(&logfile);
out << txt;
if(!txt.endsWith("\n")){ out << "\n"; }
-}
+}*/
int main(int argc, char ** argv)
{
@@ -74,6 +76,7 @@ int main(int argc, char ** argv)
LSession a(argc, argv);
if(!a.isPrimaryProcess()){ return 0; }
//Setup the log file
+ /* logfile.setFileName( QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/logs/runtime.log" );
qDebug() << "Lumina Log File:" << logfile.fileName();
if(QFile::exists(logfile.fileName()+".old")){ QFile::remove(logfile.fileName()+".old"); }
if(logfile.exists()){ QFile::rename(logfile.fileName(), logfile.fileName()+".old"); }
@@ -82,11 +85,11 @@ int main(int argc, char ** argv)
QDir dir;
dir.mkpath(QDir::homePath()+"/.lumina/logs");
}
- logfile.open(QIODevice::WriteOnly | QIODevice::Append);
+ logfile.open(QIODevice::WriteOnly | QIODevice::Append);*/
QTime *timer=0;
if(DEBUG){ timer = new QTime(); timer->start(); }
//Setup Log File
- qInstallMessageHandler(MessageOutput);
+ //qInstallMessageHandler(MessageOutput);
if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); }
LuminaThemeEngine theme(&a);
QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) );
@@ -99,6 +102,6 @@ int main(int argc, char ** argv)
int retCode = a.exec();
//qDebug() << "Stopping the window manager";
qDebug() << "Finished Closing Down Lumina";
- logfile.close();
+ //logfile.close();
return retCode;
}
diff --git a/src-qt5/core/lumina-open/LFileDialog.cpp b/src-qt5/core/lumina-open/LFileDialog.cpp
index 9ec94bf5..afc5d296 100644
--- a/src-qt5/core/lumina-open/LFileDialog.cpp
+++ b/src-qt5/core/lumina-open/LFileDialog.cpp
@@ -15,7 +15,6 @@ LFileDialog::LFileDialog(QWidget *parent) : QDialog(parent), ui(new Ui::LFileDia
appExec.clear();
appPath.clear();
appFile.clear();
- //QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
settings = new QSettings("lumina-desktop", "lumina-open", this);
//Connect the signals/slots
connect(ui->combo_apps, SIGNAL(currentIndexChanged(int)), this, SLOT(updateUI()) );
@@ -34,6 +33,7 @@ LFileDialog::~LFileDialog(){
void LFileDialog::setFileInfo(QString filename, QString extension, bool isFile){
//Set the labels for the file
qDebug() << "SetFileInfo:" << filename << extension << isFile;
+ filePath = filename; //save for later
ui->label_file->setText( this->fontMetrics().elidedText( filename, Qt::ElideMiddle, 300 ) );
bool shownetwork = false;
if(isFile){ ui->label_extension->setText( "("+extension+")"); }
@@ -46,28 +46,17 @@ void LFileDialog::setFileInfo(QString filename, QString extension, bool isFile){
//static functions
QString LFileDialog::getDefaultApp(QString extension){
+ if(!extension.contains("/")){ return ""; }
qDebug() << "Get Default App:" << extension;
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- if(extension.contains("/")){
- return LXDG::findDefaultAppForMime(extension);
- }else{
- return QSettings("LuminaDE", "lumina-open").value("default/"+extension,"").toString();
- }
+ return LXDG::findDefaultAppForMime(extension);
}
void LFileDialog::setDefaultApp(QString extension, QString appFile){
- if(extension.contains("/")){
+ if(!extension.contains("/")){ extension = LXDG::findAppMimeForFile(appFile); }
+
//mime type default: set on the system itself
if(appFile.endsWith(".desktop")){ appFile = appFile.section("/",-1); } //only need the relative path
LXDG::setDefaultAppForMime(extension, appFile);
- }else{
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- if(appFile.isEmpty()){
- QSettings("LuminaDE", "lumina-open").remove("default/"+extension);
- }else{
- QSettings("LuminaDE", "lumina-open").setValue("default/"+extension,appFile);
- }
- }
}
// -----------
@@ -172,7 +161,7 @@ void LFileDialog::generateAppList(bool shownetwork){
PREFAPPS = getPreferredApplications();
ui->combo_rec->clear();
//Now get the application mimetype for the file extension (if available)
- QString mimetype = fileEXT;
+ QStringList mimetypes = LXDG::findAppMimeForFile(filePath, true).split("::::"); //use all mimetypes
//Now add all the detected applications
QHash< QString, QList<XDGDesktop> > hash = LXDG::sortDesktopCats( LXDG::systemDesktopFiles() );
QStringList cat = hash.keys();
@@ -193,11 +182,14 @@ void LFileDialog::generateAppList(bool shownetwork){
}
ui->combo_apps->addItem(LXDG::findIcon(app[a].icon, "application-x-desktop"), app[a].name, app[a].filePath);
//Check to see if this app matches the mime type
- if(app[a].mimeList.contains(mimetype) && !mimetype.isEmpty()){
- // also put this app in the preferred list
- PREFAPPS.append(app[a].filePath);
- //If this is the first preferred app found - select this app initially
- if(ui->combo_apps->currentIndex()<=0){ ui->combo_apps->setCurrentIndex(ui->combo_apps->count()-1); }
+ if(!mimetypes.isEmpty()){
+ QStringList tmp = mimetypes; tmp << app[a].mimeList;
+ if(tmp.removeDuplicates() > 0 ){
+ // also put this app in the preferred list
+ PREFAPPS.append(app[a].filePath);
+ //If this is the first preferred app found - select this app initially
+ if(ui->combo_apps->currentIndex()<=0){ ui->combo_apps->setCurrentIndex(ui->combo_apps->count()-1); }
+ }
}
}
}
diff --git a/src-qt5/core/lumina-open/LFileDialog.h b/src-qt5/core/lumina-open/LFileDialog.h
index 96016cf2..95e117fa 100644
--- a/src-qt5/core/lumina-open/LFileDialog.h
+++ b/src-qt5/core/lumina-open/LFileDialog.h
@@ -49,7 +49,7 @@ public:
private:
Ui::LFileDialog *ui;
- QString fileEXT;
+ QString fileEXT, filePath;
QSettings *settings;
QStringList PREFAPPS;
diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp
index 27fc131c..be3c130e 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -45,7 +45,7 @@ void LSession::procFinished(){
}
void LSession::startProcess(QString ID, QString command){
- QString dir = QDir::homePath()+"/.lumina/logs";
+ QString dir = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/logs";
if(!QFile::exists(dir)){ QDir tmp(dir); tmp.mkpath(dir); }
QString logfile = dir+"/"+ID+".log";
if(QFile::exists(logfile+".old")){ QFile::remove(logfile+".old"); }
diff --git a/src-qt5/core/lumina-wm-INCOMPLETE/LScreenSaver.cpp b/src-qt5/core/lumina-wm-INCOMPLETE/LScreenSaver.cpp
index dd7eb6dc..0c92784e 100644
--- a/src-qt5/core/lumina-wm-INCOMPLETE/LScreenSaver.cpp
+++ b/src-qt5/core/lumina-wm-INCOMPLETE/LScreenSaver.cpp
@@ -20,7 +20,7 @@ LScreenSaver::LScreenSaver() : QWidget(0,Qt::BypassWindowManagerHint | Qt::Windo
LOCKER = new LLockScreen(this);
LOCKER->hide();
- settings = new QSettings("LuminaDE","lumina-screensaver",this);
+ settings = new QSettings("lumina-desktop","lumina-screensaver",this);
SSRunning = SSLocked = updating = false;
this->setObjectName("LSCREENSAVERBASE");
this->setStyleSheet("LScreenSaver#LSCREENSAVERBASE{ background: grey; }");
diff --git a/src-qt5/core/lumina-wm-INCOMPLETE/main.cpp b/src-qt5/core/lumina-wm-INCOMPLETE/main.cpp
index 50251fa5..02e48b7b 100644
--- a/src-qt5/core/lumina-wm-INCOMPLETE/main.cpp
+++ b/src-qt5/core/lumina-wm-INCOMPLETE/main.cpp
@@ -24,8 +24,6 @@ int main(int argc, char ** argv)
if(!a.isPrimaryProcess()){ return 0; } //Inputs forwarded on to the primary already
LuminaThemeEngine themes(&a);
- //Setup the special settings prefix location
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
//Setup the global structures
LWM::SYSTEM = new LXCB();
if( a.inputlist.contains("--test-win") ){
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index a4d2db28..a422e012 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -22,10 +22,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
ui->setupUi(this);
if(DEBUG){ qDebug() << "Initilization:"; }
- //Be careful about the QSettings setup, it must match the lumina-desktop setup
- QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- settings = new QSettings( QSettings::UserScope, "LuminaDE", "lumina-fm", this);
- favdir = QDir::homePath()+"/.lumina/favorites/"; //save this for later
+ settings = new QSettings( QSettings::UserScope, "lumina-desktop", "lumina-fm", this);
+
//syncTimer = new QTimer(this);
//syncTimer->setInterval(200); //1/5 second (collect as many signals/slots as necessary
//syncTimer->setSingleShot(true);
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h
index 6c286152..e0bae254 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h
@@ -81,7 +81,7 @@ private:
QMenu *contextMenu;
QRadioButton *radio_view_details, *radio_view_list, *radio_view_tabs, *radio_view_cols;
QWidgetAction *detWA, *listWA, *tabsWA, *colsWA;
- QString favdir;
+
//UI Widgets
QList<DirWidget*> DWLIST;
MultimediaWidget *MW;
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 59435d2b..83940c93 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -36,8 +36,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(ui->tool_crop, SIGNAL(clicked()), IMG, SLOT(cropImage()) );
connect(IMG, SIGNAL(selectionChanged(bool)), this, SLOT(imgselchanged(bool)) );
- //QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina");
- settings = new QSettings("LuminaDE", "lumina-screenshot",this);
+ settings = new QSettings("lumina-desktop", "lumina-screenshot",this);
if(settings->value("screenshot-target", "window").toString() == "window") {
ui->radio_window->setChecked(true);
}else{
bgstack15