From ef44630f65b5f9238efd8555cc8c5fb5bbf97ea1 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Fri, 22 Jan 2021 12:25:49 -0500 Subject: [PATCH] docs and start on menu --- headers/menu.h | 9 +++++++++ makefile | 7 +++++-- menu.c | 33 +++++++++++++++++++++++++++++++++ taskasaur.1 | 13 +++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 headers/menu.h create mode 100644 menu.c create mode 100644 taskasaur.1 diff --git a/headers/menu.h b/headers/menu.h new file mode 100644 index 0000000..e678c1e --- /dev/null +++ b/headers/menu.h @@ -0,0 +1,9 @@ +/* ncurses doesn't support multiline menu items, + * so i wrote my own menu lib */ + +typedef struct Menu Menu; +typedef struct MenuItem MenuItem; + +extern Menu* create_menu(MenuItem* item_list); +extern int set_menu_items(Menu* menu, MenuItem* item_list); +extern MenuItem* get_menu_items(Menu* menu); diff --git a/makefile b/makefile index 7e2ffd7..6cb7cf7 100644 --- a/makefile +++ b/makefile @@ -8,8 +8,11 @@ parser.o: parser.c headers/parser.h render.o: render.c headers/render.h $(CC) -c render.c -taskasaur: taskasaur.c parser.o render.o - $(CC) -o $@ $^ -lncurses -lmenu -lmd4c +menu.o: menu.c headers/menu.h + $(CC) -c menu.c + +taskasaur: taskasaur.c parser.o render.o menu.o + $(CC) -o $@ $^ -lncurses -lmd4c clean: rm taskasaur *.o diff --git a/menu.c b/menu.c new file mode 100644 index 0000000..07605c9 --- /dev/null +++ b/menu.c @@ -0,0 +1,33 @@ + +#include + +#include "headers/menu.h" + +typedef struct MenuItem { + char* contents; +} MenuItem; + +typedef struct Menu { + MenuItem* menu_items; + int menu_length; + int selected_item; +} Menu; + + +Menu* +create_menu(MenuItem* item_list) +{ + return NULL; +} + +int +set_menu_items(Menu* menu, MenuItem* item_list) +{ + return 0; +} + +MenuItem* +get_menu_items(Menu* menu) +{ + return NULL; +} diff --git a/taskasaur.1 b/taskasaur.1 new file mode 100644 index 0000000..352412b --- /dev/null +++ b/taskasaur.1 @@ -0,0 +1,13 @@ +.TH TASKASAUR 1 2021-01-22 +.SH NAME +taskasaur \- suckless kanban +.SH SYNOPSIS +.B taskasaur +[taskasaur options] +.SH DESCRIPTION +\fBtaskasaur\fP is a suckless style kanban program that runs on the command line with ncurses graphics. It stores data in the form of markdown for portability and readability. +.SH OPTIONS +.SH AUTHORS +\fBtaskasaur\fP was written by Daniel Liu +.SH REPORTING BUGS +Please open an issue at https://github.com/MrPicklePinosaur/taskasaur -- 2.20.1