aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS-FreeBSD.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-08 09:19:34 -0400
committerKen Moore <ken@pcbsd.org>2014-09-08 09:19:34 -0400
commit26ceed88b59c1b51a03eabc58d30f99b5bf2dd02 (patch)
tree98528a617d6b43b9a92e4df1661df845723a4b02 /libLumina/LuminaOS-FreeBSD.cpp
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-26ceed88b59c1b51a03eabc58d30f99b5bf2dd02.tar.gz
lumina-26ceed88b59c1b51a03eabc58d30f99b5bf2dd02.tar.bz2
lumina-26ceed88b59c1b51a03eabc58d30f99b5bf2dd02.zip
Move the temporary brightness setting file into the users .lumina directory. That will let it persist between login sessions, allowing Lumina to automatically return to the previous setting on login.
Diffstat (limited to 'libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r--libLumina/LuminaOS-FreeBSD.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp
index 39a82c09..a3dcb91e 100644
--- a/libLumina/LuminaOS-FreeBSD.cpp
+++ b/libLumina/LuminaOS-FreeBSD.cpp
@@ -42,8 +42,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("/tmp/.lumina-currentxbrightness")){
- int val = LUtils::readFile("/tmp/.lumina-currentxbrightness").join("").simplified().toInt();
+ if(QFile::exists(QDir::homePath()+"/.lumina/.currentxbrightness")){
+ int val = LUtils::readFile(QDir::homePath()+"/.lumina/.currentxbrightness").join("").simplified().toInt();
screenbrightness = val;
}
}
@@ -63,7 +63,7 @@ void LOS::setScreenBrightness(int percent){
//Save the result for later
if(ret!=0){ screenbrightness = -1; }
else{ screenbrightness = percent; }
- LUtils::writeFile("/tmp/.lumina-currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+ LUtils::writeFile(QDir::homePath()+"/.lumina/.currentxbrightness", QStringList() << QString::number(screenbrightness), true);
}
//Read the current volume
bgstack15