add new layouts
[azarus-dwm.git] / config.h
blobb9dd80057ab8f1bdcfc5310f4986bcab2d091817
1 #include "X11/XF86keysym.h"
2 #include "fibonacci.c"
3 /* See LICENSE file for copyright and license details. */
4 /* appearance */
5 static const unsigned int borderpx = 1; /* border pixel of windows */
6 static const unsigned int snap = 32; /* snap pixel */
7 static const int showbar = 1; /* 0 means no bar */
8 static const int topbar = 1; /* 0 means bottom bar */
9 static const char normbgcolor[] = "#222222";
10 static const char normfgcolor[] = "#bbbbbb";
11 static const char selbordercolor[] = "#0c0b13";
12 static const char selbgcolor[] = "#0c0b13";
13 static const char selfgcolor[] = "#eeeeee";
14 static unsigned int baralpha = 0xa0;
15 static unsigned int borderalpha = OPAQUE;
16 static const char normbordercolor[] = "#444444";
17 static const char *fonts[] = { "Dina:size=10" };
18 static const char dmenufont[] = "Dina:size=10";
19 static const char col_gray1[] = "#222222";
20 static const char col_gray2[] = "#444444";
21 static const char col_gray3[] = "#bbbbbb";
22 static const char col_gray4[] = "#eeeeee";
23 static const char col_cyan[] = "#0c0b13";
24 //static const char *colors[][3] = {
25 // /* fg bg border */
26 // [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
27 // [SchemeSel] = { col_gray4, col_cyan, col_cyan },
28 //};
29 static const unsigned int gappx = 6; /* gap pixel between windows */
30 /* tagging */
31 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
32 static const Rule rules[] = {
33 /* xprop(1):
34 * WM_CLASS(STRING) = instance, class
35 * WM_NAME(STRING) = title */
36 /* class instance title tags mask isfloating monitor */
37 /*{ "Gimp", NULL, NULL, 0, 1, -1 },*/
38 /* { "Firefox", NULL, NULL, 1 << 8, 0, -1 },*/
39 { "Pinentry", NULL, NULL, 0, 1, -1 },
41 /* layout(s) */
42 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
43 static const int nmaster = 1; /* number of clients in master area */
44 static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
45 static const Layout layouts[] = {
46 /* symbol arrange function */
47 { "[]=", tile }, /* first entry is default */
48 { "><>", NULL }, /* no layout function means floating behavior */
49 { "[M]", monocle },
50 { "[\\]", dwindle },
51 { "[/]", spiral },
54 /* key definitions */
55 #define MODKEY Mod4Mask
56 #define TAGKEYS(KEY,TAG) \
57 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
58 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
59 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
60 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
62 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
63 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
65 /* commands */
66 static char dmenumon[2] = "0"; /* component of dmenu, manipulated in spawn() */
67 static const char *dmenucmd[] = {"dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
68 static const char *passmenucmd[] = {"passmenu", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
69 static const char *term[] = {"st", NULL };
70 static const char *brow[] = {"firefox", NULL };
71 static const char *play[] = {"mpc", "play", NULL };
72 static const char *vold[] = {"amixer", "-q", "set", "Master", "5%-", "unmute", NULL};
73 static const char *volu[] = {"amixer", "-q", "set", "Master", "5%+", "unmute", NULL};
74 static const char *mute[] = {"amixer", "-q", "set", "Master", "toggle", NULL};
75 static const char *stop[] = {"mpc", "stop", NULL};
76 static const char *next[] = {"mpc", "next", NULL};
77 static const char *prev[] = {"mpc", "prev", NULL};
78 static const char *togg[] = {"mpc", "toggle", NULL};
79 static const char *lock[] = {"slock", NULL};
80 static const char *lokk[] = {"slock", "&&", "zzz", NULL};
82 static Key keys[] = {
83 /* modifier key function argument */
84 { MODKEY, XK_p, spawn, {.v = dmenucmd } },
85 { MODKEY|ShiftMask, XK_p, spawn, {.v = passmenucmd } },
86 { MODKEY|ShiftMask, XK_b, spawn, {.v = brow } },
87 { MODKEY|ShiftMask, XK_Return, spawn, {.v = term } },
88 { MODKEY|ShiftMask, XK_x, spawn, {.v = lock } },
89 { MODKEY|ShiftMask, XK_y, spawn, {.v = lokk } },
90 { 0, XF86XK_AudioLowerVolume, spawn, {.v = vold } },
91 { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volu } },
92 { 0, XF86XK_AudioMute, spawn, {.v = mute } },
93 { 0, XF86XK_AudioNext, spawn, {.v = next } },
94 { 0, XF86XK_AudioPrev, spawn, {.v = prev } },
95 { 0, XF86XK_AudioStop, spawn, {.v = stop } },
96 { 0, XF86XK_AudioPlay, spawn, {.v = togg } },
97 { MODKEY, XK_b, togglebar, {0} },
98 { MODKEY, XK_j, focusstack, {.i = +1 } },
99 { MODKEY, XK_k, focusstack, {.i = -1 } },
100 { MODKEY, XK_i, incnmaster, {.i = +1 } },
101 { MODKEY, XK_d, incnmaster, {.i = -1 } },
102 { MODKEY, XK_h, setmfact, {.f = -0.05} },
103 { MODKEY, XK_l, setmfact, {.f = +0.05} },
104 { MODKEY, XK_Return, zoom, {0} },
105 { MODKEY, XK_Tab, view, {0} },
106 { MODKEY|ShiftMask, XK_c, killclient, {0} },
107 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
108 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
109 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
110 { MODKEY, XK_q, setlayout, {.v = &layouts[3]} },
111 { MODKEY, XK_w, setlayout, {.v = &layouts[4]} },
112 { MODKEY, XK_space, setlayout, {0} },
113 { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
114 { MODKEY, XK_0, view, {.ui = ~0 } },
115 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
116 { MODKEY, XK_comma, focusmon, {.i = -1 } },
117 { MODKEY, XK_period, focusmon, {.i = +1 } },
118 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
119 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
120 TAGKEYS( XK_1, 0)
121 TAGKEYS( XK_2, 1)
122 TAGKEYS( XK_3, 2)
123 TAGKEYS( XK_4, 3)
124 TAGKEYS( XK_5, 4)
125 TAGKEYS( XK_6, 5)
126 TAGKEYS( XK_7, 6)
127 TAGKEYS( XK_8, 7)
128 TAGKEYS( XK_9, 8)
129 { MODKEY|ShiftMask, XK_q, quit, {0} },
132 /* button definitions */
133 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
134 static Button buttons[] = {
135 /* click event mask button function argument */
136 { ClkLtSymbol, 0, Button1, setlayout, {0} },
137 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
138 { ClkWinTitle, 0, Button2, zoom, {0} },
139 { ClkStatusText, 0, Button2, spawn, {.v = term } },
140 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
141 { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
142 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
143 { ClkTagBar, 0, Button1, view, {0} },
144 { ClkTagBar, 0, Button3, toggleview, {0} },
145 { ClkTagBar, MODKEY, Button1, tag, {0} },
146 { ClkTagBar, MODKEY, Button3, toggletag, {0} },