Helper to keep me on track with self-care through my day
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.1 KiB

#include <stdio.h>
#define ALARM_SOUND "play -n synth 3 sin 380 3 sin 770 3 sin 755 delay 0 .1 .25 fade l 0 1 0.8 trim 0 .5 2> /dev/null"
#define TASKS_FILE ".bonzo"
#define LOG_FILE ".bonzolog"
#define LIST_DELIMITER "==="
#define LIST_DELIMITER_LENGTH strlen(LIST_DELIMITER)
#define TASK_DELIMITER "\t"
#define MAX_ITEMS 127
#define MAX_LENGTH 255
#define MAX_LISTS 10
#define MIN_OFFSET_IN_MINUTES 60
#define TIMESTAMP_LENGTH 11
#define WAIT_TIME_INPUT_LENGTH 5
#define SECONDS_IN_MINUTE 60
#define S_NOT_DONE_DELAY 10 * SECONDS_IN_MINUTE
#define P_NOT_DONE_DELAY 10 * SECONDS_IN_MINUTE
#define N_NOT_DONE_DELAY 40 * SECONDS_IN_MINUTE
#define OPTIONS "[ (d)one / (n)ot / (w)ait / (s)kip ]"
#define RUNNING_TEXT_BASE "Running Bonzo Buddy"
#define STRCMP_MATCH 0
typedef struct task {
char name[MAX_LENGTH];
int regularity;
int scheduled;
int skipCount;
bool priority;
bool completed;
} task;
void getListNames(char [][MAX_LENGTH], int , char *[]);
FILE *openHomeFile(char [], char[]);
void createTask(task *, char [], int);
bool isInSelectedLists(char [], char [][MAX_LENGTH], int);
char *getRunningText(int *);