dwm

Personal build of suckless' dwm
git clone git://git.gormless.xyz/dwm.git
Log | Files | Refs | README | LICENSE

config.h (6112B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 /* appearance */
      4 static const unsigned int borderpx  = 2;        /* border pixel of windows */
      5 static const unsigned int snap      = 8;       /* snap pixel */
      6 static const int swallowfloating    = 1;        /* 1 means swallow floating windows by default */
      7 static const int showbar            = 1;        /* 0 means no bar */
      8 static const int topbar             = 1;        /* 0 means bottom bar */
      9 static const char *fonts[]          = { "IBM Plex Sans:size=10" };
     10 static const char norm_bg[]       = "#eaffff";
     11 static const char norm_border[]       = "#000000";
     12 static const char norm_fg[]       = "#000000";
     13 static const char sel_fg[]       = "#000000";
     14 static const char accent[]        = "#ffffea";
     15 static const char *colors[][3]      = {
     16 	/*               fg         bg         border   */
     17 	[SchemeNorm] = { norm_fg, norm_bg, norm_border },
     18 	[SchemeSel]  = { sel_fg, accent,  norm_border  },
     19 };
     20 
     21 /* tagging */
     22 static const char *tags[] = { "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" };
     23 
     24 static const Rule rules[] = {
     25 	/* xprop(1):
     26 	 *	WM_CLASS(STRING) = instance, class
     27 	 *	WM_NAME(STRING) = title
     28 	 */
     29 	/* class     instance  title           tags mask  isfloating  isterminal  noswallow  monitor */
     30 	{ "Gimp",    NULL,     NULL,           0,         1,          0,           0,        -1 },
     31 	{ "St",      NULL,     NULL,           0,         0,          1,           0,        -1 },
     32 	{ NULL,      NULL,     "Event Tester", 0,         0,          0,           1,        -1 }, /* xev */
     33 	{ "acme",    NULL,     NULL,           2,         0,          0,           0,        -1 },
     34 };
     35 
     36 /* layout(s) */
     37 static const float mfact     = 0.5; /* factor of master area size [0.05..0.95] */
     38 static const int nmaster     = 1;    /* number of clients in master area */
     39 static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
     40 static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
     41 
     42 static const Layout layouts[] = {
     43 	/* symbol     arrange function */
     44 	{ "[]=",      tile },    /* first entry is default */
     45 	{ "><>",      NULL },    /* no layout function means floating behavior */
     46 	{ "[M]",      monocle },
     47 };
     48 
     49 /* key definitions */
     50 #define MODKEY Mod4Mask
     51 #define TAGKEYS(KEY,TAG) \
     52 	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
     53 	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
     54 	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
     55 	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
     56 
     57 /* helper for spawning shell commands in the pre dwm-5.0 fashion */
     58 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
     59 
     60 static Key keys[] = {
     61 	/* modifier                     key        function        argument */
     62 	{ MODKEY,                       XK_b,      togglebar,      {0} },
     63 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
     64 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
     65 	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
     66 	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
     67 	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
     68 	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
     69 	{ MODKEY|ShiftMask,             XK_Return, zoom,           {0} },
     70 	{ MODKEY,                       XK_Tab,    view,           {0} },
     71 	{ MODKEY,                       XK_apostrophe,      killclient,     {0} },
     72 	{ MODKEY|ShiftMask,             XK_t,      setlayout,      {.v = &layouts[0]} },
     73 	{ MODKEY|ShiftMask,             XK_f,      setlayout,      {.v = &layouts[1]} },
     74 	{ MODKEY|ShiftMask,             XK_m,      setlayout,      {.v = &layouts[2]} },
     75 	{ MODKEY,                       XK_space,  setlayout,      {0} },
     76 	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
     77 	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
     78 	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
     79 	{ MODKEY,                       XK_Left,  focusmon,       {.i = -1 } },
     80 	{ MODKEY,                       XK_Right, focusmon,       {.i = +1 } },
     81 	{ MODKEY|ShiftMask,             XK_Left,  tagmon,         {.i = -1 } },
     82 	{ MODKEY|ShiftMask,             XK_Right, tagmon,         {.i = +1 } },
     83 	TAGKEYS(                        XK_1,                      0)
     84 	TAGKEYS(                        XK_2,                      1)
     85 	TAGKEYS(                        XK_3,                      2)
     86 	TAGKEYS(                        XK_4,                      3)
     87 	TAGKEYS(                        XK_5,                      4)
     88 	TAGKEYS(                        XK_6,                      5)
     89 	TAGKEYS(                        XK_7,                      6)
     90 	TAGKEYS(                        XK_8,                      7)
     91 	TAGKEYS(                        XK_9,                      8)
     92 	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
     93 };
     94 
     95 /* button definitions */
     96 /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
     97 static Button buttons[] = {
     98 	/* click                event mask      button          function        argument */
     99 	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    100 	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    101 	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
    102 	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    103 	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    104 	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    105 	{ ClkTagBar,            0,              Button1,        view,           {0} },
    106 	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
    107 	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    108 	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
    109 };
    110