Compare commits
54 Commits
v1.0.0
...
143feaac83
| Author | SHA1 | Date | |
|---|---|---|---|
|
143feaac83
|
|||
|
972bd28b6f
|
|||
|
8421e3ee01
|
|||
|
bda1c18a52
|
|||
|
37cd828c21
|
|||
|
c746cad281
|
|||
|
0abfa4af0f
|
|||
|
ceede3001a
|
|||
|
29eeef56b8
|
|||
|
e6203f70a9
|
|||
|
d8a3fe0d7a
|
|||
|
7c060419f4
|
|||
|
c3b1797bd9
|
|||
|
e9d8988ef2
|
|||
|
476428b7de
|
|||
|
58eda93cbb
|
|||
|
21a6c077fd
|
|||
|
2e0f7501d7
|
|||
|
3809b5b96a
|
|||
|
79a313a03e
|
|||
|
c3dee6a8ef
|
|||
|
20d6e4a8b1
|
|||
|
65d591a455
|
|||
|
65b5e45cba
|
|||
|
e3f807bd7f
|
|||
|
9bd8817797
|
|||
|
e8e0babfaa
|
|||
|
3159a34c9a
|
|||
|
1267fc54bb
|
|||
|
613071c8f5
|
|||
|
0cf3febd2b
|
|||
|
76396a3022
|
|||
|
e900ffc0d7
|
|||
|
dd148396f1
|
|||
|
71939366c7
|
|||
|
a5734d1323
|
|||
|
14f177e3f9
|
|||
|
881d13b546
|
|||
|
a852107b62
|
|||
|
3acbe3eb33
|
|||
|
672998b17b
|
|||
|
01e6a6064d
|
|||
|
d0ec4b758b
|
|||
|
b27047e7d1
|
|||
|
71e935c8ad
|
|||
|
44a4374fd1
|
|||
|
76c620c142
|
|||
|
b49b728a4c
|
|||
|
bb0c5c173a
|
|||
|
b476873ede
|
|||
|
78a190b28f
|
|||
|
21dd4c988e
|
|||
|
e875f6fab3
|
|||
|
06a0b782cf
|
@@ -6,6 +6,10 @@
|
|||||||
- ncurses development libraries
|
- ncurses development libraries
|
||||||
## Building
|
## Building
|
||||||
To build `todd` all you need to do is run `make`.
|
To build `todd` all you need to do is run `make`.
|
||||||
|
## Usage
|
||||||
|
```sh
|
||||||
|
./todd <file.todd>
|
||||||
|
```
|
||||||
## 3rd Party
|
## 3rd Party
|
||||||
Todd uses the following dependencies:
|
Todd uses the following dependencies:
|
||||||
- stb_ds - https://github.com/nothings/stb
|
- stb_ds - https://github.com/nothings/stb
|
||||||
|
|||||||
15
color.h
Normal file
15
color.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#ifndef COLOR_H
|
||||||
|
#define COLOR_H
|
||||||
|
|
||||||
|
#include <ncurses.h>
|
||||||
|
|
||||||
|
#define BORDERS_PRIMARY COLOR_BLACK
|
||||||
|
#define BORDERS_SECONDARY COLOR_WHITE
|
||||||
|
|
||||||
|
#define DEFAULT_PRIMARY COLOR_WHITE
|
||||||
|
#define DEFAULT_SECONDARY COLOR_BLACK
|
||||||
|
|
||||||
|
#define COMPLETED_PRIMARY COLOR_BLACK
|
||||||
|
#define COMPLETED_SECONDARY COLOR_YELLOW
|
||||||
|
|
||||||
|
#endif
|
||||||
8
main.c
8
main.c
@@ -1,9 +1,9 @@
|
|||||||
#include "engine/todo.h"
|
#include "engine/todo.h"
|
||||||
|
#include "color.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ncurses.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
@@ -59,9 +59,9 @@ void initialize_curses(int *width, int *height) {
|
|||||||
*height = th;
|
*height = th;
|
||||||
|
|
||||||
start_color();
|
start_color();
|
||||||
init_pair(BORDERS_PAIR, COLOR_BLACK, COLOR_WHITE);
|
init_pair(BORDERS_PAIR, BORDERS_PRIMARY, BORDERS_SECONDARY);
|
||||||
init_pair(DEFAULT_PAIR, COLOR_WHITE, COLOR_BLACK);
|
init_pair(DEFAULT_PAIR, DEFAULT_PRIMARY, DEFAULT_SECONDARY);
|
||||||
init_pair(COMPLETED_PAIR, COLOR_BLACK, COLOR_GREEN);
|
init_pair(COMPLETED_PAIR, COMPLETED_PRIMARY, COMPLETED_SECONDARY);
|
||||||
// turn off echoing of keys, and enter cbreak mode,
|
// turn off echoing of keys, and enter cbreak mode,
|
||||||
// where no buffering is performed on keyboard input
|
// where no buffering is performed on keyboard input
|
||||||
cbreak();
|
cbreak();
|
||||||
|
|||||||
Reference in New Issue
Block a user