diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-04 16:43:57 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-04 16:43:57 +0100 |
commit | 39558ba61c0477f14cec78a255d7f3df86bb45d4 (patch) | |
tree | 991009588ed58eb407904f1c78ff6a29a1e50a90 /src/main.cpp | |
parent | Removed whitespace (diff) | |
download | lowbat-gnu-39558ba61c0477f14cec78a255d7f3df86bb45d4.tar.gz lowbat-gnu-39558ba61c0477f14cec78a255d7f3df86bb45d4.tar.bz2 lowbat-gnu-39558ba61c0477f14cec78a255d7f3df86bb45d4.tar.xz lowbat-gnu-39558ba61c0477f14cec78a255d7f3df86bb45d4.tar.zst lowbat-gnu-39558ba61c0477f14cec78a255d7f3df86bb45d4.zip |
Now checks if acpi is installed
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 <jo_lowbat.hpp> +#include <iostream> #include <cstring> #include <thread> #include <chrono> @@ -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]; } |