From 94b73445ccaf5652714373ce6e5a6d6feeb3914d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 18 Aug 2017 13:22:01 -0400 Subject: Change around the default settings for Lumina quite a bit: 1) Turn on some themes by default (DarkGlass/Black) 2) Sync icon theme between desktop/lthemeengine 3) If DarkGlass/Black is for the desktop, automatically turn on the "darker" color scheme for applications within lthemeengine. 4) Ensure lumina-pdf is added as a default PDF viewer. 5) Change the wallpapers/interface for the TrueOS defaults. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 12 +++++++++++- src-qt5/core/libLumina/LUtils.cpp | 21 ++++++++++----------- .../defaults/luminaDesktop-TrueOS.conf | 15 ++++++++------- .../core/lumina-desktop/defaults/luminaDesktop.conf | 11 +++++++---- 4 files changed, 36 insertions(+), 23 deletions(-) (limited to 'src-qt5/core') 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 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 fmt = QImageReader::supportedImageFormats(); - for(int i=0; i%) ) #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. or panel2., 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 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_[_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 (%) ) @@ -66,7 +69,7 @@ panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or 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 -- cgit From ddde99fd0aaf1c474a3e4b4a759a850780871903 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 18 Aug 2017 14:15:15 -0400 Subject: Add the ability to generate symlinks in the Desktop folder the first time Lumina starts up for a user, based on entries in the system's luminaDesktop.conf file. --- src-qt5/core/libLumina/LDesktopUtils.cpp | 10 ++++++++++ src-qt5/core/libLumina/LDesktopUtils.h | 4 ++-- .../core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf | 13 +++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LDesktopUtils.cpp b/src-qt5/core/libLumina/LDesktopUtils.cpp index 973763e8..4c87ae22 100644 --- a/src-qt5/core/libLumina/LDesktopUtils.cpp +++ b/src-qt5/core/libLumina/LDesktopUtils.cpp @@ -337,6 +337,16 @@ void LDesktopUtils::LoadSystemDefaults(bool skipOS){ else if(var=="favorites_remove"){ qDebug() << " - Removing:"; LDesktopUtils::removeFavorite(val); } } + tmp = sysDefaults.filter("desktoplinks_"); + QString desktopFolder = QDir::homePath()+"/Desktop/"; //need to make this translatable and dynamic later + for(int i=0; i::::[dir/app/]::::" // the field might not be used for "app" flagged entries @@ -40,7 +40,7 @@ public: static bool addFavorite(QString path, QString name = ""); static void removeFavorite(QString path); static void upgradeFavorites(int fromoldversionnumber); - + //Load the default setup for the system static void LoadSystemDefaults(bool skipOS = false); static bool checkUserFiles(QString lastversion); //returns true if something changed diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf index f9481459..e453c0b8 100644 --- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf +++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf @@ -97,6 +97,19 @@ favorites_add_ifexists=~/Videos #quicklaunch_add= #Create a quicklaunch shortcut for this file/dir #quicklaunch_add_ifexists= #Create a quicklaunch shortcut for this file/dir if the file/dir exists +#Desktop Folder symlinks +#desktoplinks_add= +desktoplinks_add=firefox.desktop +desktoplinks_add=chromium-browser.desktop +desktoplinks_add=qupzilla.desktop +desktoplinks_add=thunderbird.desktop +desktoplinks_add=trojita.desktop +desktoplinks_add=vlc.desktop +desktoplinks_add=pccontrol.desktop +desktoplinks_add=lthemeengine.desktop +desktoplinks_add=lumina-config.desktop +desktoplinks_add=appcafe.desktop +desktoplinks_add=handbook.desktop #Generic scripts/utilities to run for any additional setup procedures # These are always run after all other settings are saved #Format: usersetup_run= -- cgit