aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_notify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jo_notify.cpp')
-rw-r--r--src/jo_notify.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/jo_notify.cpp b/src/jo_notify.cpp
index bd14db0..154b0b7 100644
--- a/src/jo_notify.cpp
+++ b/src/jo_notify.cpp
@@ -2,25 +2,21 @@
int
jo_notify(const string batlvl) {
- string str = nullptr;
- const char *cmd = nullptr;
+ string str;
str = "notify-send \"";
str += batlvl;
str += "%\" \"Please plug in computer\" -u critical -t 15000";
- cmd = str.c_str();
- return system(cmd);
+ return system(str.c_str());
}
int
jo_speak(const string msg) {
- string str = nullptr;
- const char *cmd = nullptr;
+ string str;
str = "echo \"";
str += msg;
str += "\" | espeak";
- cmd = str.c_str();
- return system(cmd);
+ return system(str.c_str());
}