Allow direct access to search functionality
[dvtm.git] / config.h
blob5dc678244503d25e21e9526b0045323020b47a1a
1 /* valid curses attributes are listed below they can be ORed
3 * A_NORMAL Normal display (no highlight)
4 * A_STANDOUT Best highlighting mode of the terminal.
5 * A_UNDERLINE Underlining
6 * A_REVERSE Reverse video
7 * A_BLINK Blinking
8 * A_DIM Half bright
9 * A_BOLD Extra bright or bold
10 * A_PROTECT Protected mode
11 * A_INVIS Invisible or blank mode
13 #define BLUE (COLORS==256 ? 68 : COLOR_BLUE)
14 /* curses attributes for the currently focused window */
15 #define SELECTED_ATTR COLOR(BLUE, -1) | A_NORMAL
16 /* curses attributes for normal (not selected) windows */
17 #define NORMAL_ATTR COLOR(-1, -1) | A_NORMAL
18 /* curses attributes for the status bar */
19 #define BAR_ATTR COLOR(BLUE, -1) | A_NORMAL
20 /* status bar (command line option -s) position */
21 #define BAR_POS BAR_TOP /* BAR_BOTTOM, BAR_OFF */
22 /* determines whether the statusbar text should be right or left aligned */
23 #define BAR_ALIGN ALIGN_RIGHT
24 /* separator between window title and window number */
25 #define SEPARATOR " | "
26 /* printf format string for the window title, first %s
27 * is replaced by the title, second %s is replaced by
28 * the SEPARATOR, %d stands for the window number */
29 #define TITLE "[%s%s#%d]"
30 /* master width factor [0.1 .. 0.9] */
31 #define MFACT 0.5
32 /* scroll back buffer size in lines */
33 #define SCROLL_HISTORY 500
35 #include "tile.c"
36 #include "grid.c"
37 #include "bstack.c"
38 #include "fullscreen.c"
40 /* by default the first layout entry is used */
41 Layout layouts[] = {
42 { "[]=", tile },
43 { "+++", grid },
44 { "TTT", bstack },
45 { "[ ]", fullscreen },
48 #define MOD CTRL('g')
50 /* you can at most specifiy MAX_ARGS (2) number of arguments */
51 Key keys[] = {
52 { MOD, 'c', { create, { NULL } } },
53 { MOD, 'x', { killclient, { NULL } } },
54 { MOD, 'j', { focusnext, { NULL } } },
55 { MOD, 'u', { focusnextnm, { NULL } } },
56 { MOD, 'i', { focusprevnm, { NULL } } },
57 { MOD, 'k', { focusprev, { NULL } } },
58 { MOD, 't', { setlayout, { "[]=" } } },
59 { MOD, 'g', { setlayout, { "+++" } } },
60 { MOD, 'b', { setlayout, { "TTT" } } },
61 { MOD, 'm', { setlayout, { "[ ]" } } },
62 { MOD, ' ', { setlayout, { NULL } } },
63 { MOD, 'h', { setmfact, { "-0.05" } } },
64 { MOD, 'l', { setmfact, { "+0.05" } } },
65 { MOD, '.', { toggleminimize, { NULL } } },
66 { MOD, 's', { togglebar, { NULL } } },
67 { MOD, 'M', { togglemouse, { NULL } } },
68 { MOD, '\n', { zoom , { NULL } } },
69 { MOD, '1', { focusn, { "1" } } },
70 { MOD, '2', { focusn, { "2" } } },
71 { MOD, '3', { focusn, { "3" } } },
72 { MOD, '4', { focusn, { "4" } } },
73 { MOD, '5', { focusn, { "5" } } },
74 { MOD, '6', { focusn, { "6" } } },
75 { MOD, '7', { focusn, { "7" } } },
76 { MOD, '8', { focusn, { "8" } } },
77 { MOD, '9', { focusn, { "9" } } },
78 { MOD, 'q', { quit, { NULL } } },
79 { MOD, 'G', { escapekey, { NULL } } },
80 { MOD, 'a', { togglerunall, { NULL } } },
81 { MOD, 'r', { redraw, { NULL } } },
82 { MOD, 'X', { lock, { NULL } } },
83 { MOD, 'B', { togglebell, { NULL } } },
84 { MOD, 'v', { copymode, { NULL } } },
85 { MOD, '/', { copymode, { "/" } } },
86 { MOD, '?', { copymode, { "?" } } },
87 { MOD, 'p', { paste, { NULL } } },
88 { MOD, KEY_PPAGE, { scrollback, { "-1" } } },
89 { MOD, KEY_NPAGE, { scrollback, { "1" } } },
90 { MOD, KEY_F(1), { create, { "man dvtm", "dvtm help" } } },
93 static const ColorRule colorrules[] = {
94 { "", A_NORMAL, -1, -1 }, /* default */
95 #if 0
96 /* title attrs fgcolor bgcolor */
97 { "ssh", A_NORMAL, COLOR_BLACK, 224 },
98 #endif
101 /* possible values for the mouse buttons are listed below:
103 * BUTTON1_PRESSED mouse button 1 down
104 * BUTTON1_RELEASED mouse button 1 up
105 * BUTTON1_CLICKED mouse button 1 clicked
106 * BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked
107 * BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked
108 * BUTTON2_PRESSED mouse button 2 down
109 * BUTTON2_RELEASED mouse button 2 up
110 * BUTTON2_CLICKED mouse button 2 clicked
111 * BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked
112 * BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked
113 * BUTTON3_PRESSED mouse button 3 down
114 * BUTTON3_RELEASED mouse button 3 up
115 * BUTTON3_CLICKED mouse button 3 clicked
116 * BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked
117 * BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked
118 * BUTTON4_PRESSED mouse button 4 down
119 * BUTTON4_RELEASED mouse button 4 up
120 * BUTTON4_CLICKED mouse button 4 clicked
121 * BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked
122 * BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked
123 * BUTTON_SHIFT shift was down during button state change
124 * BUTTON_CTRL control was down during button state change
125 * BUTTON_ALT alt was down during button state change
126 * ALL_MOUSE_EVENTS report all button state changes
127 * REPORT_MOUSE_POSITION report mouse movement
130 #ifdef NCURSES_MOUSE_VERSION
131 # define CONFIG_MOUSE /* compile in mouse support if we build against ncurses */
132 #endif
134 #define ENABLE_MOUSE true /* whether to enable mouse events by default */
136 #ifdef CONFIG_MOUSE
137 Button buttons[] = {
138 { BUTTON1_CLICKED, { mouse_focus, { NULL } } },
139 { BUTTON1_DOUBLE_CLICKED, { mouse_fullscreen, { "[ ]" } } },
140 { BUTTON2_CLICKED, { mouse_zoom, { NULL } } },
141 { BUTTON3_CLICKED, { mouse_minimize, { NULL } } },
143 #endif /* CONFIG_MOUSE */
145 Cmd commands[] = {
146 { "create", { create, { NULL } } },
149 /* gets executed when dvtm is started */
150 Action actions[] = {
151 { create, { NULL } },