diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-29 18:56:54 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-12-29 18:57:13 +0100 |
commit | c270c172dd67e9ab74d13fcf572688bceb3c61d6 (patch) | |
tree | 201cbafaa0888929404bafcdbbde802a5b626113 /src/jo_lowbat.cpp | |
parent | oriented object is fine (diff) | |
download | lowbat-gnu-c270c172dd67e9ab74d13fcf572688bceb3c61d6.tar.gz lowbat-gnu-c270c172dd67e9ab74d13fcf572688bceb3c61d6.tar.bz2 lowbat-gnu-c270c172dd67e9ab74d13fcf572688bceb3c61d6.tar.xz lowbat-gnu-c270c172dd67e9ab74d13fcf572688bceb3c61d6.tar.zst lowbat-gnu-c270c172dd67e9ab74d13fcf572688bceb3c61d6.zip |
espeak bug, searching
Diffstat (limited to '')
-rw-r--r-- | src/jo_lowbat.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/jo_lowbat.cpp b/src/jo_lowbat.cpp index b6cc0d6..73a91b3 100644 --- a/src/jo_lowbat.cpp +++ b/src/jo_lowbat.cpp @@ -22,11 +22,11 @@ Lowbat::jo_testNotifySend(void) { cout << "notify-send is not installed. Please install it in order to run lowbat" << endl; return 1; } - cout << "notify-send is installed" + cout << "notify-send is installed" << endl; return 0; } -void +uint8_t Lowbat::jo_testEspeak(void) { if (system("which espeak > /dev/null 2>&1")) { cout << "espeak is not installed. Please install it in order to run --say option" << endl; @@ -47,11 +47,14 @@ Lowbat::jo_fetchBatlvl(void) { int Lowbat::jo_fetchAcstat(void) { - const int ret = system("acpi | grep -q Discharging"); + int ret; + + cout << "Fetching acstat: " + ret = system("acpi | grep -q Discharging"); if (ret != 0) - cout << ret << "acstat: Charging" << endl; + cout << "Charging" << endl; else - cout << "acstat: Discharging" << endl; + cout << "Discharging" << endl; return ret; } |