From 8d453fb28dc7c07f0453d8d1063e5d2e72b9a320 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 29 Dec 2019 13:13:07 +0100 Subject: oop rework in progress --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 497ff40..62c20b8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,10 +14,9 @@ int main(int argc, const char *argv[]) { string batlvl; int batlvlint; - if (system("acpi > /dev/null 2>&1")) { - cout << "acpi is not installed. Please install it in order to run lowbat." << endl; - return 1; - } + Lowbat lowbat; + if (lowbat.jo_testAcpi()) + return (1); while (true) { cout << "Fetching batlvl: "; batlvl = jo_exec("acpi | awk '{print $4}' | rev | cut -c 3- | rev"); -- cgit v1.2.3