7 #define NORMBGCOLOR "#cccccc" |
7 #define NORMBGCOLOR "#cccccc" |
8 #define NORMFGCOLOR "#000000" |
8 #define NORMFGCOLOR "#000000" |
9 #define SELBORDERCOLOR "#0066ff" |
9 #define SELBORDERCOLOR "#0066ff" |
10 #define SELBGCOLOR "#0066ff" |
10 #define SELBGCOLOR "#0066ff" |
11 #define SELFGCOLOR "#ffffff" |
11 #define SELFGCOLOR "#ffffff" |
12 |
|
13 /* bar position */ |
|
14 #define BX 0 |
|
15 #define BY 0 |
|
16 #define BW 1280 |
|
17 |
|
18 /* window area, including floating windows */ |
|
19 #define WX 0 |
|
20 #define WY bh |
|
21 #define WW sw |
|
22 #define WH sh - bh |
|
23 |
|
24 /* master area */ |
|
25 #define MX WX |
|
26 #define MY bh |
|
27 #define MW 1280 |
|
28 #define MH 800 - bh |
|
29 |
|
30 /* tile area, might be on a different screen */ |
|
31 #define TX 1280 |
|
32 #define TY 0 |
|
33 #define TW 1680 |
|
34 #define TH 1050 |
|
35 |
|
36 /* monocle area, might be restricted to a specific screen */ |
|
37 #define MOX MX |
|
38 #define MOY MY |
|
39 #define MOW MW |
|
40 #define MOH MH |
|
41 |
12 |
42 /* tagging */ |
13 /* tagging */ |
43 const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
14 const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
44 |
15 |
45 Rule rules[] = { |
16 Rule rules[] = { |
54 #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ |
25 #define RESIZEHINTS True /* False - respect size hints in tiled resizals */ |
55 #define SNAP 32 /* snap pixel */ |
26 #define SNAP 32 /* snap pixel */ |
56 |
27 |
57 Layout layouts[] = { |
28 Layout layouts[] = { |
58 /* symbol function isfloating */ |
29 /* symbol function isfloating */ |
59 { "[]|", tileh, False }, /* first entry is default */ |
30 { "[]=", tilev, False }, /* first entry is default */ |
60 { "[]=", tilev, False }, |
31 { "[]|", tileh, False }, |
61 { "><>", floating, True }, |
32 { "><>", floating, True }, |
62 { "[M]", monocle, True }, |
33 { "[M]", monocle, True }, |
63 }; |
34 }; |
|
35 |
|
36 void |
|
37 setanselmgeoms(void) { |
|
38 |
|
39 /* screen dimensions */ |
|
40 sx = 0; |
|
41 sy = 0; |
|
42 sw = DisplayWidth(dpy, screen); |
|
43 sh = DisplayHeight(dpy, screen); |
|
44 |
|
45 /* bar position */ |
|
46 bx = sx; |
|
47 by = sy; |
|
48 bw = 1280; |
|
49 bh = dc.font.height + 2; |
|
50 |
|
51 /* window area */ |
|
52 wx = sx; |
|
53 wy = sy + bh; |
|
54 ww = sw; |
|
55 wh = sh - bh; |
|
56 |
|
57 /* master area */ |
|
58 mx = wx; |
|
59 my = wy; |
|
60 mw = 1280; |
|
61 mh = 800; |
|
62 |
|
63 /* tile area */ |
|
64 tx = 1280; |
|
65 ty = 0; |
|
66 tw = ww - 1280; |
|
67 th = wh; |
|
68 |
|
69 /* monocle area */ |
|
70 mox = mx; |
|
71 moy = my; |
|
72 mow = mw; |
|
73 moh = mh; |
|
74 |
|
75 if(dc.drawable != 0) |
|
76 XFreePixmap(dpy, dc.drawable); |
|
77 dc.drawable = XCreatePixmap(dpy, root, bw, bh, DefaultDepth(dpy, screen)); |
|
78 XMoveResizeWindow(dpy, barwin, bx, by, bw, bh); |
|
79 } |
|
80 |
|
81 void |
|
82 anselmgeoms(const char *arg) { |
|
83 setgeoms = setanselmgeoms; |
|
84 arrange(); |
|
85 } |
|
86 |
|
87 void |
|
88 defgeoms(const char *arg) { |
|
89 setgeoms = setdefaultgeoms; |
|
90 arrange(); |
|
91 } |
64 |
92 |
65 /* key definitions */ |
93 /* key definitions */ |
66 #define MODKEY Mod1Mask |
94 #define MODKEY Mod1Mask |
67 Key keys[] = { |
95 Key keys[] = { |
68 /* modifier key function argument */ |
96 /* modifier key function argument */ |
69 #if ANSELM_OFFICE |
|
70 { MODKEY, XK_p, spawn, |
97 { MODKEY, XK_p, spawn, |
71 "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"' -x 0 -y 0 -w 1280" }, |
98 "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"' -x 0 -y 0 -w 1280" }, |
72 #else |
|
73 { MODKEY, XK_p, spawn, |
|
74 "exec dmenu_run -fn '"FONT"' -nb '"NORMBGCOLOR"' -nf '"NORMFGCOLOR"' -sb '"SELBGCOLOR"' -sf '"SELFGCOLOR"'" }, |
|
75 #endif |
|
76 { MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" }, |
99 { MODKEY|ShiftMask, XK_Return, spawn, "exec uxterm" }, |
|
100 { MODKEY, XK_a, anselmgeoms, NULL }, |
|
101 { MODKEY, XK_d, defgeoms, NULL }, |
77 { MODKEY, XK_j, focusnext, NULL }, |
102 { MODKEY, XK_j, focusnext, NULL }, |
78 { MODKEY, XK_k, focusprev, NULL }, |
103 { MODKEY, XK_k, focusprev, NULL }, |
79 { MODKEY, XK_r, reapply, NULL }, |
104 { MODKEY, XK_r, reapply, NULL }, |
80 { MODKEY, XK_Return, zoom, NULL }, |
105 { MODKEY, XK_Return, zoom, NULL }, |
81 { MODKEY, XK_Tab, viewprevtag, NULL }, |
106 { MODKEY, XK_Tab, viewprevtag, NULL }, |