master hovercats/oakiss / pkg / cterm / config.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[] = "/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;
14
15static const int   pad_x = 8;
16static const int   pad_y = 8;
17
18static const char* const shell = "/bin/sh"; /* 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 = 0xccccc6;
36static const uint32_t default_bg = 0x1d1d1d;
37static const uint32_t cursor_fg  = 0xff000000;
38static const uint32_t cursor_bg  = 0xffffffff;
39
40static const uint32_t color_table[16] = {
41	0x1d1d1d, /* black */
42	0x755a5b, /* red */
43	0x68755a, /* green */
44	0x756e5a, /* yellow */
45	0x5b6976, /* blue */
46	0x755b76, /* magenta */
47	0x465457, /* cyan */
48	0xccccc6, /* white */
49
50	0x5a5b5c, /* bright black */
51	0xa37679, /* bright red */
52	0x87a376, /* bright green */
53	0xa39b76, /* bright yellow */
54	0x758ba3, /* bright blue */
55	0x9f76a3, /* bright magenta */
56	0x899ca1, /* bright cyan */
57	0xf8f8f2, /* bright white */
58};
59
60#endif /* CONFIG_H */
61