Skip to content
Newer
Older
100644 138 lines (129 sloc) 4.97 KB
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
1 /* curses attributes for the currently focused window */
abcc6fd @martanne Document some curses constants.
martanne authored Jan 6, 2008
2 /* valid curses attributes are listed below they can be ORed
3 *
4 * A_NORMAL Normal display (no highlight)
5 * A_STANDOUT Best highlighting mode of the terminal.
6 * A_UNDERLINE Underlining
7 * A_REVERSE Reverse video
8 * A_BLINK Blinking
9 * A_DIM Half bright
10 * A_BOLD Extra bright or bold
11 * A_PROTECT Protected mode
12 * A_INVIS Invisible or blank mode
13 * COLOR(fg,bg) Color where fg and bg are one of:
14 *
15 * COLOR_BLACK
16 * COLOR_RED
17 * COLOR_GREEN
18 * COLOR_YELLOW
19 * COLOR_BLUE
20 * COLOR_MAGENTA
21 * COLOR_CYAN
22 * COLOR_WHITE
23 */
f1a2e95 @martanne Switch from librote to madtty.
martanne authored Dec 29, 2007
24 #define ATTR_SELECTED COLOR(COLOR_RED,COLOR_BLACK)
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
25 /* curses attributes for normal (not selected) windows */
e23e7c1 @martanne Add optional status bar (-s command line switch) which reads from a n…
martanne authored Dec 26, 2007
26 #define ATTR_NORMAL A_NORMAL
0fbc690 @martanne Make the statusbar position configurable.
martanne authored Jan 2, 2008
27 /* status bar (command line option -s) position */
28 #define BARPOS BarTop /* BarBot, BarOff */
e23e7c1 @martanne Add optional status bar (-s command line switch) which reads from a n…
martanne authored Dec 26, 2007
29 /* curses attributes for the status bar */
f1a2e95 @martanne Switch from librote to madtty.
martanne authored Dec 29, 2007
30 #define BAR_ATTR COLOR(COLOR_RED,COLOR_BLACK)
3dfd5c2 @martanne Remove trailing whitespaces (sed 's/[ \t]*$//').
martanne authored Jan 2, 2008
31 /* true if the statusbar text should be right aligned,
e23e7c1 @martanne Add optional status bar (-s command line switch) which reads from a n…
martanne authored Dec 26, 2007
32 * set to false if you prefer it left aligned */
33 #define BAR_ALIGN_RIGHT true
54788bf @martanne Display the window number in the title bar for use with MOD-n.
martanne authored Dec 12, 2007
34 /* separator between window title and window number */
35 #define SEPARATOR " | "
3dfd5c2 @martanne Remove trailing whitespaces (sed 's/[ \t]*$//').
martanne authored Jan 2, 2008
36 /* printf format string for the window title, first %s
54788bf @martanne Display the window number in the title bar for use with MOD-n.
martanne authored Dec 12, 2007
37 * is replaced by the title, second %s is replaced by
38 * the SEPARATOR, %d stands for the window number */
39 #define TITLE "[%s%s#%d]"
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
40 /* master width factor [0.1 .. 0.9] */
3dfd5c2 @martanne Remove trailing whitespaces (sed 's/[ \t]*$//').
martanne authored Jan 2, 2008
41 #define MWFACT 0.5
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
42
43 #include "tile.c"
44 #include "grid.c"
45 #include "bstack.c"
8ed88d9 @martanne Add new fullscreen layout.
martanne authored Dec 22, 2007
46 #include "fullscreen.c"
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
47
48 Layout layouts[] = {
49 { "[]=", tile },
50 { "+++", grid },
51 { "TTT", bstack },
8ed88d9 @martanne Add new fullscreen layout.
martanne authored Dec 22, 2007
52 { "[ ]", fullscreen },
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
53 };
54
22fd9c0 @martanne Change default modifier to CTRL+G.
martanne authored Dec 11, 2007
55 #define MOD CTRL('g')
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
56
05237a6 @martanne Make it possible to pass multiple arguments to the command functions.
martanne authored Jan 8, 2008
57 /* you can at most specifiy MAX_ARGS (2) number of arguments */
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
58 Key keys[] = {
12086b5 @martanne Implement autoquit feature.
martanne authored Jan 24, 2008
59 { MOD, 'c', { create, { NULL } } },
2cab337 @martanne Refactor argument handling - again.
martanne authored Jan 9, 2008
60 { MOD, 'x', { killclient, { NULL } } },
61 { MOD, 'j', { focusnext, { NULL } } },
62 { MOD, 'u', { focusnextnm, { NULL } } },
63 { MOD, 'i', { focusprevnm, { NULL } } },
64 { MOD, 'k', { focusprev, { NULL } } },
65 { MOD, 't', { setlayout, { "[]=" } } },
66 { MOD, 'g', { setlayout, { "+++" } } },
67 { MOD, 'b', { setlayout, { "TTT" } } },
cde020e @martanne Change some keybindings.
martanne authored Jan 11, 2008
68 { MOD, 'm', { setlayout, { "[ ]" } } },
2cab337 @martanne Refactor argument handling - again.
martanne authored Jan 9, 2008
69 { MOD, ' ', { setlayout, { NULL } } },
70 { MOD, 'h', { setmwfact, { "-0.05" } } },
71 { MOD, 'l', { setmwfact, { "+0.05" } } },
cde020e @martanne Change some keybindings.
martanne authored Jan 11, 2008
72 { MOD, '.', { toggleminimize, { NULL } } },
2cab337 @martanne Refactor argument handling - again.
martanne authored Jan 9, 2008
73 { MOD, 's', { togglebar, { NULL } } },
cde020e @martanne Change some keybindings.
martanne authored Jan 11, 2008
74 { MOD, '\n',{ zoom , { NULL } } },
2cab337 @martanne Refactor argument handling - again.
martanne authored Jan 9, 2008
75 { MOD, '1', { focusn, { "1" } } },
76 { MOD, '2', { focusn, { "2" } } },
77 { MOD, '3', { focusn, { "3" } } },
78 { MOD, '4', { focusn, { "4" } } },
79 { MOD, '5', { focusn, { "5" } } },
80 { MOD, '6', { focusn, { "6" } } },
81 { MOD, '7', { focusn, { "7" } } },
82 { MOD, '8', { focusn, { "8" } } },
83 { MOD, '9', { focusn, { "9" } } },
84 { MOD, 'q', { quit, { NULL } } },
85 { MOD, 'G', { escapekey, { NULL } } },
aef5a3a @martanne Add redraw command.
martanne authored Jan 9, 2008
86 { MOD, 'L', { redraw, { NULL } } },
aec1335 @martanne Implement screen locking based on a patch by Claudio M. Alessi
martanne authored Jun 9, 2008
87 { MOD, 'X', { lock, { NULL } } },
3da652c @martanne Initial commit
martanne authored Dec 7, 2007
88 };
64decfc @martanne Initial mouse support.
martanne authored Jan 1, 2008
89
abcc6fd @martanne Document some curses constants.
martanne authored Jan 6, 2008
90 /* possible values for the mouse buttons are listed below:
91 *
92 * BUTTON1_PRESSED mouse button 1 down
93 * BUTTON1_RELEASED mouse button 1 up
94 * BUTTON1_CLICKED mouse button 1 clicked
95 * BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked
96 * BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked
97 * BUTTON2_PRESSED mouse button 2 down
98 * BUTTON2_RELEASED mouse button 2 up
99 * BUTTON2_CLICKED mouse button 2 clicked
100 * BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked
101 * BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked
102 * BUTTON3_PRESSED mouse button 3 down
103 * BUTTON3_RELEASED mouse button 3 up
104 * BUTTON3_CLICKED mouse button 3 clicked
105 * BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked
106 * BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked
107 * BUTTON4_PRESSED mouse button 4 down
108 * BUTTON4_RELEASED mouse button 4 up
109 * BUTTON4_CLICKED mouse button 4 clicked
110 * BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked
111 * BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked
112 * BUTTON_SHIFT shift was down during button state change
113 * BUTTON_CTRL control was down during button state change
114 * BUTTON_ALT alt was down during button state change
115 * ALL_MOUSE_EVENTS report all button state changes
116 * REPORT_MOUSE_POSITION report mouse movement
117 */
118
487a92c @martanne Split mouse support into separate file
martanne authored Jun 14, 2008
119 #ifdef CONFIG_MOUSE
64decfc @martanne Initial mouse support.
martanne authored Jan 1, 2008
120 Button buttons[] = {
4f250ca @martanne Fix layering violation in mouse_fullscreen.
martanne authored Jan 11, 2008
121 { BUTTON1_CLICKED, { mouse_focus, { NULL } } },
122 { BUTTON1_DOUBLE_CLICKED, { mouse_fullscreen, { "[ ]" } } },
cde020e @martanne Change some keybindings.
martanne authored Jan 11, 2008
123 { BUTTON2_CLICKED, { mouse_zoom, { NULL } } },
124 { BUTTON3_CLICKED, { mouse_minimize, { NULL } } },
64decfc @martanne Initial mouse support.
martanne authored Jan 1, 2008
125 };
487a92c @martanne Split mouse support into separate file
martanne authored Jun 14, 2008
126 #endif /* CONFIG_MOUSE */
ae173fd @martanne Implement a way to launch arbitrary applications on dvtm startup.
martanne authored Jan 11, 2008
127
daf2b78 @martanne Implement a command mechanism over a named pipe
martanne authored Jun 14, 2008
128 #ifdef CONFIG_CMDFIFO
129 Cmd commands[] = {
130 { "create", { create, { NULL } } },
131 };
132 #endif /* CONFIG_CMDFIFO */
133
ae173fd @martanne Implement a way to launch arbitrary applications on dvtm startup.
martanne authored Jan 11, 2008
134 /* gets executed when dvtm is started */
135 Action actions[] = {
12086b5 @martanne Implement autoquit feature.
martanne authored Jan 24, 2008
136 { create, { NULL } },
ae173fd @martanne Implement a way to launch arbitrary applications on dvtm startup.
martanne authored Jan 11, 2008
137 };
Something went wrong with that request. Please try again.