aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_lowbat.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-17 17:15:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-17 17:15:51 +0200
commitd78062b1643006c59e325d4821361e56d9bd3b71 (patch)
tree79b233e0ab801b7bb9d64be526157d27b7abe301 /src/jo_lowbat.c
parentUsing libespeak and libnotify (diff)
downloadlowbat-bsd-d78062b1643006c59e325d4821361e56d9bd3b71.tar.gz
lowbat-bsd-d78062b1643006c59e325d4821361e56d9bd3b71.tar.bz2
lowbat-bsd-d78062b1643006c59e325d4821361e56d9bd3b71.tar.xz
lowbat-bsd-d78062b1643006c59e325d4821361e56d9bd3b71.tar.zst
lowbat-bsd-d78062b1643006c59e325d4821361e56d9bd3b71.zip
Starting the main program, bus error somehow
Diffstat (limited to 'src/jo_lowbat.c')
-rw-r--r--src/jo_lowbat.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/jo_lowbat.c b/src/jo_lowbat.c
index da7c575..b6ee68c 100644
--- a/src/jo_lowbat.c
+++ b/src/jo_lowbat.c
@@ -18,28 +18,14 @@
** --------------
** f: fetch
** n: notify
+** r: run
*/
int
main(
- int argc,
- const char *argv[]
+ int argc,
+ char *argv[]
)
{
- int8_t status;
- int8_t percent;
-
- (void)argc;
- (void)argv;
- if ((status = jo_f_status()) == -2) {
- return (JO_RET_RD_FAILED);
- }
- if ((percent = jo_f_percent()) == -3) {
- return (JO_RET_RD_FAILED);
- }
- printf("status: %hhd, %hhd%%\n", status, percent);
- /* NOTIFY-SEND */
- jo_n_notify("VEGA: Yo", "Welcome", NOTIFY_URGENCY_LOW, 5000);
- jo_n_speak("Heya!");
- return (JO_RET_FINE);
+ return (jo_r_lowbat(argc, argv));
}