config.h (8803B)
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 gappih = 10; /* horiz inner gap between windows */ 7 static const unsigned int gappiv = 10; /* vert inner gap between windows */ 8 static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */ 9 static const unsigned int gappov = 10; /* vert outer gap between windows and screen edge */ 10 static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */ 11 static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 12 static const unsigned int systrayspacing = 2; /* systray spacing */ 13 static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 14 static const int showsystray = 1; /* 0 means no systray */ 15 static const int showbar = 1; /* 0 means no bar */ 16 static const int topbar = 1; /* 0 means bottom bar */ 17 static const char *fonts[] = { "monospace:size=10", "JoyPixels:pixelsize=10:antialias=true:autohint=true" }; 18 static const char dmenufont[] = "monospace:size=10"; 19 static const char col_gray1[] = "#222222"; 20 static const char col_gray2[] = "#444444"; 21 static const char col_gray3[] = "#bbbbbb"; 22 static const char col_gray4[] = "#eeeeee"; 23 static const char col_cyan[] = "#005577"; 24 static const char *colors[][3] = { 25 /* fg bg border */ 26 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 27 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 28 }; 29 30 /* tagging */ 31 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; 32 33 static const Rule rules[] = { 34 /* xprop(1): 35 * WM_CLASS(STRING) = instance, class 36 * WM_NAME(STRING) = title 37 */ 38 /* class instance title tags mask isfloating monitor */ 39 { "Gimp", NULL, NULL, 0, 1, -1 }, 40 { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 41 }; 42 43 /* layout(s) */ 44 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 45 static const int nmaster = 1; /* number of clients in master area */ 46 static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ 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 }; 54 55 /* key definitions */ 56 #define MODKEY Mod4Mask 57 #define TAGKEYS(KEY,TAG) \ 58 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 59 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 60 { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ 61 { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, 62 63 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 64 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 65 66 /* commands */ 67 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 68 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; 69 static const char *termcmd[] = { "st", NULL }; 70 static const char scratchpadname[] = "scratchpad"; 71 static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; 72 73 static Key keys[] = { 74 /* modifier key function argument */ 75 { MODKEY, XK_semicolon,spawn, {.v = dmenucmd } }, 76 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 77 { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } }, 78 { MODKEY, XK_j, togglebar, {0} }, 79 { MODKEY, XK_a, focusstack, {.i = +1 } }, 80 { MODKEY, XK_e, focusstack, {.i = -1 } }, 81 { MODKEY, XK_u, incnmaster, {.i = +1 } }, 82 { MODKEY, XK_t, incnmaster, {.i = -1 } }, 83 { MODKEY, XK_i, setmfact, {.f = -0.05} }, 84 { MODKEY, XK_o, setmfact, {.f = +0.05} }, 85 { MODKEY|Mod1Mask, XK_i, incrgaps, {.i = +1 } }, 86 { MODKEY|Mod1Mask, XK_o, incrgaps, {.i = -1 } }, 87 { MODKEY|Mod1Mask|ShiftMask, XK_i, incrogaps, {.i = +1 } }, 88 { MODKEY|Mod1Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } }, 89 { MODKEY|Mod1Mask|ControlMask, XK_i, incrigaps, {.i = +1 } }, 90 { MODKEY|Mod1Mask|ControlMask, XK_o, incrigaps, {.i = -1 } }, 91 { MODKEY|Mod1Mask, XK_0, togglegaps, {0} }, 92 { MODKEY|Mod1Mask|ShiftMask, XK_0, defaultgaps, {0} }, 93 { MODKEY, XK_y, incrihgaps, {.i = +1 } }, 94 { MODKEY, XK_b, incrihgaps, {.i = -1 } }, 95 { MODKEY|ControlMask, XK_y, incrivgaps, {.i = +1 } }, 96 { MODKEY|ControlMask, XK_b, incrivgaps, {.i = -1 } }, 97 { MODKEY|Mod1Mask, XK_y, incrohgaps, {.i = +1 } }, 98 { MODKEY|Mod1Mask, XK_b, incrohgaps, {.i = -1 } }, 99 { MODKEY|ShiftMask, XK_y, incrovgaps, {.i = +1 } }, 100 { MODKEY|ShiftMask, XK_b, incrovgaps, {.i = -1 } }, 101 { MODKEY, XK_Return, zoom, {0} }, 102 { MODKEY, XK_Tab, view, {0} }, 103 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 104 { MODKEY, XK_w, setlayout, {.v = &layouts[0]} }, 105 { MODKEY, XK_n, setlayout, {.v = &layouts[1]} }, 106 { MODKEY, XK_p, setlayout, {.v = &layouts[2]} }, 107 { MODKEY, XK_space, setlayout, {0} }, 108 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 109 { MODKEY, XK_0, view, {.ui = ~0 } }, 110 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 111 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 112 { MODKEY, XK_period, focusmon, {.i = +1 } }, 113 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 114 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 115 TAGKEYS( XK_1, 0) 116 TAGKEYS( XK_2, 1) 117 TAGKEYS( XK_3, 2) 118 TAGKEYS( XK_4, 3) 119 TAGKEYS( XK_5, 4) 120 TAGKEYS( XK_6, 5) 121 TAGKEYS( XK_7, 6) 122 TAGKEYS( XK_8, 7) 123 TAGKEYS( XK_9, 8) 124 { MODKEY|ShiftMask, XK_q, quit, {0} }, 125 { MODKEY|ShiftMask, XK_semicolon, spawn, SHCMD("dmenuemoji") }, 126 { MODKEY, XK_x, spawn, SHCMD("i3lock") }, 127 }; 128 129 /* button definitions */ 130 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 131 static Button buttons[] = { 132 /* click event mask button function argument */ 133 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 134 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 135 { ClkWinTitle, 0, Button2, zoom, {0} }, 136 { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, 137 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 138 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 139 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 140 { ClkTagBar, 0, Button1, view, {0} }, 141 { ClkTagBar, 0, Button3, toggleview, {0} }, 142 { ClkTagBar, MODKEY, Button1, tag, {0} }, 143 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 144 }; 145