aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-06-14 13:21:29 -0400
committerKen Moore <moorekou@gmail.com>2016-06-14 13:21:29 -0400
commitf6bb0b0e52214a7235cc64dc7a52fb4fbaa61a3c (patch)
tree1a045f6368ad50ecb5118f95f3e377ec3226ff75 /src-qt5/core/lumina-desktop
parentLarge update to the project files: (diff)
downloadlumina-f6bb0b0e52214a7235cc64dc7a52fb4fbaa61a3c.tar.gz
lumina-f6bb0b0e52214a7235cc64dc7a52fb4fbaa61a3c.tar.bz2
lumina-f6bb0b0e52214a7235cc64dc7a52fb4fbaa61a3c.zip
Another large batch of updates:
1) Move the "runtime" directory in the users home to the XDG_CONFIG_HOME/lumina-desktop rather than ~/.lumina 2) Update the Glass theme a bit more.
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-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
6 files changed, 25 insertions, 37 deletions
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;
}
bgstack15