config.def.h (8466B)
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 showbar = 1; /* 0 means no bar */ 7 static const int topbar = 1; /* 0 means bottom bar */ 8 static const char *fonts[] = { "monospace:size=10" }; 9 static const char dmenufont[] = "monospace:size=10"; 10 static const char col_gray1[] = "#222222"; 11 static const char col_gray2[] = "#444444"; 12 static const char col_gray3[] = "#bbbbbb"; 13 static const char col_gray4[] = "#eeeeee"; 14 static const char col_cyan[] = "#005577"; 15 static const char normmarkcolor[] = "#775500"; /*border color for marked client*/ 16 static const char selmarkcolor[] = "#775577"; /*border color for marked client on focus*/ 17 18 static const char *colors[][4] = { 19 /* fg bg border mark */ 20 [SchemeNorm] = { col_gray3, col_gray1, col_gray2, normmarkcolor }, 21 [SchemeSel] = { col_gray4, col_cyan, col_cyan, selmarkcolor }, 22 }; 23 24 /* tagging */ 25 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 26 27 static const Rule rules[] = { 28 /* xprop(1): 29 * WM_CLASS(STRING) = instance, class 30 * WM_NAME(STRING) = title 31 */ 32 /* class instance title tags mask isfloating monitor */ 33 { "Gimp", NULL, NULL, 0, 1, -1 }, 34 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 35 }; 36 37 /* layout(s) */ 38 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 39 static const int nmaster = 1; /* number of clients in master area */ 40 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 41 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 42 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ 43 static const int pixelwidth = 566; /* Master width in pixel* layouts */ 44 static const int pixelheight = 846; /* Master height in pixel* layouts */ 45 static const int pixelwidthmin = 8; /* Minimal column width in pixel* layouts */ 46 static const int pixelheightmin = 8; /* Minimal row height in pixel* layouts */ 47 48 static const Layout layouts[] = { 49 /* symbol arrange function */ 50 { "[]=", tile }, /* first entry is default */ 51 { "><>", NULL }, /* no layout function means floating behavior */ 52 { "[M]", monocle }, 53 { "[D]", deck }, 54 { "Pr", pixelrow }, 55 { "Pc", pixeldeckcol }, 56 }; 57 58 /* key definitions */ 59 #define MODKEY Mod1Mask 60 #define TAGKEYS(KEY,TAG) \ 61 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 62 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 63 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 64 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 65 66 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 67 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 68 69 /* commands */ 70 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 71 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 72 static const char *termcmd[] = { "st", NULL }; 73 static const char scratchpadname[] = "scratchpad"; 74 static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; 75 76 #include "focusurgent.c" 77 #include "movestack.c" 78 static const Key keys[] = { 79 /* modifier key function argument */ 80 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 81 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 82 { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } }, 83 { MODKEY, XK_b, togglebar, {0} }, 84 { MODKEY, XK_j, focusstack, {.i = +1 } }, 85 { MODKEY, XK_k, focusstack, {.i = -1 } }, 86 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 87 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 88 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 89 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 90 { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, 91 { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, 92 { MODKEY, XK_Return, zoom, {0} }, 93 { MODKEY, XK_Tab, view, {0} }, 94 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 95 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 96 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 97 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 98 { MODKEY, XK_r, setlayout, {.v = &layouts[3]} }, 99 { MODKEY|ControlMask, XK_p, setlayout, {.v = &layouts[4]} }, 100 { MODKEY|ControlMask|ShiftMask, XK_p, setlayout, {.v = &layouts[5]} }, 101 { MODKEY, XK_space, setlayout, {0} }, 102 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 103 { MODKEY, XK_0, view, {.ui = ~0 } }, 104 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 105 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 106 { MODKEY, XK_period, focusmon, {.i = +1 } }, 107 { MODKEY|ControlMask, XK_comma, swapmon, {.i = -1 } }, 108 { MODKEY|ControlMask, XK_period, swapmon, {.i = +1 } }, 109 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 110 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 111 { MODKEY|ControlMask|ShiftMask, XK_comma, swapmonvisible, {.i = -1 } }, 112 { MODKEY|ControlMask|ShiftMask, XK_period, swapmonvisible, {.i = +1 } }, 113 TAGKEYS( XK_1, 0) 114 TAGKEYS( XK_2, 1) 115 TAGKEYS( XK_3, 2) 116 TAGKEYS( XK_4, 3) 117 TAGKEYS( XK_5, 4) 118 TAGKEYS( XK_6, 5) 119 TAGKEYS( XK_7, 6) 120 TAGKEYS( XK_8, 7) 121 TAGKEYS( XK_9, 8) 122 { MODKEY|ShiftMask, XK_q, quit, {0} }, 123 { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, 124 { MODKEY, XK_u, focusurgent, {0} }, 125 { MODKEY, XK_semicolon, togglemark, {0} }, 126 { MODKEY, XK_o, swapfocus, {0} }, 127 { MODKEY, XK_u, swapclient, {0} }, 128 }; 129 130 /* button definitions */ 131 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 132 static const Button buttons[] = { 133 /* click event mask button function argument */ 134 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 135 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 136 { ClkWinTitle, 0, Button1, focustitle, {0} }, 137 { ClkWinTitle, 0, Button2, zoom, {0} }, 138 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 139 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 140 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 141 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 142 { ClkTagBar, 0, Button1, view, {0} }, 143 { ClkTagBar, 0, Button3, toggleview, {0} }, 144 { ClkTagBar, MODKEY, Button1, tag, {0} }, 145 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 146 }; 147