Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-11pba
view config.h @ 6:0968b3739b8d
apply keymodes patch
author | paulo@thepaulopc |
---|---|
date | Sun, 12 Jun 2011 14:32:54 -0700 |
parents | a54de16f8277 |
children | 162accc5d36d |
line source
1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
2 * See LICENSE file for license details.
3 */
5 /* appearance */
6 #define BORDERPX 1
7 #define FONT "6x9"
8 #define NORMBORDERCOLOR "#aaaaaa"
9 #define NORMBGCOLOR "#222222"
10 #define NORMFGCOLOR "#eeeeee"
11 #define SELBORDERCOLOR "#ff0000"
12 #define SELBGCOLOR "#222222"
13 #define SELFGCOLOR "#00ff00"
14 #define TOPBAR True /* False */
15 #define TASKBAR True /* False */
16 #define CLICK_TO_FOCUS True /* False */
18 /* behavior */
19 #define SNAP 10 /* pixel */
20 #define TAGS \
21 const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", NULL };
22 /* Query class:instance:title for regex matching info with following command:
23 * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
24 #define RULES \
25 static Rule rule[] = { \
26 /* class:instance:title regex tags regex isversatile */ \
27 { "Gimp", NULL, False }, \
28 { "MPlayer", NULL, False }, \
29 { "Acroread", NULL, False }, \
30 };
32 /* layout(s) */
33 #define LAYOUTS \
34 static Layout layout[] = { \
35 /* symbol function */ \
36 { " ", versatile }, \
37 { "@", spiral }, \
38 { "&", spiral_h }, \
39 { "X", monocle }, \
40 { "#", grid }, \
41 { "U", bstack }, \
42 { "!", tile }, \
43 /*{ "\\", cascade },*/ \
44 /* first entry is default */ \
45 };
46 #define MASTER 650 /* per thousand */
47 #define NMASTER 1 /* clients in master area */
49 #define COMMANDMODE 1
50 #define INSERTMODE 2
52 /* key definitions */
53 #define MODKEY Mod4Mask
54 #define KEYS \
55 static Key key[] = { \
56 /* modifier key function argument */ \
57 { MODKEY, XK_Escape, setkeymode, { .i = COMMANDMODE } }, \
58 { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \
59 { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \
60 { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \
61 { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \
62 { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \
63 { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \
64 { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \
65 { MODKEY|ControlMask, XK_k, moveresize, "0x 0Y 0w 0h" }, \
66 { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \
67 { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \
68 { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \
69 { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \
70 };
72 #define MAX_TASKS 13 /* max number of apps in taskbar */
74 #define CMDKEYS \
75 static Key cmdkeys[] = { \
76 /* modifier keys function argument */ \
77 { 0, XK_Escape, clearcmd, { 0 } }, \
78 { ControlMask, XK_c, clearcmd, { 0 } }, \
79 { MODKEY|ShiftMask, XK_x, killclient, { 0 } }, \
80 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \
81 { 0, XK_i, setkeymode, { .i = INSERTMODE } }, \
82 { 0, XK_o, spawn, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
83 { ShiftMask, XK_o, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
84 { 0, XK_backslash, spawn, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
85 { ShiftMask, XK_backslash, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
86 { 0, XK_n, pushdown, { 0 } }, \
87 { ShiftMask, XK_n, pushup, { 0 } }, \
88 { 0, XK_j, focusnext, { 0 } }, \
89 { 0, XK_k, focusprev, { 0 } }, \
90 { 0, XK_Return, zoom, { 0 } }, \
91 { ShiftMask, XK_Return, zoom_insert, { 0 } }, \
92 { 0, XK_m, resizemaster, { .i = 15 } }, \
93 { ShiftMask, XK_m, resizemaster, { .i = -15 } }, \
94 { 0, XK_d, incnmaster, { .i = 1 } }, \
95 { ShiftMask, XK_d, incnmaster, { .i = -1 } }, \
96 { 0, XK_v, next_view, { .i = 1 } }, \
97 { ShiftMask, XK_v, next_view, { .i = -1 } }, \
98 { 0, XK_BackSpace, last_view, { 0 } }, \
99 { 0, XK_l, setlayout, { .i = -1 } }, \
100 { ShiftMask, XK_l, setlayout, { .i = -2 } }, \
101 };
103 #define COMMANDS \
104 static Command commands[] = { \
105 /* modifier (4 keys) keysyms (4 keys) function argument */ \
106 { {0, 0, 0, 0}, {XK_grave, XK_v, 0, 0}, view, { .i = -1 } }, \
107 { {0, 0, 0, 0}, {XK_1, XK_v, 0, 0}, view, { .i = 0 } }, \
108 { {0, 0, 0, 0}, {XK_2, XK_v, 0, 0}, view, { .i = 1 } }, \
109 { {0, 0, 0, 0}, {XK_3, XK_v, 0, 0}, view, { .i = 2 } }, \
110 { {0, 0, 0, 0}, {XK_4, XK_v, 0, 0}, view, { .i = 3 } }, \
111 { {0, 0, 0, 0}, {XK_5, XK_v, 0, 0}, view, { .i = 4 } }, \
112 { {0, 0, 0, 0}, {XK_6, XK_v, 0, 0}, view, { .i = 5 } }, \
113 { {0, 0, 0, 0}, {XK_7, XK_v, 0, 0}, view, { .i = 6 } }, \
114 { {0, 0, 0, 0}, {XK_8, XK_v, 0, 0}, view, { .i = 7 } }, \
115 { {0, 0, 0, 0}, {XK_9, XK_v, 0, 0}, view, { .i = 8 } }, \
116 { {0, 0, 0, 0}, {XK_0, XK_v, 0, 0}, view, { .i = 9 } }, \
117 { {0, ShiftMask, 0, 0}, {XK_grave, XK_v, 0, 0}, toggleversatile, { 0 } }, \
118 { {0, ShiftMask, 0, 0}, {XK_1, XK_v, 0, 0}, toggleview, { .i = 0 } }, \
119 { {0, ShiftMask, 0, 0}, {XK_2, XK_v, 0, 0}, toggleview, { .i = 1 } }, \
120 { {0, ShiftMask, 0, 0}, {XK_3, XK_v, 0, 0}, toggleview, { .i = 2 } }, \
121 { {0, ShiftMask, 0, 0}, {XK_4, XK_v, 0, 0}, toggleview, { .i = 3 } }, \
122 { {0, ShiftMask, 0, 0}, {XK_5, XK_v, 0, 0}, toggleview, { .i = 4 } }, \
123 { {0, ShiftMask, 0, 0}, {XK_6, XK_v, 0, 0}, toggleview, { .i = 5 } }, \
124 { {0, ShiftMask, 0, 0}, {XK_7, XK_v, 0, 0}, toggleview, { .i = 6 } }, \
125 { {0, ShiftMask, 0, 0}, {XK_8, XK_v, 0, 0}, toggleview, { .i = 7 } }, \
126 { {0, ShiftMask, 0, 0}, {XK_9, XK_v, 0, 0}, toggleview, { .i = 8 } }, \
127 { {0, ShiftMask, 0, 0}, {XK_0, XK_v, 0, 0}, toggleview, { .i = 9 } }, \
128 { {0, 0, 0, 0}, {XK_1, XK_l, 0, 0}, setlayout, { .i = 0 } }, \
129 { {0, 0, 0, 0}, {XK_2, XK_l, 0, 0}, setlayout, { .i = 1 } }, \
130 { {0, 0, 0, 0}, {XK_3, XK_l, 0, 0}, setlayout, { .i = 2 } }, \
131 { {0, 0, 0, 0}, {XK_4, XK_l, 0, 0}, setlayout, { .i = 3 } }, \
132 { {0, 0, 0, 0}, {XK_5, XK_l, 0, 0}, setlayout, { .i = 4 } }, \
133 { {0, 0, 0, 0}, {XK_6, XK_l, 0, 0}, setlayout, { .i = 5 } }, \
134 { {0, 0, 0, 0}, {XK_7, XK_l, 0, 0}, setlayout, { .i = 6 } }, \
135 { {0, 0, 0, 0}, {XK_grave, XK_t, 0, 0}, tag, { .i = -1 } }, \
136 { {0, 0, 0, 0}, {XK_1, XK_t, 0, 0}, tag, { .i = 0 } }, \
137 { {0, 0, 0, 0}, {XK_2, XK_t, 0, 0}, tag, { .i = 1 } }, \
138 { {0, 0, 0, 0}, {XK_3, XK_t, 0, 0}, tag, { .i = 2 } }, \
139 { {0, 0, 0, 0}, {XK_4, XK_t, 0, 0}, tag, { .i = 3 } }, \
140 { {0, 0, 0, 0}, {XK_5, XK_t, 0, 0}, tag, { .i = 4 } }, \
141 { {0, 0, 0, 0}, {XK_6, XK_t, 0, 0}, tag, { .i = 5 } }, \
142 { {0, 0, 0, 0}, {XK_7, XK_t, 0, 0}, tag, { .i = 6 } }, \
143 { {0, 0, 0, 0}, {XK_8, XK_t, 0, 0}, tag, { .i = 7 } }, \
144 { {0, 0, 0, 0}, {XK_9, XK_t, 0, 0}, tag, { .i = 8 } }, \
145 { {0, 0, 0, 0}, {XK_0, XK_t, 0, 0}, tag, { .i = 9 } }, \
146 { {0, ShiftMask, 0, 0}, {XK_1, XK_t, 0, 0}, toggletag, { .i = 0 } }, \
147 { {0, ShiftMask, 0, 0}, {XK_2, XK_t, 0, 0}, toggletag, { .i = 1 } }, \
148 { {0, ShiftMask, 0, 0}, {XK_3, XK_t, 0, 0}, toggletag, { .i = 2 } }, \
149 { {0, ShiftMask, 0, 0}, {XK_4, XK_t, 0, 0}, toggletag, { .i = 3 } }, \
150 { {0, ShiftMask, 0, 0}, {XK_5, XK_t, 0, 0}, toggletag, { .i = 4 } }, \
151 { {0, ShiftMask, 0, 0}, {XK_6, XK_t, 0, 0}, toggletag, { .i = 5 } }, \
152 { {0, ShiftMask, 0, 0}, {XK_7, XK_t, 0, 0}, toggletag, { .i = 6 } }, \
153 { {0, ShiftMask, 0, 0}, {XK_8, XK_t, 0, 0}, toggletag, { .i = 7 } }, \
154 { {0, ShiftMask, 0, 0}, {XK_9, XK_t, 0, 0}, toggletag, { .i = 8 } }, \
155 { {0, ShiftMask, 0, 0}, {XK_0, XK_t, 0, 0}, toggletag, { .i = 9 } }, \
156 };