mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
config.def.h
1 /* Old versions of ncurses don't support A_ITALIC.
2 * Define this to disable it if the situation isn't automatically detected.
3 #define NO_ITALICS
4 */
5
6 /* mtm advertises support for italic text by default. If the host
7 * terminal does not support italics, this will fail. Define this
8 * to map italic text to reverse text.
9 #define REVERSE_ITALICS
10 */
11
12 /* mtm by default will advertise itself as a "screen-bce" terminal.
13 * This is the terminal type advertised by such programs as
14 * screen(1) and tmux(1) and is a widely-supported terminal type.
15 * mtm supports emulating the "screen-bce" terminal very well, and this
16 * is a reasonable default.
17 *
18 * However, you can change the default terminal that mtm will
19 * advertise itself as. There's the "mtm" terminal type that is
20 * recommended for use if you know it will be available in all the
21 * environments in which mtm will be used. It advertises a few
22 * features that mtm has that the default "screen-bce" terminfo doesn't
23 * list, meaning that terminfo-aware programs may get a small
24 * speed boost.
25 */
26 #define DEFAULT_TERMINAL "screen-bce"
27 #define DEFAULT_256_COLOR_TERMINAL "screen-256color-bce"
28
29 /* Sets how long (in milliseconds) mtm should wait for an escape sequence
30 * to follow after the escape key is pressed before sending it on to
31 * the focused virtual terminal.
32 */
33 #define ESCAPE_TIME 500
34
35 /* mtm supports a scrollback buffer, allowing users to scroll back
36 * through the output history of a virtual terminal. The SCROLLBACK
37 * knob controls how many lines are saved (minus however many are
38 * currently displayed). 1000 seems like a good number.
39 *
40 * Note that every virtual terminal is sized to be at least this big,
41 * so setting a huge number here might waste memory. It is recommended
42 * that this number be at least as large as the largest terminal you
43 * expect to use is tall.
44 */
45 #define SCROLLBACK 1000
46
47 /* The default command prefix key, when modified by cntrl.
48 * This can be changed at runtime using the '-c' flag.
49 */
50 #define COMMAND_KEY 'g'
51
52 /* The change focus keys. */
53 #define MOVE_UP CODE(KEY_UP)
54 #define MOVE_DOWN CODE(KEY_DOWN)
55 #define MOVE_RIGHT CODE(KEY_RIGHT)
56 #define MOVE_LEFT CODE(KEY_LEFT)
57 #define MOVE_OTHER KEY(L'o')
58
59 /* The split terminal keys. */
60 #define HSPLIT KEY(L'h')
61 #define VSPLIT KEY(L'v')
62
63 /* The delete terminal key. */
64 #define DELETE_NODE KEY(L'w')
65
66 /* does nothing, specifically */
67 #define BAILOUT KEY(L'c')
68
69 /* clears the scrollback and everything */
70 #define NUKE KEY(L'k')
71
72 /* The force redraw key. */
73 #define REDRAW KEY(L'l')
74
75 /* The scrollback keys. */
76 #define SCROLLUP CODE(KEY_PPAGE)
77 #define SCROLLDOWN CODE(KEY_NPAGE)
78 #define RECENTER CODE(KEY_END)
79
80 /* The path for the wide-character curses library. */
81 #ifndef NCURSESW_INCLUDE_H
82 #if defined(__APPLE__) || !defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
83 #define NCURSESW_INCLUDE_H <curses.h>
84 #else
85 #define NCURSESW_INCLUDE_H <ncursesw/curses.h>
86 #endif
87 #endif
88 #include NCURSESW_INCLUDE_H
89
90 /* Includes needed to make forkpty(3) work. */
91 #ifndef FORKPTY_INCLUDE_H
92 #if defined(__APPLE__) || defined(__OpenBSD__)
93 #define FORKPTY_INCLUDE_H <util.h>
94 #elif defined(__FreeBSD__)
95 #define FORKPTY_INCLUDE_H <libutil.h>
96 #else
97 #define FORKPTY_INCLUDE_H <pty.h>
98 #endif
99 #endif
100 #include FORKPTY_INCLUDE_H
101
102 /* You probably don't need to alter these much, but if you do,
103 * here is where you can define alternate character sets.
104 *
105 * Note that if your system's wide-character implementation
106 * maps directly to Unicode, the preferred Unicode characters
107 * will be used automatically if your system declares such
108 * support. If it doesn't declare it, define WCHAR_IS_UNICODE to
109 * force Unicode to be used.
110 */
111 #define MAXMAP 0x7f
112 static wchar_t CSET_US[MAXMAP]; /* "USASCII"...really just the null table */
113
114 #if defined(__STDC_ISO_10646__) || defined(WCHAR_IS_UNICODE)
115 static wchar_t CSET_UK[MAXMAP] ={ /* "United Kingdom"...really just Pound Sterling */
116 [L'#'] = 0x00a3
117 };
118
119 static wchar_t CSET_GRAPH[MAXMAP] ={ /* Graphics Set One */
120 [L'-'] = 0x2191,
121 [L'}'] = 0x00a3,
122 [L'~'] = 0x00b7,
123 [L'{'] = 0x03c0,
124 [L','] = 0x2190,
125 [L'+'] = 0x2192,
126 [L'.'] = 0x2193,
127 [L'|'] = 0x2260,
128 [L'>'] = 0x2265,
129 [L'`'] = 0x25c6,
130 [L'a'] = 0x2592,
131 [L'b'] = 0x2409,
132 [L'c'] = 0x240c,
133 [L'd'] = 0x240d,
134 [L'e'] = 0x240a,
135 [L'f'] = 0x00b0,
136 [L'g'] = 0x00b1,
137 [L'h'] = 0x2592,
138 [L'i'] = 0x2603,
139 [L'j'] = 0x2518,
140 [L'k'] = 0x2510,
141 [L'l'] = 0x250c,
142 [L'm'] = 0x2514,
143 [L'n'] = 0x253c,
144 [L'o'] = 0x23ba,
145 [L'p'] = 0x23bb,
146 [L'q'] = 0x2500,
147 [L'r'] = 0x23bc,
148 [L's'] = 0x23bd,
149 [L't'] = 0x251c,
150 [L'u'] = 0x2524,
151 [L'v'] = 0x2534,
152 [L'w'] = 0x252c,
153 [L'x'] = 0x2502,
154 [L'y'] = 0x2264,
155 [L'z'] = 0x2265,
156 [L'_'] = L' ',
157 [L'0'] = 0x25ae
158 };
159
160 #else /* wchar_t doesn't map to Unicode... */
161
162 static wchar_t CSET_UK[] ={ /* "United Kingdom"...really just Pound Sterling */
163 [L'#'] = L'&'
164 };
165
166 static wchar_t CSET_GRAPH[] ={ /* Graphics Set One */
167 [L'-'] = '^',
168 [L'}'] = L'&',
169 [L'~'] = L'o',
170 [L'{'] = L'p',
171 [L','] = L'<',
172 [L'+'] = L'>',
173 [L'.'] = L'v',
174 [L'|'] = L'!',
175 [L'>'] = L'>',
176 [L'`'] = L'+',
177 [L'a'] = L':',
178 [L'b'] = L' ',
179 [L'c'] = L' ',
180 [L'd'] = L' ',
181 [L'e'] = L' ',
182 [L'f'] = L'\'',
183 [L'g'] = L'#',
184 [L'h'] = L'#',
185 [L'i'] = L'i',
186 [L'j'] = L'+',
187 [L'k'] = L'+',
188 [L'l'] = L'+',
189 [L'm'] = L'+',
190 [L'n'] = '+',
191 [L'o'] = L'-',
192 [L'p'] = L'-',
193 [L'q'] = L'-',
194 [L'r'] = L'-',
195 [L's'] = L'_',
196 [L't'] = L'+',
197 [L'u'] = L'+',
198 [L'v'] = L'+',
199 [L'w'] = L'+',
200 [L'x'] = L'|',
201 [L'y'] = L'<',
202 [L'z'] = L'>',
203 [L'_'] = L' ',
204 [L'0'] = L'#',
205 };
206
207 #endif
208
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.