blob: bd14db0364226e9125cfc0924be0bf162a71d81e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <jo_lowbat.hpp>
int
jo_notify(const string batlvl) {
string str = nullptr;
const char *cmd = nullptr;
str = "notify-send \"";
str += batlvl;
str += "%\" \"Please plug in computer\" -u critical -t 15000";
cmd = str.c_str();
return system(cmd);
}
int
jo_speak(const string msg) {
string str = nullptr;
const char *cmd = nullptr;
str = "echo \"";
str += msg;
str += "\" | espeak";
cmd = str.c_str();
return system(cmd);
}
|