config.def.h (10268B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 1; /* border pixel of windows */ 5 static const unsigned int snap = 32; /* snap pixel */ 6 static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ 7 static const unsigned int gappih = 10; /* horiz inner gap between windows */ 8 static const unsigned int gappiv = 10; /* vert inner gap between windows */ 9 static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ 10 static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ 11 static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ 12 static const int showbar = 1; /* 0 means no bar */ 13 static const int topbar = 1; /* 0 means bottom bar */ 14 static const char *fonts[] = { "monospace:size=10" }; 15 static const char dmenufont[] = "monospace:size=10"; 16 static const char col_gray1[] = "#222222"; 17 static const char col_gray2[] = "#444444"; 18 static const char col_gray3[] = "#bbbbbb"; 19 static const char col_gray4[] = "#eeeeee"; 20 static const char col_cyan[] = "#005577"; 21 static const char col1[] = "#ffffff"; 22 static const char col2[] = "#ffffff"; 23 static const char col3[] = "#ffffff"; 24 static const char col4[] = "#ffffff"; 25 static const char col5[] = "#ffffff"; 26 static const char col6[] = "#ffffff"; 27 static const char col7[] = "#ffffff"; 28 static const char col8[] = "#ffffff"; 29 static const char col9[] = "#ffffff"; 30 static const char col10[] = "#ffffff"; 31 static const char col11[] = "#ffffff"; 32 static const char col12[] = "#ffffff"; 33 static const char *colors[][3] = { 34 /* fg bg border */ 35 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 36 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 37 [SchemeBar] = { col_cyan, col_cyan, col_cyan }, // Dirty workaround lol 38 [SchemeCol1] = { col1, col_gray1, col_gray2 }, 39 [SchemeCol2] = { col2, col_gray1, col_gray2 }, 40 [SchemeCol3] = { col3, col_gray1, col_gray2 }, 41 [SchemeCol4] = { col4, col_gray1, col_gray2 }, 42 [SchemeCol5] = { col5, col_gray1, col_gray2 }, 43 [SchemeCol6] = { col6, col_gray1, col_gray2 }, 44 [SchemeCol7] = { col7, col_gray1, col_gray2 }, 45 [SchemeCol8] = { col8, col_gray1, col_gray2 }, 46 [SchemeCol9] = { col8, col_gray1, col_gray2 }, 47 [SchemeCol10] = { col10, col_gray1, col_gray2 }, 48 [SchemeCol11] = { col11, col_gray1, col_gray2 }, 49 [SchemeCol12] = { col12, col_gray1, col_gray2 }, 50 }; 51 52 /* tagging */ 53 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 54 55 static const Rule rules[] = { 56 /* xprop(1): 57 * WM_CLASS(STRING) = instance, class 58 * WM_NAME(STRING) = title 59 */ 60 /* class instance title tags mask isfloating isterminal noswallow monitor */ 61 { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, 62 { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, 63 { "St", NULL, NULL, 0, 0, 1, 0, -1 }, 64 { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ 65 }; 66 67 /* layout(s) */ 68 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 69 static const int nmaster = 1; /* number of clients in master area */ 70 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 71 72 static const Layout layouts[] = { 73 /* symbol arrange function */ 74 { "[]=", tile }, /* first entry is default */ 75 { "><>", NULL }, /* no layout function means floating behavior */ 76 { "[M]", monocle }, 77 }; 78 79 /* key definitions */ 80 #define MODKEY Mod1Mask 81 #define TAGKEYS(KEY,TAG) \ 82 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 83 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 84 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 85 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 86 87 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 88 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 89 90 /* commands */ 91 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 92 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 93 static const char *termcmd[] = { "st", NULL }; 94 static const char scratchpadname[] = "scratchpad"; 95 static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; 96 97 static Key keys[] = { 98 /* modifier key function argument */ 99 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 100 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 101 { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } }, 102 { MODKEY, XK_b, togglebar, {0} }, 103 { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } }, 104 { MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } }, 105 { MODKEY, XK_j, focusstack, {.i = +1 } }, 106 { MODKEY, XK_k, focusstack, {.i = -1 } }, 107 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 108 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 109 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 110 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 111 { MODKEY|Mod4Mask, XK_h, incrgaps, {.i = +1 } }, 112 { MODKEY|Mod4Mask, XK_l, incrgaps, {.i = -1 } }, 113 { MODKEY|Mod4Mask|ShiftMask, XK_h, incrogaps, {.i = +1 } }, 114 { MODKEY|Mod4Mask|ShiftMask, XK_l, incrogaps, {.i = -1 } }, 115 { MODKEY|Mod4Mask|ControlMask, XK_h, incrigaps, {.i = +1 } }, 116 { MODKEY|Mod4Mask|ControlMask, XK_l, incrigaps, {.i = -1 } }, 117 { MODKEY|Mod4Mask, XK_0, togglegaps, {0} }, 118 { MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} }, 119 { MODKEY, XK_y, incrihgaps, {.i = +1 } }, 120 { MODKEY, XK_o, incrihgaps, {.i = -1 } }, 121 { MODKEY|ControlMask, XK_y, incrivgaps, {.i = +1 } }, 122 { MODKEY|ControlMask, XK_o, incrivgaps, {.i = -1 } }, 123 { MODKEY|Mod4Mask, XK_y, incrohgaps, {.i = +1 } }, 124 { MODKEY|Mod4Mask, XK_o, incrohgaps, {.i = -1 } }, 125 { MODKEY|ShiftMask, XK_y, incrovgaps, {.i = +1 } }, 126 { MODKEY|ShiftMask, XK_o, incrovgaps, {.i = -1 } }, 127 { MODKEY, XK_Return, zoom, {0} }, 128 { MODKEY, XK_Tab, view, {0} }, 129 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 130 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 131 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 132 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 133 { MODKEY, XK_space, setlayout, {0} }, 134 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 135 { MODKEY|ShiftMask, XK_f, togglefullscr, {0} }, 136 { MODKEY, XK_0, view, {.ui = ~0 } }, 137 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 138 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 139 { MODKEY, XK_period, focusmon, {.i = +1 } }, 140 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 141 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 142 TAGKEYS( XK_1, 0) 143 TAGKEYS( XK_2, 1) 144 TAGKEYS( XK_3, 2) 145 TAGKEYS( XK_4, 3) 146 TAGKEYS( XK_5, 4) 147 TAGKEYS( XK_6, 5) 148 TAGKEYS( XK_7, 6) 149 TAGKEYS( XK_8, 7) 150 TAGKEYS( XK_9, 8) 151 { MODKEY|ShiftMask, XK_q, quit, {0} }, 152 { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, 153 }; 154 155 /* button definitions */ 156 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 157 static Button buttons[] = { 158 /* click event mask button function argument */ 159 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 160 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 161 { ClkWinTitle, 0, Button2, zoom, {0} }, 162 { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} }, 163 { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} }, 164 { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} }, 165 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 166 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 167 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 168 { ClkTagBar, 0, Button1, view, {0} }, 169 { ClkTagBar, 0, Button3, toggleview, {0} }, 170 { ClkTagBar, MODKEY, Button1, tag, {0} }, 171 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 172 }; 173