From cf3143ce1df8953091fe1bf53e9746af17f0c109 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 22 Dec 2019 17:35:11 +0100 Subject: Bug fix --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index b9bf375..497ff40 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -46,6 +46,7 @@ int main(int argc, const char *argv[]) { batlvl.clear(); batlvl = jo_exec("acpi | awk '{print $4}' | rev | cut -c 3- | rev"); batlvl.erase(remove(batlvl.begin(), batlvl.end(), '\n'), batlvl.end()); + batlvlint = stoi(batlvl); } cout << "Sleep for 4m" << endl; sleep_for(seconds(240)); -- cgit v1.2.3