aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_notify.cpp
blob: 9f4c7debdb2004d0e39ae5a120c02a8443e2b5c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <jo_lowbat.hpp>

int
jo_notify(const string batlvl) {
	string		str;

	str = "notify-send \"Low battery: ";
	str += batlvl;
	str += "%\" \"Please plug in computer\" -u critical -t 15000";

	return system(str.c_str());
}

int
jo_speak(const string msg) {
	string		str;

	str = "echo \"";
	str += msg;
	str += "\" | espeak";
	return system(str.c_str());
}