diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-04 01:19:01 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-04 01:19:01 +0100 |
commit | b6a35e12ca5ffe60e446b903fbf36e53eecbade3 (patch) | |
tree | d5833623f70e1b7992962ba949a1fb5af7abd832 | |
parent | Useless if removed (diff) | |
download | lowbat-gnu-b6a35e12ca5ffe60e446b903fbf36e53eecbade3.tar.gz lowbat-gnu-b6a35e12ca5ffe60e446b903fbf36e53eecbade3.tar.bz2 lowbat-gnu-b6a35e12ca5ffe60e446b903fbf36e53eecbade3.tar.xz lowbat-gnu-b6a35e12ca5ffe60e446b903fbf36e53eecbade3.tar.zst lowbat-gnu-b6a35e12ca5ffe60e446b903fbf36e53eecbade3.zip |
README update
-rw-r--r-- | README.org | 6 | ||||
-rw-r--r-- | src/main.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -1,10 +1,12 @@ * lowbat -Very small script that runs in the background and warns you when your battery is low until you plug your laptop in. It also is POSIX-compliant, which is nice. +Very small program that runs in the background and warns you when your battery is low until you plug your laptop in. It also is POSIX-compliant, which is nice. ** Dependencies -- ~make~ +- ~acpi~ - ~libnotify~ - ~espeak~ +- ~make~ +- ~gcc~ ** Installation Open a terminal and run these commands: diff --git a/src/main.cpp b/src/main.cpp index 69d4ef5..66914ec 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,6 +15,7 @@ int main(int argc, const char *argv[]) { string arg_two; int batlvlint; + msg = "Beep beep - low battery"; if (argc > 1) { arg_one = argv[1]; if (argc > 2) @@ -24,9 +25,6 @@ int main(int argc, const char *argv[]) { msg = arg_two; } } - else { - msg = "Beep beep - low battery"; - } while (true) { acstat = jo_exec("acpi | awk '{print $3}' | rev | cut -c 2- | rev"); |