Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-11pba
view config.h @ 9:bc03b37b37ba
move command mode text to the left, next to the layout icon
author | paulo@thepaulopc |
---|---|
date | Wed, 15 Jun 2011 23:27:32 -0700 |
parents | 162accc5d36d |
children | ed4f1bf80e57 |
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 /* first entry is default */ \
44 };
45 #define MASTER 650 /* per thousand */
46 #define NMASTER 1 /* clients in master area */
48 #define COMMANDMODE 1
49 #define INSERTMODE 2
51 /* key definitions */
52 #define MODKEY Mod4Mask
53 #define KEYS \
54 static Key key[] = { \
55 /* modifier key function argument */ \
56 { MODKEY, XK_Escape, setkeymode, { .i = COMMANDMODE } }, \
57 { MODKEY, XK_h, moveresize, "-25x 0y 0w 0h" }, \
58 { MODKEY, XK_l, moveresize, "25x 0y 0w 0h" }, \
59 { MODKEY, XK_j, moveresize, "0x 25y 0w 0h" }, \
60 { MODKEY, XK_k, moveresize, "0x -25y 0w 0h" }, \
61 { MODKEY|ControlMask, XK_h, moveresize, "0X 0y 0w 0h" }, \
62 { MODKEY|ControlMask, XK_l, moveresize, "9000X 0y 0w 0h" }, \
63 { MODKEY|ControlMask, XK_j, moveresize, "0x 9000Y 0w 0h" }, \
64 { MODKEY|ControlMask, XK_k, moveresize, "0x 0Y 0w 0h" }, \
65 { MODKEY|ShiftMask, XK_h, moveresize, "0x 0y -25w 0h" }, \
66 { MODKEY|ShiftMask, XK_l, moveresize, "0x 0y 25w 0h" }, \
67 { MODKEY|ShiftMask, XK_j, moveresize, "0x 0y 0w 25h" }, \
68 { MODKEY|ShiftMask, XK_k, moveresize, "0x 0y 0w -25h" }, \
69 };
71 #define MAX_TASKS 13 /* max number of apps in taskbar */
73 #define CMDKEYS \
74 static Key cmdkeys[] = { \
75 /* modifier keys function argument */ \
76 { 0, XK_Escape, clearcmd, { 0 } }, \
77 { ControlMask, XK_c, clearcmd, { 0 } }, \
78 { MODKEY|ShiftMask, XK_x, killclient, { 0 } }, \
79 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \
80 { 0, XK_i, setkeymode, { .i = INSERTMODE } }, \
81 { 0, XK_o, spawn, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
82 { ShiftMask, XK_o, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh" } }, \
83 { 0, XK_backslash, spawn, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
84 { ShiftMask, XK_backslash, spawn_insert, { .cmd = "/home/paulo/bin/myterm.sh -e /home/paulo/bin/viclip.sh" } }, \
85 { 0, XK_n, pushdown, { 0 } }, \
86 { ShiftMask, XK_n, pushup, { 0 } }, \
87 { 0, XK_j, focusnext, { 0 } }, \
88 { 0, XK_k, focusprev, { 0 } }, \
89 { 0, XK_Return, zoom, { 0 } }, \
90 { ShiftMask, XK_Return, zoom_insert, { 0 } }, \
91 { 0, XK_m, resizemaster, { .i = 15 } }, \
92 { ShiftMask, XK_m, resizemaster, { .i = -15 } }, \
93 { 0, XK_d, incnmaster, { .i = 1 } }, \
94 { ShiftMask, XK_d, incnmaster, { .i = -1 } }, \
95 { 0, XK_v, next_view, { .i = 1 } }, \
96 { ShiftMask, XK_v, next_view, { .i = -1 } }, \
97 { 0, XK_BackSpace, last_view, { 0 } }, \
98 { 0, XK_l, setlayout, { .i = -1 } }, \
99 { ShiftMask, XK_l, setlayout, { .i = -2 } }, \
100 };
102 #define COMMANDS \
103 static Command commands[] = { \
104 /* modifier (4 keys) keysyms (4 keys) function argument */ \
105 { {0, 0, 0, 0}, {XK_grave, XK_v, 0, 0}, view, { .i = -1 } }, \
106 { {0, 0, 0, 0}, {XK_1, XK_v, 0, 0}, view, { .i = 0 } }, \
107 { {0, 0, 0, 0}, {XK_2, XK_v, 0, 0}, view, { .i = 1 } }, \
108 { {0, 0, 0, 0}, {XK_3, XK_v, 0, 0}, view, { .i = 2 } }, \
109 { {0, 0, 0, 0}, {XK_4, XK_v, 0, 0}, view, { .i = 3 } }, \
110 { {0, 0, 0, 0}, {XK_5, XK_v, 0, 0}, view, { .i = 4 } }, \
111 { {0, 0, 0, 0}, {XK_6, XK_v, 0, 0}, view, { .i = 5 } }, \
112 { {0, 0, 0, 0}, {XK_7, XK_v, 0, 0}, view, { .i = 6 } }, \
113 { {0, 0, 0, 0}, {XK_8, XK_v, 0, 0}, view, { .i = 7 } }, \
114 { {0, 0, 0, 0}, {XK_9, XK_v, 0, 0}, view, { .i = 8 } }, \
115 { {0, 0, 0, 0}, {XK_0, XK_v, 0, 0}, view, { .i = 9 } }, \
116 { {0, ShiftMask, 0, 0}, {XK_grave, XK_v, 0, 0}, toggleversatile, { 0 } }, \
117 { {0, ShiftMask, 0, 0}, {XK_1, XK_v, 0, 0}, toggleview, { .i = 0 } }, \
118 { {0, ShiftMask, 0, 0}, {XK_2, XK_v, 0, 0}, toggleview, { .i = 1 } }, \
119 { {0, ShiftMask, 0, 0}, {XK_3, XK_v, 0, 0}, toggleview, { .i = 2 } }, \
120 { {0, ShiftMask, 0, 0}, {XK_4, XK_v, 0, 0}, toggleview, { .i = 3 } }, \
121 { {0, ShiftMask, 0, 0}, {XK_5, XK_v, 0, 0}, toggleview, { .i = 4 } }, \
122 { {0, ShiftMask, 0, 0}, {XK_6, XK_v, 0, 0}, toggleview, { .i = 5 } }, \
123 { {0, ShiftMask, 0, 0}, {XK_7, XK_v, 0, 0}, toggleview, { .i = 6 } }, \
124 { {0, ShiftMask, 0, 0}, {XK_8, XK_v, 0, 0}, toggleview, { .i = 7 } }, \
125 { {0, ShiftMask, 0, 0}, {XK_9, XK_v, 0, 0}, toggleview, { .i = 8 } }, \
126 { {0, ShiftMask, 0, 0}, {XK_0, XK_v, 0, 0}, toggleview, { .i = 9 } }, \
127 { {0, 0, 0, 0}, {XK_1, XK_l, 0, 0}, setlayout, { .i = 0 } }, \
128 { {0, 0, 0, 0}, {XK_2, XK_l, 0, 0}, setlayout, { .i = 1 } }, \
129 { {0, 0, 0, 0}, {XK_3, XK_l, 0, 0}, setlayout, { .i = 2 } }, \
130 { {0, 0, 0, 0}, {XK_4, XK_l, 0, 0}, setlayout, { .i = 3 } }, \
131 { {0, 0, 0, 0}, {XK_5, XK_l, 0, 0}, setlayout, { .i = 4 } }, \
132 { {0, 0, 0, 0}, {XK_6, XK_l, 0, 0}, setlayout, { .i = 5 } }, \
133 { {0, 0, 0, 0}, {XK_7, XK_l, 0, 0}, setlayout, { .i = 6 } }, \
134 { {0, 0, 0, 0}, {XK_grave, XK_t, 0, 0}, tag, { .i = -1 } }, \
135 { {0, 0, 0, 0}, {XK_1, XK_t, 0, 0}, tag, { .i = 0 } }, \
136 { {0, 0, 0, 0}, {XK_2, XK_t, 0, 0}, tag, { .i = 1 } }, \
137 { {0, 0, 0, 0}, {XK_3, XK_t, 0, 0}, tag, { .i = 2 } }, \
138 { {0, 0, 0, 0}, {XK_4, XK_t, 0, 0}, tag, { .i = 3 } }, \
139 { {0, 0, 0, 0}, {XK_5, XK_t, 0, 0}, tag, { .i = 4 } }, \
140 { {0, 0, 0, 0}, {XK_6, XK_t, 0, 0}, tag, { .i = 5 } }, \
141 { {0, 0, 0, 0}, {XK_7, XK_t, 0, 0}, tag, { .i = 6 } }, \
142 { {0, 0, 0, 0}, {XK_8, XK_t, 0, 0}, tag, { .i = 7 } }, \
143 { {0, 0, 0, 0}, {XK_9, XK_t, 0, 0}, tag, { .i = 8 } }, \
144 { {0, 0, 0, 0}, {XK_0, XK_t, 0, 0}, tag, { .i = 9 } }, \
145 { {0, ShiftMask, 0, 0}, {XK_1, XK_t, 0, 0}, toggletag, { .i = 0 } }, \
146 { {0, ShiftMask, 0, 0}, {XK_2, XK_t, 0, 0}, toggletag, { .i = 1 } }, \
147 { {0, ShiftMask, 0, 0}, {XK_3, XK_t, 0, 0}, toggletag, { .i = 2 } }, \
148 { {0, ShiftMask, 0, 0}, {XK_4, XK_t, 0, 0}, toggletag, { .i = 3 } }, \
149 { {0, ShiftMask, 0, 0}, {XK_5, XK_t, 0, 0}, toggletag, { .i = 4 } }, \
150 { {0, ShiftMask, 0, 0}, {XK_6, XK_t, 0, 0}, toggletag, { .i = 5 } }, \
151 { {0, ShiftMask, 0, 0}, {XK_7, XK_t, 0, 0}, toggletag, { .i = 6 } }, \
152 { {0, ShiftMask, 0, 0}, {XK_8, XK_t, 0, 0}, toggletag, { .i = 7 } }, \
153 { {0, ShiftMask, 0, 0}, {XK_9, XK_t, 0, 0}, toggletag, { .i = 8 } }, \
154 { {0, ShiftMask, 0, 0}, {XK_0, XK_t, 0, 0}, toggletag, { .i = 9 } }, \
155 { {0, 0, 0, 0}, {XK_1, XK_s, 0, 0}, tag_n_view, { .i = 0 } }, \
156 { {0, 0, 0, 0}, {XK_2, XK_s, 0, 0}, tag_n_view, { .i = 1 } }, \
157 { {0, 0, 0, 0}, {XK_3, XK_s, 0, 0}, tag_n_view, { .i = 2 } }, \
158 { {0, 0, 0, 0}, {XK_4, XK_s, 0, 0}, tag_n_view, { .i = 3 } }, \
159 { {0, 0, 0, 0}, {XK_5, XK_s, 0, 0}, tag_n_view, { .i = 4 } }, \
160 { {0, 0, 0, 0}, {XK_6, XK_s, 0, 0}, tag_n_view, { .i = 5 } }, \
161 { {0, 0, 0, 0}, {XK_7, XK_s, 0, 0}, tag_n_view, { .i = 6 } }, \
162 { {0, 0, 0, 0}, {XK_8, XK_s, 0, 0}, tag_n_view, { .i = 7 } }, \
163 { {0, 0, 0, 0}, {XK_9, XK_s, 0, 0}, tag_n_view, { .i = 8 } }, \
164 { {0, 0, 0, 0}, {XK_0, XK_s, 0, 0}, tag_n_view, { .i = 9 } }, \
165 };