diff options
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/libLumina/LDesktopUtils.cpp | 12 | ||||
-rw-r--r-- | src-qt5/core/libLumina/LUtils.cpp | 21 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf | 15 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf | 11 |
4 files changed, 36 insertions, 23 deletions
diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index b79f777d..973763e8 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -409,6 +409,7 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ } } } + } //qDebug() << " - Final Theme Color:" << themesettings[1]; @@ -419,7 +420,16 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ dir.mkpath(setdir); } //Now save the settings files - if(setTheme){ LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); } + if(setTheme){ + LTHEME::setCurrentSettings( themesettings[0], themesettings[1], themesettings[2], themesettings[3], themesettings[4]); + QSettings themeset("lthemeengine","lthemeengine"); + themeset.setValue("Appearance/icon_theme",themesettings[2]); + //Quick hack for a "dark" theme/color to be uniform across the desktop/applications + if(themesettings[0].contains("DarkGlass") || themesettings[1].contains("Black")){ + themeset.setValue("Appearance/custom_palette", true); + themeset.setValue("Appearance/color_scheme_path", LOS::LuminaShare().section("/",0,-3)+"/lthemeengine/colors/darker.conf"); + } + } LUtils::writeFile(setdir+"/sessionsettings.conf", sesset, true); LUtils::writeFile(setdir+"/desktopsettings.conf", deskset, true); diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index fa0173dc..e4f1c517 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -26,7 +26,7 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ if(args.isEmpty()){ proc.start(cmd, QIODevice::ReadOnly); }else{ - proc.start(cmd,args ,QIODevice::ReadOnly); + proc.start(cmd,args ,QIODevice::ReadOnly); } QString info; while(!proc.waitForFinished(1000)){ @@ -37,7 +37,7 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ } out[0] = QString::number(proc.exitCode()); out[1] = info+QString(proc.readAllStandardOutput()); - return out; + return out; } //============= // LUtils Functions @@ -59,7 +59,6 @@ int LUtils::runCmd(QString cmd, QStringList args){ return ret;*/ QFuture<QStringList> future = QtConcurrent::run(ProcessRun, cmd, args); return future.result()[0].toInt(); //turn it back into an integer return code - } QStringList LUtils::getCmdOutput(QString cmd, QStringList args){ @@ -72,7 +71,7 @@ QStringList LUtils::getCmdOutput(QString cmd, QStringList args){ if(args.isEmpty()){ proc.start(cmd); }else{ - proc.start(cmd,args); + proc.start(cmd,args); } //if(!proc.waitForStarted(30000)){ return QStringList(); } //process never started - max wait of 30 seconds while(!proc.waitForFinished(300)){ @@ -118,7 +117,7 @@ bool LUtils::isValidBinary(QString& bin){ //Relative path: search for it on the current "PATH" settings QStringList paths = QString(qgetenv("PATH")).split(":"); for(int i=0; i<paths.length(); i++){ - if(QFile::exists(paths[i]+"/"+bin)){ bin = paths[i]+"/"+bin; break;} + if(QFile::exists(paths[i]+"/"+bin)){ bin = paths[i]+"/"+bin; break;} } } //bin should be the full path by now @@ -150,7 +149,7 @@ QSettings* LUtils::openSettings(QString org, QString name, QObject *parent){ }else{ return (new QSettings(filepath, QSettings::IniFormat, parent)); } - + } QStringList LUtils::systemApplicationDirs(){ @@ -164,7 +163,7 @@ QStringList LUtils::systemApplicationDirs(){ for(int i=0; i<appDirs.length(); i++){ if( QFile::exists(appDirs[i]+"/applications") ){ out << appDirs[i]+"/applications"; - //Also check any subdirs within this directory + //Also check any subdirs within this directory // (looking at you KDE - stick to the standards!!) out << LUtils::listSubDirectories(appDirs[i]+"/applications"); } @@ -197,7 +196,7 @@ QString LUtils::GenerateOpenTerminalExec(QString term, QString dirpath){ }else if(term=="konsole" || term == "qterminal"){ exec = term+" --workdir \""+dirpath+"\""; }else{ - //-e is the parameter for most of the terminal appliction to execute an external command. + //-e is the parameter for most of the terminal appliction to execute an external command. //In this case we start a shell in the selected directory //Need the user's shell first QString shell = QString(getenv("SHELL")); @@ -258,7 +257,7 @@ QStringList LUtils::imageExtensions(bool wildcards){ static QStringList imgExtensions; if(imgExtensions.isEmpty()){ QList<QByteArray> fmt = QImageReader::supportedImageFormats(); - for(int i=0; i<fmt.length(); i++){ + for(int i=0; i<fmt.length(); i++){ if(wildcards){ imgExtensions << "*."+QString::fromLocal8Bit(fmt[i]); } else{ imgExtensions << QString::fromLocal8Bit(fmt[i]); } } @@ -308,7 +307,7 @@ QStringList LUtils::imageExtensions(bool wildcards){ qDebug() << "Loading System Encoding:" << langEnc; } //Load current encoding for this locale - QTextCodec::setCodecForLocale( QTextCodec::codecForName(langEnc.toUtf8()) ); + QTextCodec::setCodecForLocale( QTextCodec::codecForName(langEnc.toUtf8()) ); return cTrans; } @@ -379,7 +378,7 @@ void LUtils::setLocaleEnv(QString lang, QString msg, QString time, QString num,Q else{ if(!ctype.contains(".")){ ctype.append(".UTF-8"); } setenv("LC_CTYPE",ctype.toUtf8(),1); - } + } } QString LUtils::currentLocale(){ diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index c1f3a194..f9481459 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -42,6 +42,7 @@ mime_default_unknown/*=lumina-textedit.desktop mime_default_application/x-shellscript=lumina-textedit.desktop mime_default_application/pdf_ifexists=pc-pdfviewer.desktop mime_default_application/pdf_ifexists=okular.desktop +mime_default_application/pdf_ifexists=lumina-pdf.desktop mime_default_application/zip_ifexists=lumina-archiver.desktop mime_default_application/x-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-bzip-compressed-tar_ifexists=lumina-archiver.desktop @@ -51,17 +52,17 @@ mime_default_application/x-xz-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-tar_ifexists=lumina-archiver.desktop #THEME SETTINGS -theme_themefile=Glass #Name of the theme to use (disable for Lumina-Default) -theme_colorfile=Lumina-Glass #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_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) +theme_colorfile=Black #Name of the color spec file to use for theming +theme_iconset=material-design-dark #Name of the icon theme to use +theme_font=Noto Sans #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>%) ) #DESKTOP SETTINGS (used for the primary screen in multi-screen setups) desktop_visiblepanels=1 #[0 - 12] The number of panels visible by default -#desktop_backgroundfiles= #list of absolute file paths for image files (disable for Lumina default) +desktop_backgroundfiles=/usr/local/share/wallpapers/TrueOS/trueos-1-4k.png #list of absolute file paths for image files (disable for Lumina default) desktop_backgroundrotateminutes=5 #[positive integer] number of minutes between background rotations (if multiple files) -desktop_plugins=rssreader #list of plugins to be shown on the desktop by default +#desktop_plugins= #list of plugins to be shown on the desktop by default desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop items #PANEL SETTINGS (preface with panel1.<setting> or panel2.<setting>, depending on the number of panels you have visible by default) @@ -70,7 +71,7 @@ panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <numb panel1_autohide=false #[true/false] Have the panel become visible on mouse-over panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels -panel1_edgepercent=99 #[1->100] percentage of the screen edge to use +panel1_edgepercent=100 #[1->100] percentage of the screen edge to use #MENU SETTINGS (right-click menu) menu_plugins=terminal, filemanager, applications, line, settings, line, lockdesktop#list of menu plugins to show diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf index 46d00053..1327f148 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf @@ -34,9 +34,12 @@ session_default_email_ifexists=trojita.desktop #DEFAULT UTILITIES FOR INDIVIDUAL MIME TYPES # Format: mime_default_<mimetype>[_ifexists]=<*.desktop file> mime_default_text/*_ifexists=lumina-textedit.desktop +mime_default_audio/*_ifexists=lumina-mediaplayer.desktop mime_default_audio/*_ifexists=vlc.desktop +mime_default_video/*_ifexists=lumina-mediaplayer.desktop mime_default_video/*_ifexists=vlc.desktop mime_default_application/zip_ifexists=lumina-archiver.desktop +mime_default_application/pdf_ifexists=lumina-pdf.desktop mime_default_application/x-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-bzip-compressed-tar_ifexists=lumina-archiver.desktop mime_default_application/x-lrzip-compressed-tar_ifexists=lumina-archiver.desktop @@ -47,9 +50,9 @@ mime_default_unknown/*=lumina-textedit.desktop 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=Lumina-Glass #Name of the color spec file to use for theming -theme_iconset=oxygen #Name of the icon theme to use +theme_themefile=DarkGlass #Name of the theme to use (disable for Lumina-Default) +theme_colorfile=Black #Name of the color spec file to use for theming +theme_iconset=material-design-dark #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>%) ) @@ -66,7 +69,7 @@ panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <numb panel1_autohide=false #[true/false] Have the panel become visible on mouse-over panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels -panel1_edgepercent=99 #[1->100] percentage of the screen edge to use +panel1_edgepercent=100 #[1->100] percentage of the screen edge to use panel2_location=top panel2_pixelsize=3%H |