config.h (8926B)
1 /* See LICENSE file for copyright and license details. */ 2 #include "gaplessgrid.c" 3 4 /* appearance */ 5 static const unsigned int borderpx = 2; /* border pixel of windows */ 6 static const unsigned int snap = 32; /* snap pixel */ 7 static const int swallowfloating = 0; /* 1 means swallow floating windows by default */ 8 static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ 9 static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ 10 static const unsigned int systrayspacing = 2; /* systray spacing */ 11 static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ 12 static const int showsystray = 1; /* 0 means no systray */ 13 static const int showbar = 1; /* 0 means no bar */ 14 static const int topbar = 0; /* 0 means bottom bar */ 15 static const char *fonts[] = { "sans:size=14", "JoyPixels:pixelsize=12:antialias=true:autohint=true" }; 16 static const char dmenufont[] = "mono:size=12"; 17 18 static const char col_gray1[] = "#222222"; 19 static const char col_gray2[] = "#444444"; 20 static const char col_gray3[] = "#bbbbbb"; 21 static const char col_gray4[] = "#eeeeee"; 22 static const char col_cyan[] = "#005577"; 23 static const char *colors[][3] = { 24 /* fg bg border */ 25 [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, 26 [SchemeSel] = { col_gray4, col_cyan, col_cyan }, 27 }; 28 29 /* static const char normbordercolor[] = "#444444"; */ 30 /* static const char normbgcolor[] = "#222222"; */ 31 /* static const char normfgcolor[] = "#bbbbbb"; */ 32 /* //static const char selbordercolor[] = "#ba1c1c"; */ 33 /* static const char selbordercolor[] = "#555555"; */ 34 /* //static const char selbgcolor[] = "#005577"; */ 35 /* static const char selbgcolor[] = "#555555"; */ 36 /* static const char selfgcolor[] = "#eeeeee"; */ 37 38 static const unsigned int gappx = 4; /* gap pixel between windows */ 39 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ 40 41 /* tagging */ 42 static const char *tags[] = { "१", "२", "३", "४", "५", "६", "७", "८", "९" }; 43 44 static const Rule rules[] = { 45 /* xprop(1): 46 * WM_CLASS(STRING) = instance, class 47 * WM_NAME(STRING) = title 48 */ 49 /* class instance title tags mask isfloating isterminal noswallow monitor */ 50 { "Pinentry-gtk-2", NULL, NULL, 0, 1, 0, -1 -1 }, 51 { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 }, 52 { "tabbed", NULL, NULL, 0, 0, 1, 0, -1 }, 53 { "St", NULL, NULL, 0, 0, 1, 0, -1 }, 54 { "Alacritty", NULL, NULL, 0, 0, 1, 0, -1 }, 55 { "Emacs", "emacs-everywhere", NULL, ~0, 1, 0, -1, -1 }, 56 { "Emacs", "doom-capture", NULL, ~0, 1, 0, -1, -1 }, 57 { NULL, NULL, "Event Tester", 0, 1, 0, 1, -1 }, /* xev */ 58 }; 59 60 /* layout(s) */ 61 static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ 62 static const int nmaster = 1; /* number of clients in master area */ 63 static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ 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 { "TTT", bstack }, 71 { "===", bstackhoriz }, 72 { "###", gaplessgrid }, 73 }; 74 75 /* key definitions */ 76 #define MODKEY Mod4Mask 77 #define TAGKEYS(KEY,TAG) \ 78 { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ 79 { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ 80 { MODKEY|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \ 81 { MODKEY|ControlMask|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, 82 83 /* helper for spawning shell commands in the pre dwm-5.0 fashion */ 84 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } 85 86 /* commands */ 87 static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ 88 static const char *dmenucmd[] = { "dmenu-recent", NULL }; 89 static const char *termcmd[] = { "tabbed", "-c", "st", "-w", NULL }; 90 static const char scratchpadname[] = "scratchpad"; 91 static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "85x20+600+10", NULL }; 92 93 static Key keys[] = { 94 /* modifier key function argument */ 95 { MODKEY, XK_p, spawn, {.v = dmenucmd } }, 96 { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, 97 { MODKEY|ShiftMask, XK_s, togglescratch, {.v = scratchpadcmd } }, 98 { MODKEY, XK_b, togglebar, {0} }, 99 { MODKEY, XK_j, focusstack, {.i = +1 } }, 100 { MODKEY, XK_k, focusstack, {.i = -1 } }, 101 { MODKEY, XK_i, incnmaster, {.i = +1 } }, 102 { MODKEY, XK_d, incnmaster, {.i = -1 } }, 103 { MODKEY, XK_h, setmfact, {.f = -0.05} }, 104 { MODKEY, XK_l, setmfact, {.f = +0.05} }, 105 { MODKEY, XK_Return, zoom, {0} }, 106 { MODKEY, XK_Tab, view, {0} }, 107 { MODKEY|ShiftMask, XK_c, killclient, {0} }, 108 { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, 109 { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, 110 { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, 111 { MODKEY, XK_u, setlayout, {.v = &layouts[3]} }, 112 { MODKEY, XK_o, setlayout, {.v = &layouts[4]} }, 113 { MODKEY, XK_g, setlayout, {.v = &layouts[5]} }, 114 { MODKEY, XK_space, setlayout, {0} }, 115 { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, 116 { MODKEY, XK_0, view, {.ui = ~0 } }, 117 { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 118 { MODKEY, XK_comma, focusmon, {.i = -1 } }, 119 { MODKEY, XK_period, focusmon, {.i = +1 } }, 120 { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 121 { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 122 TAGKEYS( XK_1, 0) 123 TAGKEYS( XK_2, 1) 124 TAGKEYS( XK_3, 2) 125 TAGKEYS( XK_4, 3) 126 TAGKEYS( XK_5, 4) 127 TAGKEYS( XK_6, 5) 128 TAGKEYS( XK_7, 6) 129 TAGKEYS( XK_8, 7) 130 TAGKEYS( XK_9, 8) 131 { MODKEY|ShiftMask, XK_Delete, quit, {0} }, 132 }; 133 134 /* button definitions */ 135 /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ 136 static Button buttons[] = { 137 /* click event mask button function argument */ 138 { ClkLtSymbol, 0, Button1, setlayout, {0} }, 139 { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, 140 { ClkWinTitle, 0, Button2, zoom, {0} }, 141 { ClkClientWin, MODKEY, Button1, movemouse, {0} }, 142 { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, 143 { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, 144 { ClkTagBar, 0, Button1, view, {0} }, 145 { ClkTagBar, 0, Button3, toggleview, {0} }, 146 { ClkTagBar, MODKEY, Button1, tag, {0} }, 147 { ClkTagBar, MODKEY, Button3, toggletag, {0} }, 148 }; 149