0 /* See LICENSE file for copyright and license details. */
1
2 /* appearance */
3 static const unsigned int borderpx = 4; /* border pixel of windows */
4 static const unsigned int snap = 32; /* snap pixel */
5 static const int showbar = 1; /* 0 means no bar */
6 static const int topbar = 1; /* 0 means bottom bar */
7 static const char *fonts[] = { "monospace:size=10" };
8 static const char dmenufont[] = "monospace:size=10";
9 static const char col_gray1[] = "#222222";
10 static const char col_gray2[] = "#444444";
11 static const char col_gray3[] = "#bbbbbb";
12 static const char col_gray4[] = "#eeeeee";
13 static const char col_cyan[] = "#005577";
14 static const char *colors[][3] = {
15 /* fg bg border */
16 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
17 [SchemeSel] = { col_gray4, col_cyan, col_cyan },
18 };
19
20 /* layout(s) */
21 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
22 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
23
24 /* maximum screen refresh rate */
25 #define FPS 60
26
27 /* adjust for aspect limits, disabled by default */
28 #define ADJUST_ASPECT_RATIO 0
29
30 /* WM name */
31 #define WM "fdwm"
32
33 /* maximum number of workspaces */
34 #define WORKSPACES 3
35
36 /* monitor with the top bar */
37 #define PRIMARY_SCREEN 0
38
39 /* key definitions */
40 #define MODKEY Mod1Mask
41
42 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
43 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
44
45 /* commands */
46 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
47 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
48 static const char *termcmd[] = { "st", NULL };
49 static const char *j4dmenucmd[] = { "j4-dmenu-desktop", NULL };
50 static const char *slockcmd[] = { "slock", NULL };
51 static const char *dkeecmd[] = { "dkee_signal", NULL };
52
53 static const Key keys[] = {
54 /* modifier key function argument */
55 { MODKEY, XK_p, spawn, {.v = j4dmenucmd } },
56 { MODKEY|ShiftMask, XK_p, spawn, {.v = dkeecmd } },
57 { MODKEY, XK_Return, spawn, {.v = termcmd } },
58 { MODKEY|ShiftMask, XK_Insert, spawn, {.v = slockcmd } },
59 { MODKEY, XK_b, togglebar, {0} },
60 { MODKEY|ShiftMask, XK_c, killclient, {0} },
61 { MODKEY|ShiftMask, XK_Delete, quit, {0} },
62 { MODKEY, XK_Tab, focusnext, {0} },
63 { MODKEY|ShiftMask, XK_Tab, focusprev, {0} },
64 { MODKEY, XK_space, maximize, {0} },
65 { MODKEY|ControlMask, XK_Return, minimize, {0} },
66 { MODKEY|ControlMask, XK_space, reveal, {0} },
67 { MODKEY|ShiftMask, XK_Left, nextscreen, {0} },
68 { MODKEY|ShiftMask, XK_Right, prevscreen, {0} },
69 { MODKEY, XK_Page_Up, nextworkspace, {.i = 1} },
70 { MODKEY, XK_Page_Down, nextworkspace, {.i = -1} },
71 { MODKEY|ShiftMask, XK_Page_Up, moveworkspace, {.i = 1} },
72 { MODKEY|ShiftMask, XK_Page_Down, moveworkspace, {.i = -1} },
73 { MODKEY, XK_h, movex, {.i = -10} },
74 { MODKEY, XK_l, movex, {.i = 10} },
75 { MODKEY, XK_k, movey, {.i = -10} },
76 { MODKEY, XK_j, movey, {.i = 10} },
77 { MODKEY|ShiftMask, XK_h, movex, {.i = -40} },
78 { MODKEY|ShiftMask, XK_l, movex, {.i = 40} },
79 { MODKEY|ShiftMask, XK_k, movey, {.i = -40} },
80 { MODKEY|ShiftMask, XK_j, movey, {.i = 40} },
81 { MODKEY|ControlMask, XK_h, resizex, {.i = -10} },
82 { MODKEY|ControlMask, XK_l, resizex, {.i = 10} },
83 { MODKEY|ControlMask, XK_k, resizey, {.i = -10} },
84 { MODKEY|ControlMask, XK_j, resizey, {.i = 10} },
85 { MODKEY|ShiftMask|ControlMask, XK_h, resizex, {.i = -40} },
86 { MODKEY|ShiftMask|ControlMask, XK_l, resizex, {.i = 40} },
87 { MODKEY|ShiftMask|ControlMask, XK_k, resizey, {.i = -40} },
88 { MODKEY|ShiftMask|ControlMask, XK_j, resizey, {.i = 40} },
89 };
90
91 /* button definitions */
92 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
93 static const Button buttons[] = {
94 /* click event mask button function argument */
95 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
96 { ClkClientWin, MODKEY, Button1, movemouse, {0} },
97 { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
98 };
99
100