diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-14 13:21:29 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-14 13:21:29 -0400 |
commit | f6bb0b0e52214a7235cc64dc7a52fb4fbaa61a3c (patch) | |
tree | 1a045f6368ad50ecb5118f95f3e377ec3226ff75 /src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | |
parent | Large update to the project files: (diff) | |
download | lumina-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/libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LuminaOS-FreeBSD.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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); } } |