master
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;
14static const int padding = 8;
15
16static const char* const shell = NULL; /* NULL uses $SHELL */
17static const char term_name[] = "vt100";
18
19#define CTRL_DOWN (win->key_syms[MAUS_KEY_CONTROL_L] || win->key_syms[MAUS_KEY_CONTROL_R])
20#define SHIFT_DOWN (win->key_syms[MAUS_KEY_SHIFT_L] || win->key_syms[MAUS_KEY_SHIFT_R])
21
22#define BIND_COPY (CTRL_DOWN && SHIFT_DOWN && \
23 (ev->key.key == MAUS_KEY_C || ev->key.key == MAUS_KEY_C_UP))
24
25#define BIND_PASTE (CTRL_DOWN && SHIFT_DOWN && \
26 (ev->key.key == MAUS_KEY_V || ev->key.key == MAUS_KEY_V_UP))
27
28#define BIND_RELOAD_FONT (win->key_syms[MAUS_KEY_ALT_R] && \
29 (ev->key.key == MAUS_KEY_R || \
30 ev->key.key == MAUS_KEY_R_UP))
31
32/* AARRGGBB */
33static const uint32_t default_fg = 0xffffffff;
34static const uint32_t default_bg = 0xff000000;
35
36static const uint32_t color_table[16] = {
37 0xff000000, /* black */
38 0xffcc0000, /* red */
39 0xff4e9a06, /* green */
40 0xffc4a000, /* yellow */
41 0xff3465a4, /* blue */
42 0xff75507b, /* magenta */
43 0xff06989a, /* cyan */
44 0xffd3d7cf, /* white */
45
46 0xff555753, /* bright black */
47 0xffef2929, /* bright red */
48 0xff8ae234, /* bright green */
49 0xfffce94f, /* bright yellow */
50 0xff729fcf, /* bright blue */
51 0xffad7fa8, /* bright magenta */
52 0xff34e2e2, /* bright cyan */
53 0xffffffff, /* bright white */
54};
55
56#endif /* CONFIG_H */
57