diff options
| author | hachem <im@hachem.wtf> | 2026-10-03 17:27:07 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-03 17:27:07 +0200 |
| commit | 41005a0d4102843cefeed911a0fa8bd5774d998c (patch) | |
| tree | 9110455dcdeeab7483516810121bd13c10d9ea24 /config.h | |
| parent | 2981b6b3bbd9d40aee6c0d23d450dcd58a00adac (diff) | |
fix: more refactoring holy hell
Diffstat (limited to 'config.h')
| -rw-r--r-- | config.h | 56 |
1 files changed, 46 insertions, 10 deletions
@@ -1,12 +1,48 @@ -#define LEFT_MARGIN 2 -#define SECTION_INDENT 2 -#define SUBTASK_INDENT 4 -#define WRAP_COLUMN 80 +/* layout, in columns */ +#define LEFT_MARGIN 2 /* left padding for everything */ +#define SECTION_INDENT 2 /* extra indent per section depth */ +#define SUBTASK_INDENT 4 /* extra indent for subtasks */ +#define WRAP_COLUMN 80 /* wrap item text past this column */ -#define MAX_ITEMS 4096 -#define MAX_TEXT 256 -#define MAX_COMMAND 64 -#define MAX_HISTORY 64 +/* colour theme (see todo.c for each): + * - THEME_DEFAULT + * - THEME_GRUVBOX + * - THEME_NORD + * - THEME_MONO + * - THEME_CUSTOM (the CUSTOM_THEME below) */ +#define THEME THEME_DEFAULT -#define HIGHLIGHT "\x1b[48;5;235m" -#define HIGHLIGHT_RESET "\x1b[49m" +/* used when THEME is THEME_CUSTOM */ +#define CUSTOM_THEME { \ + .highlight = "\x1b[48;5;235m", .highlight_reset = "\x1b[49m", \ + .section = "\x1b[1m", .section_reset = "\x1b[22m", \ + .note = "\x1b[2;3m", .note_reset = "\x1b[22;23m", \ + .done = "\x1b[2m", .done_reset = "\x1b[22m", \ + .number = "\x1b[2m", .number_reset = "\x1b[22m", \ + .muted = "\x1b[2m", .muted_reset = "\x1b[0m", \ + .match = "\x1b[7m", .match_reset = "\x1b[27m", \ +} + +/* checkbox glyphs (display only; the file always stores [ ] [-] [x]). + * OPT_* are for optional (*) tasks; any width is fine. */ +#define MARK_TODO "[ ]" +#define MARK_DOING "[-]" +#define MARK_DONE "[x]" +#define MARK_OPT_TODO "( )" +#define MARK_OPT_DOING "(-)" +#define MARK_OPT_DONE "(x)" + +/* cursor shape per mode (DECSCUSR) */ +#define CURSOR_NORMAL "\x1b[2 q" /* block */ +#define CURSOR_INSERT "\x1b[6 q" /* bar */ +#define CURSOR_REPLACE "\x1b[4 q" /* underline */ + +/* header clock, strftime(3) formats */ +#define DATE_FORMAT "%a %d %b %Y" +#define TIME_FORMAT "%H:%M" + +/* limits (rarely need changing) */ +#define MAX_ITEMS 4096 /* most items in a list */ +#define MAX_TEXT 256 /* longest item text, in bytes */ +#define MAX_COMMAND 64 /* longest : command or / search */ +#define MAX_HISTORY 64 /* undo/redo depth */ |
