1 /* See LICENSE file for copyright and license details. */
2 #include "/nyan/xorgproto/current/include/X11/XF86keysym.h"
5 static const unsigned int borderpx
= 4; /* 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 *fonts
[] = { "DejaVu Sans Mono:size=10" };
10 static const char dmenufont
[] = "DejaVu Sans Mono:size=10";
11 static const char col_gray1
[] = "#222222";
12 static const char col_gray2
[] = "#444444";
13 static const char col_gray3
[] = "#bbbbbb";
14 static const char col_gray4
[] = "#eeeeee";
15 static const char col_cyan
[] = "#005577";
16 static const char *colors
[][3] = {
18 [SchemeNorm
] = { col_gray3
, col_gray1
, col_gray2
},
19 [SchemeSel
] = { col_gray4
, col_cyan
, col_cyan
},
23 static const char *tags
[] = { "6", "7", "8", "9", "0" };
25 static const Rule rules
[] = {
27 * WM_CLASS(STRING) = instance, class
28 * WM_NAME(STRING) = title
30 /* class instance title tags mask isfloating monitor */
31 // { "Gimp", NULL, NULL, 0, 1, -1 },
32 // { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
33 { "Steam", NULL
, NULL
, 0, 0, -1 },
34 { "MPlayer", NULL
, NULL
, 0, 1, -1 },
35 { NULL
, NULL
, "Celeste", 0, 1, -1 },
39 static const float mfact
= 0.55; /* factor of master area size [0.05..0.95] */
40 static const int nmaster
= 1; /* number of clients in master area */
41 static const int resizehints
= 1; /* 1 means respect size hints in tiled resizals */
43 static const Layout layouts
[] = {
44 /* symbol arrange function */
45 { "[]=", tile
}, /* first entry is default */
46 { "><>", NULL
}, /* no layout function means floating behavior */
51 #define MODKEY Mod1Mask
52 //#define TAGKEYS(KEY,TAG) \
53 { MODKEY
, KEY
, view
, {.ui
= 1 << TAG
} }, \
54 { MODKEY
|ControlMask
, KEY
, toggleview
, {.ui
= 1 << TAG
} }, \
55 { MODKEY
|ShiftMask
, KEY
, tag
, {.ui
= 1 << TAG
} }, \
56 { MODKEY
|ControlMask
|ShiftMask
, KEY
, toggletag
, {.ui
= 1 << TAG
} },
58 #define TAGKEYS(KEY,TAG) \
59 { MODKEY|ControlMask, KEY, view, {.ui = 1 << TAG} }, \
60 { MODKEY|ControlMask|ShiftMask, KEY, tag, {.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 } }
66 static char dmenumon
[2] = "0"; /* component of dmenucmd, 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 *termcmd
[] = { "/root/bin/dwm_st.sh", NULL
};
69 static const char *linkscmd
[] = { "/root/bin/dwm_links.sh", NULL
};
70 static const char *bgcmd
[] = { "/root/bin/dwm_bg.sh", NULL
};
71 static const char *norepcmd
[] = { "/root/bin/x11keyautorepeat", NULL
};
74 /* modifier key function argument */
75 //{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
76 //{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
77 { 0, XF86XK_Calculator
, spawn
, {.v
= termcmd
} },
78 { 0, XF86XK_HomePage
, spawn
, {.v
= linkscmd
} },
79 { ShiftMask
, XF86XK_HomePage
, spawn
, {.v
= norepcmd
} },
80 { 0, XF86XK_Mail
, spawn
, {.v
= bgcmd
} },
81 { MODKEY
|ControlMask
, XK_b
, togglebar
, {0} },
82 { MODKEY
|ControlMask
, XK_Page_Down
, focusstack
, {.i
= +1 } },
83 { MODKEY
|ControlMask
, XK_Page_Up
, focusstack
, {.i
= -1 } },
84 { MODKEY
|ControlMask
|ShiftMask
, XK_n
, incnmaster
, {.i
= +1 } },
85 { MODKEY
|ControlMask
|ShiftMask
, XK_d
, incnmaster
, {.i
= -1 } },
86 { MODKEY
|ControlMask
|ShiftMask
, XK_h
, setmfact
, {.f
= -0.05} },
87 { MODKEY
|ControlMask
, XK_h
, togglefullscr
, {0} },
88 { MODKEY
|ControlMask
|ShiftMask
, XK_t
, setmfact
, {.f
= +0.05} },
89 { MODKEY
|ControlMask
, XK_Return
, zoom
, {0} },
90 // { MODKEY, XK_Tab, view, {0} },
91 { MODKEY
|ControlMask
|ShiftMask
, XK_c
, killclient
, {0} },
92 { MODKEY
|ControlMask
, XK_t
, setlayout
, {.v
= &layouts
[0]} },
93 { MODKEY
|ControlMask
, XK_f
, setlayout
, {.v
= &layouts
[1]} },
94 { MODKEY
|ControlMask
, XK_m
, setlayout
, {.v
= &layouts
[2]} },
95 // { MODKEY, XK_space, setlayout, {0} },
96 // { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
97 // { MODKEY, XK_0, view, {.ui = ~0 } },
98 // { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
99 //{ MODKEY, XK_comma, focusmon, {.i = -1 } },
100 //{ MODKEY, XK_period, focusmon, {.i = +1 } },
101 //{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
102 //{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
112 // { MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
115 /* button definitions */
116 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
117 static Button buttons
[] = {
118 /* click event mask button function argument */
119 // { ClkLtSymbol, 0, Button1, setlayout, {0} },
120 // { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
121 // { ClkWinTitle, 0, Button2, zoom, {0} },
122 // { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
123 { ClkClientWin
, MODKEY
|ControlMask
, Button1
, movemouse
, {0} },
124 { ClkClientWin
, MODKEY
|ControlMask
, Button2
, togglefloating
, {0} },
125 { ClkClientWin
, MODKEY
|ControlMask
, Button3
, resizemouse
, {0} },
126 // { ClkTagBar, 0, Button1, view, {0} },
127 // { ClkTagBar, 0, Button3, toggleview, {0} },
128 // { ClkTagBar, MODKEY, Button1, tag, {0} },
129 // { ClkTagBar, MODKEY, Button3, toggletag, {0} },