main
config.def.h
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include <stdbool.h>
5#include <stdint.h>
6#include <stdlib.h>
7
8static const char font_path[] = "monospace.bdf";
9
10static const int win_width = 80; /* in columns */
11static const int win_height = 24; /* in rows */
12static const char win_title[] = "cterm";
13static const int win_fps = 60;
14
15static const int pad_x = 8;
16static const int pad_y = 8;
17
18static const char* const shell = NULL; /* NULL uses $SHELL */
19static const char term_name[] = "vt100";
20
21#define CTRL_DOWN (win->key_syms[MAUS_KEY_CONTROL_L] || win->key_syms[MAUS_KEY_CONTROL_R])
22#define SHIFT_DOWN (win->key_syms[MAUS_KEY_SHIFT_L] || win->key_syms[MAUS_KEY_SHIFT_R])
23
24#define BIND_COPY (CTRL_DOWN && SHIFT_DOWN && \
25 (ev->key.key == MAUS_KEY_C || ev->key.key == MAUS_KEY_C_UP))
26
27#define BIND_PASTE (CTRL_DOWN && SHIFT_DOWN && \
28 (ev->key.key == MAUS_KEY_V || ev->key.key == MAUS_KEY_V_UP))
29
30#define BIND_RELOAD_FONT (win->key_syms[MAUS_KEY_ALT_R] && \
31 (ev->key.key == MAUS_KEY_R || \
32 ev->key.key == MAUS_KEY_R_UP))
33
34/* AARRGGBB */
35static const uint32_t default_fg = 0xffffffff;
36static const uint32_t default_bg = 0xff000000;
37static const uint32_t cursor_fg = 0xff000000;
38static const uint32_t cursor_bg = 0xffffffff;
39
40static const uint32_t color_table[16] = {
41 0xff000000, /* black */
42 0xffcc0000, /* red */
43 0xff4e9a06, /* green */
44 0xffc4a000, /* yellow */
45 0xff3465a4, /* blue */
46 0xff75507b, /* magenta */
47 0xff06989a, /* cyan */
48 0xffd3d7cf, /* white */
49
50 0xff555753, /* bright black */
51 0xffef2929, /* bright red */
52 0xff8ae234, /* bright green */
53 0xfffce94f, /* bright yellow */
54 0xff729fcf, /* bright blue */
55 0xffad7fa8, /* bright magenta */
56 0xff34e2e2, /* bright cyan */
57 0xffffffff, /* bright white */
58};
59
60#endif /* CONFIG_H */
61