diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jo_lowbat.c | 22 | ||||
-rw-r--r-- | src/jo_lowbat.h | 38 | ||||
-rw-r--r-- | src/jo_n_notify.c | 2 | ||||
-rw-r--r-- | src/jo_n_notify.h | 2 | ||||
-rw-r--r-- | src/jo_n_speak.h | 8 |
5 files changed, 10 insertions, 62 deletions
diff --git a/src/jo_lowbat.c b/src/jo_lowbat.c deleted file mode 100644 index bcfd3c8..0000000 --- a/src/jo_lowbat.c +++ /dev/null @@ -1,22 +0,0 @@ -/****************************************************************************************/ -/* */ -/* File : jo_lowbat.c /_________/ */ -/* Author : Joe | */ -/* Date : 04/2020 | */ -/* Info : The main | */ -/* / | */ -/* \ / */ -/* \_____/ */ -/* */ -/****************************************************************************************/ - -#include <jo_lowbat.h> -#include <libnotify/notify.h> - -int -main -(int argc, - const char *argv[]) -{ - return (jo_r_lowbat(argc, argv)); -} diff --git a/src/jo_lowbat.h b/src/jo_lowbat.h deleted file mode 100644 index 2a664db..0000000 --- a/src/jo_lowbat.h +++ /dev/null @@ -1,38 +0,0 @@ -/****************************************************************************************/ -/* */ -/* File : jo_lowbat.h /_________/ */ -/* Author : Joe | */ -/* Date : 04/2020 | */ -/* Info : The general header | */ -/* / | */ -/* \ / */ -/* \_____/ */ -/* */ -/****************************************************************************************/ - -#ifndef JO_LOWBAT_H -#define JO_LOWBAT_H - -#include <jo_lowbat.h> -#include <jo_n_speak.h> -#include <jo_n_notify.h> -#include <stdlib.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> - -enum -{ - JO_RET_FINE, - JO_RET_RD_FAILED, - JO_RET_ESPEAK_FAILED -}; - -int8_t jo_r_lowbat( - int, - const char** - ); -int8_t jo_f_status(void); -int8_t jo_f_percent(void); - -#endif diff --git a/src/jo_n_notify.c b/src/jo_n_notify.c index a92f2b2..f98ea1d 100644 --- a/src/jo_n_notify.c +++ b/src/jo_n_notify.c @@ -21,7 +21,7 @@ jo_n_notify { NotifyNotification *n; - notify_init("lowbat"); + notify_init(JO_LOWBAT); n = notify_notification_new(head, body, NULL); notify_notification_set_urgency(n, u); notify_notification_set_timeout(n, t); diff --git a/src/jo_n_notify.h b/src/jo_n_notify.h index 0bf7ca1..a72395a 100644 --- a/src/jo_n_notify.h +++ b/src/jo_n_notify.h @@ -17,6 +17,8 @@ #include <stddef.h> #include <stdint.h> +#define JO_LOWBAT "lowbat" + void jo_n_notify( const char[], const char[], diff --git a/src/jo_n_speak.h b/src/jo_n_speak.h index aedd837..79ca683 100644 --- a/src/jo_n_speak.h +++ b/src/jo_n_speak.h @@ -13,7 +13,6 @@ #ifndef JO_N_SPEAK_H #define JO_N_SPEAK_H -#include <jo_lowbat.h> #include <espeak/speak_lib.h> #include <string.h> #include <stdlib.h> @@ -21,6 +20,13 @@ #include <stdio.h> #include <unistd.h> +enum +{ + JO_RET_FINE, + JO_RET_RD_FAILED, + JO_RET_ESPEAK_FAILED +}; + #define JO_ESPEAK_VOICE "English" void jo_n_speak(const char *); |