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[] = "/share/fonts/terminus/ter-u12n.bdf";
9
10static const int win_width = 70; /* in columns */
11static const int win_height = 25; /* 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 = "/bin/sh"; /* 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 = 0xccccc6;
34static const uint32_t default_bg = 0x1d1d1d;
35static const uint32_t cursor_fg = 0xff000000;
36static const uint32_t cursor_bg = 0xffffffff;
37
38static const uint32_t color_table[16] = {
39 0x1d1d1d, /* black */
40 0x755a5b, /* red */
41 0x68755a, /* green */
42 0x756e5a, /* yellow */
43 0x5b6976, /* blue */
44 0x755b76, /* magenta */
45 0x465457, /* cyan */
46 0xccccc6, /* white */
47
48 0x5a5b5c, /* bright black */
49 0xa37679, /* bright red */
50 0x87a376, /* bright green */
51 0xa39b76, /* bright yellow */
52 0x758ba3, /* bright blue */
53 0x9f76a3, /* bright magenta */
54 0x899ca1, /* bright cyan */
55 0xf8f8f2, /* bright white */
56};
57
58#endif /* CONFIG_H */
59