config.def.h (9240B) - raw


      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    = 20;       /* 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    = 30;       /* vert outer gap between windows and screen edge */
     10 static       int smartgaps          = 0;        /* 1 means no outer gap when there is only one window */
     11 static const int showbar            = 1;        /* 0 means no bar */
     12 static const int topbar             = 1;        /* 0 means bottom bar */
     13 static const int swallowfloating    = 0;        /* 1 means swallow floating windows by default */
     14 static const unsigned int systraypinning = 0;   /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
     15 static const unsigned int systrayspacing = 2;   /* systray spacing */
     16 static const int systraypinningfailfirst = 1;   /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor */
     17 static const int showsystray        = 1;        /* 0 means no systray */
     18 static const char *fonts[]          = { "monospace:size=10" };
     19 static const char dmenufont[]       = "monospace:size=10";
     20 static const char col_gray1[]       = "#222222";
     21 static const char col_gray2[]       = "#444444";
     22 static const char col_gray3[]       = "#bbbbbb";
     23 static const char col_gray4[]       = "#eeeeee";
     24 static const char col_cyan[]        = "#005577";
     25 static const char *colors[][3]      = {
     26 	/*               fg         bg         border   */
     27 	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
     28 	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
     29 };
     30 
     31 /* tagging */
     32 static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
     33 
     34 static const Rule rules[] = {
     35 	/* xprop(1):
     36 	 *	WM_CLASS(STRING) = instance, class
     37 	 *	WM_NAME(STRING) = title
     38 	 */
     39 	/* class     instance  title           tags mask  iscentered   isfloating  isterminal  noswallow  monitor */
     40 	{ "Gimp",    NULL,     NULL,           0,         0,           1,          0,           0,        -1 },
     41 	{ "Firefox", NULL,     NULL,           1 << 8,    0,           0,          0,          -1,        -1 },
     42 	{ "st",      NULL,     NULL,           0,         0,           0,          1,          -1,        -1 },
     43 	{ NULL,      NULL,     "Event Tester", 0,         0,           1,          0,           1,        -1 }, /* xev */
     44 };
     45 
     46 /* layout(s) */
     47 static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
     48 static const int nmaster     = 1;    /* number of clients in master area */
     49 static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
     50 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
     51 
     52 #define FORCE_VSPLIT 1  /* nrowgrid layout: force two clients to always split vertically */
     53 #include "layouts.c"
     54 static const Layout layouts[] = {
     55 	/* symbol     arrange function */
     56 	{ "[]=",      tile },    /* first entry is default */
     57 	{ "[M]",      monocle },
     58 	//{ "[@]",      spiral },
     59 	//{ "[\\]",     dwindle },
     60 	{ "[]D",      deck },
     61 	{ "TTT",      bstack },
     62 	//{ "===",      bstackhoriz },
     63 	//{ "HHH",      grid },
     64 	//{ "###",      nrowgrid },
     65 	//{ "---",      horizgrid },
     66 	//{ ":::",      gaplessgrid },
     67 	//{ "|M|",      centeredmaster },
     68 	//{ ">M>",      centeredfloatingmaster },
     69 	{ "><>",      NULL },    /* no layout function means floating behavior */
     70 	{ NULL,       NULL },
     71 };
     72 
     73 /* key definitions */
     74 #define MODKEY Mod1Mask
     75 #define TAGKEYS(KEY,TAG) \
     76 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     77 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     78 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     79 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
     80 
     81 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
     82 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     83 
     84 /* commands */
     85 static const char *dmenucmd[] = { "dmenu_run", "-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|Mod4Mask,              XK_u,      incrgaps,       {.i = +1 } },
    101 	{ MODKEY|Mod4Mask|ShiftMask,    XK_u,      incrgaps,       {.i = -1 } },
    102 	{ MODKEY|Mod4Mask,              XK_i,      incrigaps,      {.i = +1 } },
    103 	{ MODKEY|Mod4Mask|ShiftMask,    XK_i,      incrigaps,      {.i = -1 } },
    104 	{ MODKEY|Mod4Mask,              XK_o,      incrogaps,      {.i = +1 } },
    105 	{ MODKEY|Mod4Mask|ShiftMask,    XK_o,      incrogaps,      {.i = -1 } },
    106 	{ MODKEY|Mod4Mask,              XK_6,      incrihgaps,     {.i = +1 } },
    107 	{ MODKEY|Mod4Mask|ShiftMask,    XK_6,      incrihgaps,     {.i = -1 } },
    108 	{ MODKEY|Mod4Mask,              XK_7,      incrivgaps,     {.i = +1 } },
    109 	{ MODKEY|Mod4Mask|ShiftMask,    XK_7,      incrivgaps,     {.i = -1 } },
    110 	{ MODKEY|Mod4Mask,              XK_8,      incrohgaps,     {.i = +1 } },
    111 	{ MODKEY|Mod4Mask|ShiftMask,    XK_8,      incrohgaps,     {.i = -1 } },
    112 	{ MODKEY|Mod4Mask,              XK_9,      incrovgaps,     {.i = +1 } },
    113 	{ MODKEY|Mod4Mask|ShiftMask,    XK_9,      incrovgaps,     {.i = -1 } },
    114 	{ MODKEY|Mod4Mask,              XK_0,      togglegaps,     {0} },
    115 	{ MODKEY|Mod4Mask|ShiftMask,    XK_0,      defaultgaps,    {0} },
    116 	{ MODKEY,                       XK_Tab,    view,           {0} },
    117 	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
    118 	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
    119 	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
    120 	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
    121 	{ MODKEY,                       XK_space,  setlayout,      {0} },
    122 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    123 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    124 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    125 	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
    126 	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
    127 	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
    128 	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
    129 	TAGKEYS(                        XK_1,                      0)
    130 	TAGKEYS(                        XK_2,                      1)
    131 	TAGKEYS(                        XK_3,                      2)
    132 	TAGKEYS(                        XK_4,                      3)
    133 	TAGKEYS(                        XK_5,                      4)
    134 	TAGKEYS(                        XK_6,                      5)
    135 	TAGKEYS(                        XK_7,                      6)
    136 	TAGKEYS(                        XK_8,                      7)
    137 	TAGKEYS(                        XK_9,                      8)
    138 	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
    139 };
    140 
    141 /* button definitions */
    142 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    143 static const Button buttons[] = {
    144 	/* click                event mask      button          function        argument */
    145 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    146 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    147 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    148 	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    149 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    150 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    151 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    152 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    153 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    154 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    155 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    156 };
    157