diff --git a/src/functions.h b/src/functions.h index 4209ecf..131cab0 100644 --- a/src/functions.h +++ b/src/functions.h @@ -443,6 +443,15 @@ namespace { batteryLevelInt = batteryLevel.toInt(); batteryLevel.append("%"); } + else { + // It's for the Nia model c - but also its a more regular - default path, so make it the fallback + QString path = "/sys/class/power_supply/battery/capacity"; + if(QFile::exists(path)) { + batteryLevel = readFile(path).trimmed(); + batteryLevelInt = batteryLevel.toInt(); + batteryLevel.append("%"); + } + } } } void writeconfig(std::string file, std::string config) {