From 39558ba61c0477f14cec78a255d7f3df86bb45d4 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 4 Dec 2019 16:43:57 +0100 Subject: Now checks if acpi is installed --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 9fae9e1..1c9c160 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -15,6 +16,10 @@ int main(int argc, const char *argv[]) { string arg_two; 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; + } if (argc > 1) { arg_one = argv[1]; } -- cgit v1.2.3