config.def.h (7236B)
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 unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 7 static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ 8 static const unsigned int systrayspacing = 2; /* systray spacing */ 9 static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 10 static const int showsystray = 1; /* 0 means no systray */ 11 static const int showbar = 1; /* 0 means no bar */ 12 static const int topbar = 1; /* 0 means bottom bar */ 13 static const char *fonts[] = { "monospace:size=10" }; 14 static const char dmenufont[] = "monospace:size=10"; 15 static const char col_gray1[] = "#222222"; 16 static const char col_gray2[] = "#444444"; 17 static const char col_gray3[] = "#bbbbbb"; 18 static const char col_gray4[] = "#eeeeee"; 19 static const char col_cyan[] = "#005577"; 20 static const char *colors[][3] = { 21 /* fg bg border */ 22 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 23 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 24 }; 25 26 static const char *barcolors[] = { 27 "#000000", 28 "#7f0000", 29 "#007f00", 30 "#7f7f00", 31 "#00007f", 32 "#7f007f", 33 "#007f7f", 34 "#cccccc", 35 "#333333", 36 "#ff0000", 37 "#00ff00", 38 "#ffff00", 39 "#0000ff", 40 "#ff00ff", 41 "#00ffff", 42 "#ffffff", 43 }; 44 45 /* tagging */ 46 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 47 48 static const Rule rules[] = { 49 /* xprop(1): 50 * WM_CLASS(STRING) = instance, class 51 * WM_NAME(STRING) = title 52 */ 53 /* class instance title tags mask isfloating monitor */ 54 { "Gimp", NULL, NULL, 0, 1, -1 }, 55 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 56 }; 57 58 /* layout(s) */ 59 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 60 static const int nmaster = 1; /* number of clients in master area */ 61 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 62 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 63 static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */ 64 65 static const Layout layouts[] = { 66 /* symbol arrange function */ 67 { "[]=", tile }, /* first entry is default */ 68 { "><>", NULL }, /* no layout function means floating behavior */ 69 { "[M]", monocle }, 70 }; 71 72 /* key definitions */ 73 #define MODKEY Mod1Mask 74 #define TAGKEYS(KEY,TAG) \ 75 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 76 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 77 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 78 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 79 80 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 81 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 82 83 /* commands */ 84 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 85 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 86 static const char *termcmd[] = { "st", NULL }; 87 88 static const Key keys[] = { 89 /* modifier key function argument */ 90 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 91 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 92 { MODKEY, XK_b, togglebar, {0} }, 93 { MODKEY, XK_j, focusstack, {.i = +1 } }, 94 { MODKEY, XK_k, focusstack, {.i = -1 } }, 95 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 96 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 97 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 98 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 99 { MODKEY, XK_Return, zoom, {0} }, 100 { MODKEY, XK_Tab, view, {0} }, 101 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 102 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 103 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 104 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 105 { MODKEY, XK_space, setlayout, {0} }, 106 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 107 { MODKEY, XK_0, view, {.ui = ~0 } }, 108 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 109 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 110 { MODKEY, XK_period, focusmon, {.i = +1 } }, 111 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 112 { MODKEY|ShiftMask, XK_period, tagmon, {.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 }; 124 125 /* button definitions */ 126 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 127 static const Button buttons[] = { 128 /* click event mask button function argument */ 129 { ClkTagBar, MODKEY, Button1, tag, {0} }, 130 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 131 { ClkWinTitle, 0, Button2, zoom, {0} }, 132 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 133 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 134 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 135 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 136 { ClkTagBar, 0, Button1, view, {0} }, 137 { ClkTagBar, 0, Button3, toggleview, {0} }, 138 { ClkTagBar, MODKEY, Button1, tag, {0} }, 139 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 140 }; 141