config.h (7098B)
1 /* See LICENSE file for copyright and license details. */ 2 3 /* appearance */ 4 static const unsigned int borderpx = 0; /* 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 int showbar = 1; /* 0 means no bar */ 8 static const int topbar = 1; /* 0 means bottom bar */ 9 static const char *fonts[] = { "Liberation Mono:size=10" }; 10 static const char dmenufont[] = { "Liberation Mono:size=10" }; 11 static const char col_gray1[] = "#272822"; 12 static const char col_gray2[] = "#444444"; 13 static const char col_gray3[] = "#d0d0d0"; 14 static const char col_gray4[] = "#FFFFFF"; 15 static const char col_cyan[] = "#383A3E"; 16 static const char *colors[][3] = { 17 /* fg bg border */ 18 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 19 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 20 [SchemeStatus] = { col_gray3, col_gray1, "#000000" }, // Statusbar right {text,background,not used but cannot be empty} 21 [SchemeTagsSel] = { col_gray4, col_cyan, "#000000" }, // Tagbar left selected {text,background,not used but cannot be empty} 22 [SchemeTagsNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar left unselected {text,background,not used but cannot be empty} 23 [SchemeInfoSel] = { col_gray3, col_gray1, "#000000" }, // infobar middle selected {text,background,not used but cannot be empty} 24 [SchemeInfoNorm] = { col_gray3, col_gray1, "#000000" }, // infobar middle unselected {text,background,not used but cannot be empty} 25 }; 26 27 /* tagging */ 28 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 29 30 static const Rule rules[] = { 31 /* xprop(1): 32 * WM_CLASS(STRING) = instance, class 33 * WM_NAME(STRING) = title 34 */ 35 /* class instance title tags mask isfloating isterminal noswallow monitor */ 36 { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 }, 37 { "Tor", NULL, NULL, 1 << 8, 1, 0, -1, -1 }, 38 { "St", NULL, NULL, 0, 0, 1, 0, -1 }, 39 { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */ 40 }; 41 42 /* layout(s) */ 43 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 44 static const int nmaster = 1; /* number of clients in master area */ 45 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 46 47 #include "gaplessgrid.c" 48 static const Layout layouts[] = { 49 /* symbol arrange function */ 50 { "=|=", gaplessgrid }, /* first entry is default */ 51 { "[M]", monocle }, 52 { "><>", NULL }, /* no layout function means floating behavior */ 53 /* { "[]=", tile }, */ 54 }; 55 56 /* key definitions */ 57 #define MODKEY Mod1Mask 58 #define TAGKEYS(KEY,TAG) \ 59 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 60 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 61 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 62 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 63 64 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 65 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 66 67 /* commands */ 68 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 69 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 70 71 #include "shiftview.c" 72 #include "movestack.c" 73 static Key keys[] = { 74 /* modifier key function argument */ 75 { MODKEY, XK_j, focusstack, {.i = +1} }, 76 { MODKEY, XK_k, focusstack, {.i = -1} }, 77 { MODKEY|ShiftMask, XK_j, movestack, {.i = +1} }, 78 { MODKEY|ShiftMask, XK_k, movestack, {.i = -1} }, 79 { MODKEY, XK_f, shiftview, {.i = -1} }, 80 { MODKEY, XK_semicolon, shiftview, {.i = +1} }, 81 { MODKEY, XK_Tab, view, {0 } }, 82 { MODKEY, XK_q, killclient, {0 } }, 83 /* { MODKEY, XK_y, setlayout, {.v = &layouts[0]} }, */ 84 /* { MODKEY, XK_m, setlayout, {.v = &layouts[1]} }, */ 85 { MODKEY, XK_y, setlayout, {0} }, 86 { MODKEY, XK_space, zoom, {0} }, 87 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 88 { MODKEY, XK_0, view, {.ui = ~0} }, 89 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0} }, 90 { MODKEY, XK_b, togglebar, {0} }, 91 /* { MODKEY, XK_comma, focusmon, {.i = -1 } }, */ 92 /* { MODKEY, XK_period, focusmon, {.i = +1 } }, */ 93 /* { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, */ 94 /* { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, */ 95 { MODKEY, XK_F2, quit, {0} }, 96 TAGKEYS( XK_1, 0) 97 TAGKEYS( XK_2, 1) 98 TAGKEYS( XK_3, 2) 99 TAGKEYS( XK_4, 3) 100 TAGKEYS( XK_5, 4) 101 TAGKEYS( XK_6, 5) 102 TAGKEYS( XK_7, 6) 103 TAGKEYS( XK_8, 7) 104 TAGKEYS( XK_9, 8) 105 }; 106 107 /* button definitions */ 108 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 109 static Button buttons[] = { 110 /* click event mask button function argument */ 111 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 112 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[1]} }, 113 { ClkWinTitle, 0, Button2, zoom, {0} }, 114 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 115 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 116 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 117 { ClkTagBar, 0, Button1, view, {0} }, 118 { ClkTagBar, 0, Button3, toggleview, {0} }, 119 { ClkTagBar, MODKEY, Button1, tag, {0} }, 120 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 121 }; 122