config.def.h (7135B)
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 64 static const Layout layouts[] = { 65 /* symbol arrange function */ 66 { "[]=", tile }, /* first entry is default */ 67 { "><>", NULL }, /* no layout function means floating behavior */ 68 { "[M]", monocle }, 69 }; 70 71 /* key definitions */ 72 #define MODKEY Mod1Mask 73 #define TAGKEYS(KEY,TAG) \ 74 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 75 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 76 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 77 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 78 79 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 80 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 81 82 /* commands */ 83 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 84 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 85 static const char *termcmd[] = { "st", NULL }; 86 87 static const Key keys[] = { 88 /* modifier key function argument */ 89 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 90 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 91 { MODKEY, XK_b, togglebar, {0} }, 92 { MODKEY, XK_j, focusstack, {.i = +1 } }, 93 { MODKEY, XK_k, focusstack, {.i = -1 } }, 94 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 95 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 96 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 97 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 98 { MODKEY, XK_Return, zoom, {0} }, 99 { MODKEY, XK_Tab, view, {0} }, 100 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 101 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 102 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 103 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 104 { MODKEY, XK_space, setlayout, {0} }, 105 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 106 { MODKEY, XK_0, view, {.ui = ~0 } }, 107 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 108 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 109 { MODKEY, XK_period, focusmon, {.i = +1 } }, 110 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 111 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 112 TAGKEYS( XK_1, 0) 113 TAGKEYS( XK_2, 1) 114 TAGKEYS( XK_3, 2) 115 TAGKEYS( XK_4, 3) 116 TAGKEYS( XK_5, 4) 117 TAGKEYS( XK_6, 5) 118 TAGKEYS( XK_7, 6) 119 TAGKEYS( XK_8, 7) 120 TAGKEYS( XK_9, 8) 121 { MODKEY|ShiftMask, XK_q, quit, {0} }, 122 }; 123 124 /* button definitions */ 125 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 126 static const Button buttons[] = { 127 /* click event mask button function argument */ 128 { ClkTagBar, MODKEY, Button1, tag, {0} }, 129 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 130 { ClkWinTitle, 0, Button2, zoom, {0} }, 131 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 132 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 133 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 134 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 135 { ClkTagBar, 0, Button1, view, {0} }, 136 { ClkTagBar, 0, Button3, toggleview, {0} }, 137 { ClkTagBar, MODKEY, Button1, tag, {0} }, 138 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 139 }; 140